Skip to content

Commit 98a5b5f

Browse files
committed
Ship NIF 2.17 only — NIF 2.18 not yet released in any OTP
1 parent b2a0019 commit 98a5b5f

2 files changed

Lines changed: 18 additions & 29 deletions

File tree

.github/workflows/precompile.yml

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,18 @@ jobs:
1717
runs-on: ubuntu-latest
1818
env:
1919
MIX_ENV: prod
20-
# One job per NIF ABI we want to ship for. OTP 27 emits NIF 2.17, OTP 28
21-
# emits NIF 2.18 — so each matrix entry produces a distinct filename and
22-
# there's no upload race on the shared release. Elixir 1.19 supports both
23-
# OTP versions. Multi-OTP runtime testing happens in ci.yml.
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
include:
28-
- otp: "27.x"
29-
elixir: "1.19.x"
30-
- otp: "28.x"
31-
elixir: "1.19.x"
20+
# One job per NIF ABI shipped: currently OTP 26, 27, and 28 all expose
21+
# NIF 2.17, so a single OTP 28 / Elixir 1.19 build covers everything we
22+
# ship today. When a future OTP bumps the NIF ABI to 2.18, add a second
23+
# matrix entry pinned to that OTP and update mix.exs's
24+
# make_precompiler_nif_versions accordingly.
3225
steps:
3326
- uses: actions/checkout@v5
3427

3528
- uses: erlef/setup-beam@v1
3629
with:
37-
otp-version: ${{ matrix.otp }}
38-
elixir-version: ${{ matrix.elixir }}
30+
otp-version: "28.x"
31+
elixir-version: "1.19.x"
3932

4033
# taiki-e/setup-cross-toolchain-action pulls a prebuilt musl toolchain
4134
# from ghcr.io/taiki-e/rust-cross-toolchain, sidestepping musl.cc which
@@ -89,25 +82,18 @@ jobs:
8982
runs-on: macos-latest
9083
env:
9184
MIX_ENV: prod
92-
# One job per NIF ABI we want to ship for. OTP 27 emits NIF 2.17, OTP 28
93-
# emits NIF 2.18 — so each matrix entry produces a distinct filename and
94-
# there's no upload race on the shared release. Elixir 1.19 supports both
95-
# OTP versions. Multi-OTP runtime testing happens in ci.yml.
96-
strategy:
97-
fail-fast: false
98-
matrix:
99-
include:
100-
- otp: "27.x"
101-
elixir: "1.19.x"
102-
- otp: "28.x"
103-
elixir: "1.19.x"
85+
# One job per NIF ABI shipped: currently OTP 26, 27, and 28 all expose
86+
# NIF 2.17, so a single OTP 28 / Elixir 1.19 build covers everything we
87+
# ship today. When a future OTP bumps the NIF ABI to 2.18, add a second
88+
# matrix entry pinned to that OTP and update mix.exs's
89+
# make_precompiler_nif_versions accordingly.
10490
steps:
10591
- uses: actions/checkout@v5
10692

10793
- uses: erlef/setup-beam@v1
10894
with:
109-
otp-version: ${{ matrix.otp }}
110-
elixir-version: ${{ matrix.elixir }}
95+
otp-version: "28.x"
96+
elixir-version: "1.19.x"
11197

11298
- run: mix deps.get
11399

mix.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ defmodule ImageQRCode.MixProject do
2828
make_precompiler: {:nif, CCPrecompiler},
2929
make_precompiler_url: "#{@source_url}/releases/download/v#{@version}/@{artefact_filename}",
3030
make_precompiler_filename: "image_qrcode_nif",
31-
make_precompiler_nif_versions: [versions: ["2.17", "2.18"]],
31+
# Currently OTP 26, 27, and 28 all expose NIF ABI 2.17 — there is no
32+
# NIF 2.18 in any released OTP yet. Add "2.18" here (and a matching
33+
# job to .github/workflows/precompile.yml) once a future OTP bumps it.
34+
make_precompiler_nif_versions: [versions: ["2.17"]],
3235
cc_precompiler: cc_precompiler()
3336
]
3437
end

0 commit comments

Comments
 (0)