Skip to content

Commit a572fed

Browse files
committed
CI: verify that compiler still builds with older OCaml versions
1 parent 49dfc47 commit a572fed

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,28 @@ jobs:
136136
strategy:
137137
fail-fast: false
138138
matrix:
139+
ocaml_compiler: [5.2.0]
139140
include:
140-
- os: macos-13 # x64
141-
ocaml_compiler: 5.2.0
142-
- os: macos-14 # ARM
143-
ocaml_compiler: 5.2.0
144141
- os: ubuntu-latest # x64
145142
ocaml_compiler: ocaml-variants.5.2.0+options,ocaml-option-static
143+
upload_binaries: true
144+
upload_libs: true
145+
# Build the playground compiler on the fastest runner
146+
build_playground: true
147+
- os: macos-13 # x64
148+
upload_binaries: true
149+
- os: macos-14 # ARM
150+
upload_binaries: true
146151
- os: windows-latest
147-
ocaml_compiler: 5.2.0
152+
upload_binaries: true
153+
154+
# Verify that the compiler still builds with older OCaml versions
155+
- os: ubuntu-latest
156+
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
157+
- os: ubuntu-latest
158+
ocaml_compiler: ocaml-variants.4.14.2+options,ocaml-option-static
159+
- os: ubuntu-latest
160+
ocaml_compiler: ocaml-variants.4.12.0+options,ocaml-option-static
148161

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

@@ -372,33 +385,33 @@ jobs:
372385
if: runner.os == 'Windows'
373386
run: node scripts/ciTest.js -mocha -theme -format
374387

375-
# Build the playground compiler on the fastest runner (ubuntu-latest)
376388
- name: Build playground compiler
377-
if: matrix.os == 'ubuntu-latest'
389+
if: matrix.build_playground
378390
run: |
379391
opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js
380392
opam exec -- dune build --profile browser
381393
cp ./_build/default/jscomp/jsoo/jsoo_playground_main.bc.js playground/compiler.js
382394
383395
- name: Test playground compiler
384-
if: matrix.os == 'ubuntu-latest'
396+
if: matrix.build_playground
385397
run: node playground/playground_test.js
386398

387399
- name: Upload playground compiler to CDN
388-
if: ${{ matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v') }}
400+
if: ${{ matrix.build_playground && startsWith(github.ref, 'refs/tags/v') }}
389401
env:
390402
KEYCDN_USER: ${{ secrets.KEYCDN_USER }}
391403
KEYCDN_PASSWORD: ${{ secrets.KEYCDN_PASSWORD }}
392404
run: bash playground/upload_bundle.sh
393405

394406
- name: "Upload artifacts: binaries"
407+
if: matrix.upload_binaries
395408
uses: actions/upload-artifact@v4
396409
with:
397410
name: binaries-${{ env.artifact_dir_name }}
398411
path: ${{ env.artifact_dir_name }}
399412

400413
- name: "Upload artifacts: lib/ocaml"
401-
if: runner.os == 'Linux'
414+
if: matrix.upload_libs
402415
uses: actions/upload-artifact@v4
403416
with:
404417
name: lib-ocaml

0 commit comments

Comments
 (0)