Skip to content
Merged
Changes from all commits
Commits
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
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
upload_libs: true
node-target: linux-x64
rust-target: x86_64-unknown-linux-musl
dune-profile: static
- os: ubuntu-24.04-arm # ARM
ocaml_compiler: ocaml-variants.5.3.0+options,ocaml-option-static
upload_binaries: true
Expand All @@ -44,34 +45,40 @@ jobs:
benchmarks: true
node-target: linux-arm64
rust-target: aarch64-unknown-linux-musl
dune-profile: static
- os: macos-15-intel # x64
ocaml_compiler: 5.3.0
upload_binaries: true
node-target: darwin-x64
rust-target: x86_64-apple-darwin
dune-profile: release
- os: macos-15 # ARM
ocaml_compiler: 5.3.0
upload_binaries: true
node-target: darwin-arm64
rust-target: aarch64-apple-darwin
dune-profile: release
- os: windows-2025
ocaml_compiler: 5.3.0
upload_binaries: true
node-target: win32-x64
rust-target: x86_64-pc-windows-gnu
exe-suffix: ".exe"
dune-profile: release

# Verify that the compiler still builds with the oldest OCaml version we support.
- os: ubuntu-24.04
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
node-target: linux-x64
rust-target: x86_64-unknown-linux-musl
dune-profile: static

runs-on: ${{matrix.os}}

env:
# When changing the setup-ocaml version, also adjust it in the setup step further below.
SETUP_OCAML_VERSION: 3.4.6 # OPAM <2.6.0
SETUP_OCAML_VERSION: 3.6.0 # OPAM <2.6.0
DUNE_PROFILE: ${{ matrix.dune-profile }}

steps:
- name: "Windows: Set git config"
Expand Down Expand Up @@ -170,7 +177,7 @@ jobs:
key: ${{ env.opam_cache_key }}

- name: Use OCaml ${{matrix.ocaml_compiler}}
uses: ocaml/setup-ocaml@v3.4.8
uses: ocaml/setup-ocaml@v3.6.0
if: steps.cache-opam-env.outputs.cache-hit != 'true'
with:
ocaml-compiler: ${{matrix.ocaml_compiler}}
Expand Down Expand Up @@ -208,7 +215,7 @@ jobs:
- name: Use cached OPAM environment
if: steps.cache-opam-env.outputs.cache-hit == 'true'
run: |
# https://github.com/ocaml/setup-ocaml/blob/v3.4.6/packages/setup-ocaml/src/installer.ts
# https://github.com/ocaml/setup-ocaml/blob/v3.6.0/packages/setup-ocaml/src/installer.ts
echo "OPAMCOLOR=always" >> "$GITHUB_ENV"
echo "OPAMCONFIRMLEVEL=unsafe-yes" >> "$GITHUB_ENV"
echo "OPAMDOWNLOADJOBS=4" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -261,12 +268,7 @@ jobs:
key: ${{ steps.compiler-build-state-key.outputs.value }}

- name: Build compiler
if: runner.os != 'Linux'
run: opam exec -- dune build --display quiet --profile release

- name: Build compiler (Linux static)
if: runner.os == 'Linux'
run: opam exec -- dune build --display quiet --profile static
run: opam exec -- dune build --display quiet

- name: Delete stable compiler build state
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
Expand Down