-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.15 KB
/
main-workflow.yaml
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
name: "Main workflow"
on:
pull_request:
branches:
- "master"
push:
branches:
- "master"
jobs:
nix-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: nix build
- name: Build docker image
run: nix build .#staticDocker
- name: Build static
run: nix build .#static
- name: Build docker image of static
run: nix build .#staticDocker
- name: Test
run: nix develop --command dune runtest
- name: Check
run: nix flake check
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ocaml/setup-ocaml@v2
with:
# Gmp built with musl is required to get the static binary.
# Obtaining it through Opam is difficult, so building static binary is
# not checked here for now.
ocaml-compiler: "5.0"
- run: opam install . --deps-only --with-test
- name: Build
run: opam exec -- dune build
- name: Test
run: opam exec -- dune runtest