Skip to content

Commit c028af0

Browse files
committed
use the set-up ocaml
1 parent 92ee3e5 commit c028af0

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

.github/workflows/pipeline.yml

+12-21
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
matrix:
1111
node-version: [16.x]
1212
os: [ubuntu-latest]
13+
ocaml-compiler: ["5.1"]
1314

1415
container:
1516
image: alexfedoseev/alpine-node-yarn-esy:0.0.4
@@ -21,30 +22,17 @@ jobs:
2122
with:
2223
node-version: ${{ matrix.node-version }}
2324

24-
- name: Add tar
25-
run: apk add --no-cache tar
26-
- name: Install
27-
run: esy install
28-
29-
- name: Print esy cache
30-
id: print_esy_cache
31-
run: node .github/workflows/print_esy_cache.js
32-
33-
- name: Try to restore dependencies cache
34-
uses: actions/cache@v2
35-
id: deps-cache
25+
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
26+
uses: ocaml/setup-ocaml@v2
3627
with:
37-
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
38-
key: ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
39-
restore-keys: |
40-
${{ matrix.os }}-
28+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4129

42-
- name: build
43-
run: esy b
30+
- run: opam install . --deps-only --with-test
31+
32+
- run: opam exec -- dune build
4433

4534
- name: native tests
46-
run: |
47-
esy b dune runtest -f
35+
run: opam exec -- dune runtest -f
4836
env:
4937
CI: true
5038

@@ -53,9 +41,12 @@ jobs:
5341
GRAPHQL_CI: true
5442
run: |
5543
npm ci --no-optional --ignore-scripts
56-
esy test
44+
./tests.sh
5745
esy release-static
5846
47+
- name: Release build
48+
run: opam exec -- dune build --root . --only-packages 'graphql-ppx' --ignore-promoted-rules --no-config --profile release-static
49+
5950
- name: (only on release) Upload artifacts ${{ matrix.os }}
6051
uses: actions/upload-artifact@master
6152
with:

0 commit comments

Comments
 (0)