Skip to content

Commit 0036228

Browse files
authored
CI: verify that compiler still builds with older OCaml versions (rescript-lang#6927)
1 parent 49dfc47 commit 0036228

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/ci.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,29 @@ jobs:
137137
fail-fast: false
138138
matrix:
139139
include:
140+
- os: ubuntu-latest # x64
141+
ocaml_compiler: ocaml-variants.5.2.0+options,ocaml-option-static
142+
upload_binaries: true
143+
upload_libs: true
144+
# Build the playground compiler on the fastest runner
145+
build_playground: true
140146
- os: macos-13 # x64
141147
ocaml_compiler: 5.2.0
148+
upload_binaries: true
142149
- os: macos-14 # ARM
143150
ocaml_compiler: 5.2.0
144-
- os: ubuntu-latest # x64
145-
ocaml_compiler: ocaml-variants.5.2.0+options,ocaml-option-static
151+
upload_binaries: true
146152
- os: windows-latest
147153
ocaml_compiler: 5.2.0
154+
upload_binaries: true
155+
156+
# Verify that the compiler still builds with older OCaml versions
157+
- os: ubuntu-latest
158+
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
159+
- os: ubuntu-latest
160+
ocaml_compiler: ocaml-variants.4.14.2+options,ocaml-option-static
161+
- os: ubuntu-latest
162+
ocaml_compiler: ocaml-variants.4.13.0+options,ocaml-option-static
148163

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

@@ -372,33 +387,33 @@ jobs:
372387
if: runner.os == 'Windows'
373388
run: node scripts/ciTest.js -mocha -theme -format
374389

375-
# Build the playground compiler on the fastest runner (ubuntu-latest)
376390
- name: Build playground compiler
377-
if: matrix.os == 'ubuntu-latest'
391+
if: matrix.build_playground
378392
run: |
379393
opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js
380394
opam exec -- dune build --profile browser
381395
cp ./_build/default/jscomp/jsoo/jsoo_playground_main.bc.js playground/compiler.js
382396
383397
- name: Test playground compiler
384-
if: matrix.os == 'ubuntu-latest'
398+
if: matrix.build_playground
385399
run: node playground/playground_test.js
386400

387401
- name: Upload playground compiler to CDN
388-
if: ${{ matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v') }}
402+
if: ${{ matrix.build_playground && startsWith(github.ref, 'refs/tags/v') }}
389403
env:
390404
KEYCDN_USER: ${{ secrets.KEYCDN_USER }}
391405
KEYCDN_PASSWORD: ${{ secrets.KEYCDN_PASSWORD }}
392406
run: bash playground/upload_bundle.sh
393407

394408
- name: "Upload artifacts: binaries"
409+
if: matrix.upload_binaries
395410
uses: actions/upload-artifact@v4
396411
with:
397412
name: binaries-${{ env.artifact_dir_name }}
398413
path: ${{ env.artifact_dir_name }}
399414

400415
- name: "Upload artifacts: lib/ocaml"
401-
if: runner.os == 'Linux'
416+
if: matrix.upload_libs
402417
uses: actions/upload-artifact@v4
403418
with:
404419
name: lib-ocaml

0 commit comments

Comments
 (0)