-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (54 loc) · 1.3 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Main workflow
on:
pull_request:
push:
branches:
- master
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
permissions: read-all
env:
OPAMVAR_jobs: 8
jobs:
build:
strategy:
fail-fast: false
matrix:
ocaml-compiler:
- "5.0"
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v3
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Instal deps
run: |
opam install . --deps-only --with-test
- name: Build
run: |
opam exec -- dune build
- name: Test
run: |
opam exec -- dune runtest
check-nix:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v3
- uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
max-jobs = auto
cores = 0
# Use cachix
# see https://nix.dev/tutorials/continuous-integration-github-actions#caching-builds-using-cachix
- uses: cachix/cachix-action@v12
with:
name: nloge-cache
authToken: '${{ secrets.CACHIX_TOKEN }}'
- name: Check nix
run: nix develop -c true