Repository navigation
dev: merge PR #5 (shared-api-parity) #157
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: OCaml ${{ matrix.ocaml-compiler }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ocaml-compiler: ["5.5.1"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up OCaml | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| dune-cache: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev liblmdb-dev pkg-config | |
| - name: Restore opam switch cache | |
| id: opam-cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.opam | |
| key: ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}-opam-${{ hashFiles('*.opam') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ocaml-${{ matrix.ocaml-compiler }}-opam- | |
| - name: Install OCaml dependencies | |
| run: opam install . --deps-only --with-test -y | |
| - name: Save opam switch cache | |
| if: steps.opam-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.opam | |
| key: ${{ steps.opam-cache.outputs.cache-primary-key }} | |
| - name: Run tests | |
| run: opam exec -- dune runtest | |
| - name: Check opam -p package builds | |
| run: | | |
| opam exec -- dune build -p datascript_ocaml | |
| opam exec -- dune build -p datascript_ocaml,datascript-ocaml-native | |
| opam exec -- dune build -p datascript_ocaml,datascript-ocaml-native,datascript-ocaml-native-sqlite | |
| opam exec -- dune build -p datascript_ocaml,datascript-ocaml-melange | |
| opam exec -- dune build -p datascript_ocaml,datascript-ocaml-melange,datascript-ocaml-melange-sqlite |