From c028af0a23d098b1e46b41af6f2f2dc4aa6fe73f Mon Sep 17 00:00:00 2001 From: Jaap Frolich Date: Fri, 17 May 2024 09:59:06 +0200 Subject: [PATCH] use the set-up ocaml --- .github/workflows/pipeline.yml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 54fb50e2..2a36e81e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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 @@ -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 @@ -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: