Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c037835
chore: ignore agent and editor artifacts
marvin-hansen Aug 13, 2026
32a6e2d
fix: honour RULES_ELIXIR_SKIP_SYSTEM
marvin-hansen Aug 13, 2026
1facfb6
fix: extract the Elixir tarball portably
marvin-hansen Aug 13, 2026
ca16834
fix: allow a missing LICENSE and declare compile-time data
marvin-hansen Aug 13, 2026
d86b1b1
fix: stage ExUnit tests correctly
marvin-hansen Aug 13, 2026
056e2a8
fix: migrate off the deprecated host_windows condition
marvin-hansen Aug 13, 2026
84617d0
feat: add mix_archive_build
marvin-hansen Aug 13, 2026
90bf2ae
feat: build Hex from source as a Mix archive
marvin-hansen Aug 13, 2026
6965187
docs: rewrite the README and split copyright into COPYRIGHT.md
marvin-hansen Aug 13, 2026
28751cf
release: 1.2.0
marvin-hansen Aug 13, 2026
28bafd6
Merge branch 'rabbitmq:main' into release/1.2.0
marvin-hansen Aug 13, 2026
f8a2bfb
build: require Bazel 8 or newer and move dependencies to current stable
marvin-hansen Aug 13, 2026
a674af0
fix: resolve the Windows constraint in this module, not in every cons…
marvin-hansen Aug 13, 2026
a0b9b91
fix: detect ExUnit results by exit code rather than summary text
marvin-hansen Aug 13, 2026
e24dcb9
test: restore the test module on Bazel 8 and Elixir 1.20
marvin-hansen Aug 13, 2026
06230fd
build: update the examples for Bazel 8 and current toolchains
marvin-hansen Aug 13, 2026
23e3199
chore: drop the rabbitmq registry, untrack lockfiles, and refresh CI
marvin-hansen Aug 13, 2026
22062f7
docs: document supported versions and the git pre-release install
marvin-hansen Aug 13, 2026
b49cf1d
release: 1.2.0
marvin-hansen Aug 13, 2026
e331df9
fix: do not fail an ex_unit_test that excluded every test
marvin-hansen Aug 13, 2026
ee1e69b
docs: install with git_override rather than archive_override
marvin-hansen Aug 13, 2026
ea91591
Code signing.
marvin-hansen Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build --registry=https://bcr.bazel.build/
build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/erlang-packages/

build --incompatible_strict_action_env

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
latest
9.2.0
12 changes: 6 additions & 6 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"homepage": "https://github.com/rabbitmq/rules_elixir",
"homepage": "https://github.com/bazelverse/rules_elixir",
"maintainers": [
{
"email": "rin.kuryloski@broadcom.com",
"github": "pjk25",
"name": "Rin Kuryloski"
"email": "marvin.hansen@gmail.com",
"github": "marvin-hansen",
"name": "Marvin Hansen"
}
],
"repository": [
"github:rabbitmq/rules_elixir"
"github:bazelverse/rules_elixir"
],
"versions": [],
"yanked_versions": {}
}
}
35 changes: 24 additions & 11 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Erlang comes from kerl, built from source, and is activated so that the Elixir
# archive below finds an ERTS to run on. Elixir comes from the precompiled
# release asset for the matching OTP major: upstream publishes one asset per
# supported major, so ELIXIR_VERSION and OTP_MAJOR have to move together. See the
# supported versions table in README.md.
#
# The external Elixir toolchain reads ELIXIR_HOME before falling back to
# `which elixir`, which is what makes the unpacked archive visible to the build.
shell_commands: &shell_commands
- curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
- chmod a+x kerl
Expand All @@ -6,23 +14,26 @@ shell_commands: &shell_commands
- ./kerl install ${ERLANG_VERSION} ~/kerl/${ERLANG_VERSION}
- . ~/kerl/${ERLANG_VERSION}/activate
- cd ~
- curl -LO https://github.com/elixir-lang/elixir/releases/download/v1.17.2/elixir-otp-26.zip
- mkdir elixir-otp-26
- unzip elixir-otp-26.zip -d elixir-otp-26
- ~/elixir-otp-26/bin/iex --version
- curl -LO https://github.com/elixir-lang/elixir/releases/download/v${ELIXIR_VERSION}/elixir-otp-${OTP_MAJOR}.zip
- mkdir -p elixir-otp-${OTP_MAJOR}
- unzip -q elixir-otp-${OTP_MAJOR}.zip -d elixir-otp-${OTP_MAJOR}
- ~/elixir-otp-${OTP_MAJOR}/bin/iex --version

