|
44 | 44 | run: MODE=muen opam exec -- dune build --root example |
45 | 45 | - name: Compile examples with xen |
46 | 46 | run: MODE=xen opam exec -- dune build --root example |
| 47 | + |
| 48 | + # TEMP: end-to-end macOS check that pins the not-yet-released stack |
| 49 | + # (Solo5/solo5#641, mirage/ocaml-gmp#29, ocaml/Zarith#173). Drop the pins and |
| 50 | + # the fork clones once those land in opam. |
| 51 | + macos-e2e: |
| 52 | + name: macOS aarch64 e2e (zarith) |
| 53 | + runs-on: macos-latest |
| 54 | + env: |
| 55 | + OPAMYES: 1 |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v6 |
| 58 | + # No brew install or PATH setup: opam pulls the LLVM toolchain and target |
| 59 | + # runtime through solo5-cross-aarch64's depexts, and configure resolves the |
| 60 | + # keg-only tools to absolute paths. |
| 61 | + - uses: ocaml/setup-ocaml@v3 |
| 62 | + with: |
| 63 | + ocaml-compiler: 5.4.1 |
| 64 | + opam-pin: false |
| 65 | + - name: Pin the stack and build the cross-compiler |
| 66 | + run: | |
| 67 | + opam pin add -n solo5 git+https://github.com/samoht/solo5.git#macos |
| 68 | + opam pin add -n solo5-cross-aarch64 git+https://github.com/samoht/solo5.git#macos |
| 69 | + opam pin add -n gmp git+https://github.com/samoht/ocaml-gmp.git#ship-gmp-pc |
| 70 | + opam pin add -n zarith git+https://github.com/samoht/zarith.git#honor-ocaml-env |
| 71 | + opam pin add -n ocaml-solo5-cross-aarch64 . |
| 72 | + opam install ocaml-solo5-cross-aarch64 |
| 73 | + - name: Cross-build zarith against ocaml-gmp's pkg-config (Zarith#173) |
| 74 | + run: | |
| 75 | + set -euo pipefail |
| 76 | + opam remove -y zarith gmp conf-gmp || true |
| 77 | + opam install gmp # ocaml-gmp fork: relocatable gmp.pc under lib/pkgconfig |
| 78 | + OCAMLC="ocamlfind -toolchain solo5 ocamlc" \ |
| 79 | + OCAMLOPT="ocamlfind -toolchain solo5 ocamlopt" \ |
| 80 | + OCAMLDEP="ocamlfind -toolchain solo5 ocamldep" \ |
| 81 | + OCAMLMKLIB="ocamlfind -toolchain solo5 ocamlmklib" \ |
| 82 | + PKG_CONFIG_PATH="$(opam var lib)/pkgconfig:${PKG_CONFIG_PATH:-}" \ |
| 83 | + opam install zarith --verbose 2>&1 | tee zarith-build.log |
| 84 | + # fail unless zarith was actually built through the solo5 cross toolchain |
| 85 | + grep -qE 'aarch64-solo5-ocaml|toolchain solo5' zarith-build.log |
0 commit comments