Skip to content

Commit c2d592d

Browse files
bougymanclaude
andauthored
fix(ci): build each Burrito target on its matching OS runner (CRY-40) (#108)
## Summary - Fixes `lcls --full` crash caused by MDEx's `rustler_precompiled` NIF being unavailable in macOS/Windows Burrito releases - Root cause: the previous workflow built all targets on `ubuntu-latest`, so the Linux `.so` was bundled instead of the Darwin `.dylib` or Windows `.dll` - Solution: each target now runs on its matching OS runner — `macos-latest` for `macos_aarch64`, `ubuntu-latest` for `linux_x86_64` (unchanged), `windows-latest` for `windows_x86_64` - Also removes the `p7zip` install step, which was only needed when cross-compiling Windows from Linux; Windows runners have `7z` pre-installed ## Changes - `.github/workflows/main.yaml`: convert flat `target` matrix + `runs-on: ubuntu-latest` to an `include` matrix with per-target `runner` fields; remove the `apt-get install p7zip-full` step ## Test plan - [ ] Trigger a release workflow (or `workflow_dispatch`) and confirm all three matrix legs succeed on their respective runner types - [ ] Confirm the `macos_aarch64` binary loads MDEx correctly (`lcls --full` no longer crashes on Darwin arm64) - [ ] Confirm `linux_x86_64` and `windows_x86_64` builds are unaffected Closes CRY-40. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 14e2c2c commit c2d592d

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

‎.github/workflows/main.yaml‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,32 @@ jobs:
5353
# for building, not every push to main.
5454
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'release-please--branches--main')
5555
name: Build Burrito target (${{ matrix.target }})
56-
runs-on: ubuntu-latest
56+
runs-on: ${{ matrix.runner }}
5757
strategy:
5858
# Kept in sync with mix.exs's releases.lc.burrito.targets - Burrito
5959
# has no introspection command to read this list back out, so it's
6060
# duplicated here by hand (see #66). Default fail-fast: true - a
6161
# failed required leg cancels the others and fails this job outright,
6262
# which correctly skips burrito-package below rather than packaging
6363
# a release with a target missing.
64+
#
65+
# Each target runs on its matching OS runner so rustler_precompiled
66+
# (used by mdex_native) downloads the correct precompiled NIF for the
67+
# target platform. Cross-compiling from Ubuntu caused the Linux NIF to
68+
# be bundled into macOS/Windows releases, making MDEx unavailable at
69+
# runtime (see CRY-40).
6470
matrix:
65-
target: [macos_aarch64, linux_x86_64, windows_x86_64]
71+
include:
72+
- target: macos_aarch64
73+
runner: macos-latest
74+
- target: linux_x86_64
75+
runner: ubuntu-latest
76+
- target: windows_x86_64
77+
runner: windows-latest
6678
defaults:
6779
run:
6880
working-directory: app
81+
shell: bash
6982
steps:
7083
-
7184
uses: actions/checkout@v7
@@ -87,11 +100,6 @@ jobs:
87100
uses: mlugg/setup-zig@v2.2.1
88101
with:
89102
version: "0.16.0"
90-
-
91-
# Only the Windows target's own build actually needs 7z.
92-
if: matrix.target == 'windows_x86_64'
93-
name: Install p7zip (Burrito needs 7z for Windows targets)
94-
run: sudo apt-get update && sudo apt-get install -y p7zip-full
95103
-
96104
run: mix deps.get
97105
-

0 commit comments

Comments
 (0)