matrix:
bazel:
- 7.x
- 8.x
- 9.x
tasks:
verify_targets_macos:
name: Verify build targets (macos)
platform: macos
bazel: ${{ bazel }}
environment:
ERLANG_VERSION: "26.2"
ERLANG_HOME: /Users/buildkite/kerl/26.2
ELIXIR_HOME: /Users/buildkite/elixir-otp-26
ERLANG_VERSION: "29.0.5"
ERLANG_HOME: /Users/buildkite/kerl/29.0.5
ELIXIR_VERSION: "1.20.3"
OTP_MAJOR: "29"
ELIXIR_HOME: /Users/buildkite/elixir-otp-29
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
Expand All @@ -33,9 +44,11 @@ tasks:
platform: ubuntu2004
bazel: ${{ bazel }}
environment:
ERLANG_VERSION: "26.2"
ERLANG_HOME: /var/lib/buildkite-agent/kerl/26.2
ELIXIR_HOME: /var/lib/buildkite-agent/elixir-otp-26
ERLANG_VERSION: "29.0.5"
ERLANG_HOME: /var/lib/buildkite-agent/kerl/29.0.5
ELIXIR_VERSION: "1.20.3"
OTP_MAJOR: "29"
ELIXIR_HOME: /var/lib/buildkite-agent/elixir-otp-29
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
Expand Down
2 changes: 1 addition & 1 deletion .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_elixir-{TAG}.tar.gz"
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_elixir-{VERSION}.tar.gz"
}
76 changes: 0 additions & 76 deletions .github/workflows/publish-rabbitmq-bcr.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/publish-to-bcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Opens a PR against the Bazel Central Registry when a release is published.
#
# Prerequisites, both one-time and both outside this repository:
# 1. A fork of bazelbuild/bazel-central-registry under the bazelverse org.
# 2. A classic PAT with `repo` and `workflow` scopes, stored as the
# BCR_PUBLISH_TOKEN Actions secret.
#
# Replaces a workflow that published to rabbitmq/bazel-central-registry@erlang-packages,
# a private registry fork this project can no longer write to.
#
# Note that rules_elixir cannot actually land in the registry until rules_erlang
# 3.18.0 does, because the BCR presubmit resolves the full module graph and
# overrides do not apply to a non-root module.
name: Publish to BCR
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: Release tag to publish
required: true
type: string

jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.4.2
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
registry_fork: bazelverse/bazel-central-registry
attest: true
permissions:
attestations: write
contents: write
id-token: write
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
69 changes: 51 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# CI covers the latest two Elixir minors against the latest two OTP majors.
# Elixir supports a moving window of OTP majors (1.20 covers 27-29, 1.19 covers
# 26-28), so the pairs are pinned explicitly rather than crossed: crossing them
# would generate combinations Elixir does not support. Earlier versions may work
# but are not tested here. See the supported versions table in README.md.
#
# The Bazel matrix lives in .bcr/presubmit.yml, which covers 8.x and 9.x. These
# jobs use the version pinned in .bazelversion.
name: Test
on:
push:
Expand All @@ -7,43 +15,62 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- otp: "28.5"
elixir: "1.19.5-otp-28"
- otp: "29.0"
elixir: "1.20.3-otp-29"
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: CONFIGURE
run: |
echo "build --color=yes" >> .bazelrc
echo "build --color=yes" >> user.bazelrc
- name: BUILD
run: |
bazelisk build //... \
--verbose_failures
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- otp: "28.5"
elixir: "1.19.5-otp-28"
- otp: "29.0"
elixir: "1.20.3-otp-29"
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: CONFIGURE
working-directory: test
run: |
echo "build --color=yes" >> .bazelrc
echo "build --color=yes" >> user.bazelrc
- name: BUILD & TEST
working-directory: test
run: |
bazelisk test //...
- name: CHECK LOGS
working-directory: test
# Elixir 1.20 replaced "N tests, M failures" with "Result: N passed", so
# both spellings are accepted while the matrix spans 1.19 and 1.20.
run: |
grep "2 tests, 0 failures" bazel-testlogs/two_file_test/test.log
grep -E "Result: 2 passed|2 tests, 0 failures" \
bazel-testlogs/two_file_test/test.log
- name: EXPECTED FAILURES FAIL
working-directory: test
run: |
Expand All @@ -54,23 +81,31 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: bazel-testlogs
name: bazel-testlogs-${{ matrix.otp }}
path: |
test/bazel-testlogs/*
examples-basic:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- otp: "28.5"
elixir: "1.19.5-otp-28"
- otp: "29.0"
elixir: "1.20.3-otp-29"
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: CONFIGURE
working-directory: examples/basic
run: |
echo "build --color=yes" >> .bazelrc
echo "build --color=yes" >> user.bazelrc
- name: BUILD & TEST
working-directory: examples/basic
run: |
Expand All @@ -79,10 +114,12 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: bazel-testlogs-examples-basic
name: bazel-testlogs-examples-basic-${{ matrix.otp }}
path: |
examples/basic/bazel-testlogs/*
examples-internal-elixir:
# Builds both Erlang and Elixir from source, so it pins its own versions in
# MODULE.bazel and takes no setup-beam. Single configuration by design.
runs-on: ubuntu-latest
steps:
- name: CHECKOUT REPOSITORY
Expand All @@ -104,21 +141,17 @@ jobs:
- name: CONFIGURE
working-directory: examples/internal-elixir
run: |
cat << EOF >> .bazelrc
cat << EOF >> user.bazelrc
build --disk_cache=/home/runner/disk-cache
build --color=yes
EOF
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: BUILD & TEST
working-directory: examples/internal-elixir
env:
ELIXIR_ERL_OPTIONS: +fnu
run: |
bazelisk test //... \
--config=ie-26_2 \
--toolchain_resolution_debug='@@rules_erlang~//tools:toolchain_type' \
--toolchain_resolution_debug='@@rules_elixir~//:toolchain_type' \
--config=ie-29 \
--verbose_failures
- name: UPLOAD TEST LOGS
if: always()
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/bazel-*
/user.bazelrc
.agents
.claude
.code/
.idea/
.DS_Store
MODULE.bazel.lock
Loading
Loading