hotfix for js_of_ocaml#1589 #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
check: | |
strategy: | |
fail-fast: false | |
matrix: | |
ocaml-version: | |
- 4.13.1 | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/kxcteam/ocaml-general:${{ matrix.ocaml-version }} | |
timeout-minutes: 25 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# https://github.blog/2022-04-12-git-security-vulnerability-announced/ | |
- name: Set safe directory | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Initialize submodules | |
run: git submodule update --init | |
- name: Check OCaml version and workspace info | |
run: ./scripts/ci_print_env.sh | |
- name: Install OPAM dependencies | |
run: | | |
opam uninstall -y brr | |
opam install -y . --deps-only --with-test || (opam update && opam install -y . --deps-only --with-test) | |
- name: Perform dune build | |
run: opam exec -- dune build | |
- name: Perform dune runtest | |
run: opam exec -- dune runtest | |
matrix-check: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-version: | |
- 4.08.1 | |
- 4.13.1 | |
- 4.14.0 | |
- 5.0.0 | |
node-version: | |
# - lts/fermium # v14 Maintenance LTS | |
- lts/gallium # v16 Active LTS | |
# - lts/hydrogen # v18 Active LTS | |
if: github.event.pull_request.draft == false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 2 | |
- name: Use OCaml ${{ matrix.ocaml-version }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-version }} | |
- name: Cache OPAM switch | |
id: cache-switch | |
uses: actions/cache@v3 | |
with: | |
path: _opam | |
key: v1-${{ runner.os }}-${{ matrix.ocaml-version }}-opam-switch | |
- name: Check OCaml version and workspace info | |
run: ./scripts/ci_print_env.sh | |
- name: Install dependencies | |
run: opam install -y . --deps-only --with-test | |
- name: Perform dune build | |
run: opam exec -- dune build | |
- name: Perform dune runtest | |
run: opam exec -- dune runtest |