Skip to content

Commit 2dc850a

Browse files
committed
Add github CI script
1 parent 27172f2 commit 2dc850a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
ocaml-compiler:
17+
- "4.13.x"
18+
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout tree
23+
uses: actions/checkout@v4
24+
25+
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
26+
uses: ocaml/setup-ocaml@v3
27+
with:
28+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
29+
opam-repositories: |
30+
default: https://github.com/ocaml/opam-repository.git
31+
32+
- name: Install system dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libelf-dev zlib1g-dev libbpf-dev
36+
37+
- name: Install dependencies
38+
run: |
39+
opam install dune menhir alcotest
40+
opam install . --deps-only
41+
42+
- name: Build project
43+
run: eval $(opam env) && dune build
44+
45+
- name: Run tests
46+
run: eval $(opam env) && dune build @tests
47+
48+
- name: Run example tests
49+
run: eval $(opam env) && bash tests/test_all_examples.sh || true
50+
continue-on-error: true

0 commit comments

Comments
 (0)