Skip to content

Commit

Permalink
use the set-up ocaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrolich committed May 17, 2024
1 parent 92ee3e5 commit c028af0
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
ocaml-compiler: ["5.1"]

container:
image: alexfedoseev/alpine-node-yarn-esy:0.0.4
Expand All @@ -21,30 +22,17 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Add tar
run: apk add --no-cache tar
- name: Install
run: esy install

- name: Print esy cache
id: print_esy_cache
run: node .github/workflows/print_esy_cache.js

- name: Try to restore dependencies cache
uses: actions/cache@v2
id: deps-cache
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
restore-keys: |
${{ matrix.os }}-
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: build
run: esy b
- run: opam install . --deps-only --with-test

- run: opam exec -- dune build

- name: native tests
run: |
esy b dune runtest -f
run: opam exec -- dune runtest -f
env:
CI: true

Expand All @@ -53,9 +41,12 @@ jobs:
GRAPHQL_CI: true
run: |
npm ci --no-optional --ignore-scripts
esy test
./tests.sh
esy release-static
- name: Release build
run: opam exec -- dune build --root . --only-packages 'graphql-ppx' --ignore-promoted-rules --no-config --profile release-static

- name: (only on release) Upload artifacts ${{ matrix.os }}
uses: actions/upload-artifact@master
with:
Expand Down

0 comments on commit c028af0

Please sign in to comment.