Merge pull request #78 from hyperpolymath/fix/ci-corrective #182
This file contains hidden or 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
| # SPDX-License-Identifier: PMPL-1.0-or-later | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up OCaml | |
| uses: ocaml/setup-ocaml@e32b06a3e831ff2fbc6f08cf35be2085e3918014 # v3 | |
| with: | |
| ocaml-compiler: "5.1" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: opam install . --deps-only --with-test --with-doc | |
| - name: Build | |
| run: opam exec -- dune build | |
| - name: Run tests | |
| run: opam exec -- dune runtest | |
| - name: Run codegen WASM tests | |
| run: opam exec -- ./tools/run_codegen_wasm_tests.sh | |
| - name: Run face-transformer regression tests | |
| run: opam exec -- ./tools/run_face_transformer_tests.sh | |
| - name: Check formatting | |
| run: opam exec -- dune build @fmt | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up OCaml | |
| uses: ocaml/setup-ocaml@e32b06a3e831ff2fbc6f08cf35be2085e3918014 # v3 | |
| with: | |
| ocaml-compiler: "5.1" | |
| - name: Install dependencies | |
| # Match the build job: `dune build` compiles everything including | |
| # test/ (which depends on alcotest, with-test) and the @doc target | |
| # below (which depends on odoc, with-doc). Without these flags, lint | |
| # fails on missing alcotest before it ever reaches the doc step. | |
| run: opam install . --deps-only --with-test --with-doc | |
| - name: Build | |
| run: opam exec -- dune build | |
| - name: Lint with odoc | |
| run: opam exec -- dune build @doc | |
| continue-on-error: true |