Skip to content

fix(ci): build each Burrito target on its matching OS runner (CRY-40) - #108

Merged
bougyman merged 2 commits into
mainfrom
CRY-40-per-os-burrito-runners
Aug 14, 2026
Merged

fix(ci): build each Burrito target on its matching OS runner (CRY-40)#108
bougyman merged 2 commits into
mainfrom
CRY-40-per-os-burrito-runners

Conversation

@bougyman

Copy link
Copy Markdown
Member

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

rustler_precompiled (used by mdex_native/Marcli) fetches a precompiled
NIF for the build host's platform at compile time. The previous single
ubuntu-latest runner caused the Linux .so to be bundled into macOS and
Windows Burrito releases, making MDEx unavailable at runtime and crashing
`lcls --full` with an UndefinedFunctionError.

Switch the burrito-build matrix to per-OS runners so each target picks
up the correct precompiled NIF automatically:
- macos_aarch64 -> macos-latest (Darwin arm64 .dylib)
- linux_x86_64  -> ubuntu-latest (Linux x86_64 .so, unchanged)
- windows_x86_64 -> windows-latest (Windows x86_64 .dll)

Remove the p7zip install step: it was only needed when cross-compiling
the Windows target from Linux; Windows runners have 7z pre-installed.

Fixes CRY-40.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bougyman

Copy link
Copy Markdown
Member Author

Implementation complete

This PR implements the fix for CRY-40.

What changed: .github/workflows/main.yamlburrito-build job only.

  • runs-on: ubuntu-latestruns-on: ${{ matrix.runner }}
  • Flat target matrix → include matrix with per-target runner fields:
    • macos_aarch64macos-latest
    • linux_x86_64ubuntu-latest (unchanged)
    • windows_x86_64windows-latest
  • Removed the apt-get install p7zip-full step (was only needed when cross-compiling Windows from Linux; Windows runners have 7z pre-installed)

Why this fixes the crash: rustler_precompiled (used by mdex_native/Marcli) calls :erlang.system_info(:system_architecture) at compile time and downloads a precompiled NIF for that platform. Building on ubuntu-latest caused the Linux .so to be bundled into macOS and Windows releases, so MDExNative.Native was never available at runtime — crashing lcls --full with an UndefinedFunctionError. Each target now builds on its matching OS, so the correct NIF is fetched and bundled automatically.

Verification: Trigger a release workflow (or workflow_dispatch) and confirm all three legs succeed — especially that lcls --full on macos_aarch64 no longer crashes.

Windows runners default to pwsh; bash is required for the env-var
assignment and POSIX test syntax used in the build and verify steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bougyman

Copy link
Copy Markdown
Member Author

Rework — address code review

Review issue addressed: Missing `shell: bash` in `burrito-build` `defaults.run`.

Change: Added `shell: bash` to the `defaults.run` block of the `burrito-build` job (.github/workflows/main.yaml line 81). This ensures all run steps in that job use Git Bash on Windows runners rather than the default `pwsh`, making the inline env-var assignment (MIX_ENV=prod BURRITO_TARGET=... mix release lc) and POSIX test syntax in the verify step valid on all three runner OSes.

Commit: `722a65d fix(ci): set shell: bash in burrito-build defaults`

Quality checks: 227/227 tests pass, compilation clean.

No other changes. The `burrito-package` job already runs on `ubuntu-latest` and is unaffected.

@bougyman
bougyman merged commit c2d592d into main Aug 14, 2026
2 checks passed
@bougyman
bougyman deleted the CRY-40-per-os-burrito-runners branch August 14, 2026 17:40
bougyman pushed a commit that referenced this pull request Aug 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.1](v1.5.0...v1.5.1)
(2026-08-14)


### Bug Fixes

* **ci:** build each Burrito target on its matching OS runner (CRY-40)
([#108](#108))
([c2d592d](c2d592d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants