-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.49 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
61
62
63
64
name: Build and test
on:
pull_request:
push:
jobs:
nix-dev-build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Configure Dune
run: |
mkdir -p ~/.config/dune
cat <<EOF > ~/.config/dune/config
(lang dune 3.2)
(display short)
EOF
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix develop -c bash -c "dune build"
- run: nix develop -c bash -c "dune runtest"
opam-dev-build:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- "4.11.0"
- "4.14.1"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tree
uses: actions/checkout@v4
with:
submodules: true
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install deps
env:
OPAMYES: true
run: |
opam install ./jasmin-language-server.opam --deps-only --with-doc --with-test
- name: Build jasmin-language-server
run: |
eval $(opam env)
cd dune build
- name: Unit tests
run: |
eval $(opam env)
dune runtest