-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.02 KB
/
ci.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
44
45
name: ci
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
name: Test
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
check-latest: true
- name: Static Check
run: |
if ! command -v staticcheck &> /dev/null; then
go install honnef.co/go/tools/cmd/staticcheck@latest
fi
staticcheck ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install LLVM
env:
LLVM_VERSION: "15.0.7"
run: |
ID="$(docker create --name llvm ghcr.io/vietanhduong/wbpf-llvm:${LLVM_VERSION} bash -l)"
sudo docker cp "$ID:/usr/local/bin/clang" /usr/local/bin
docker rm $ID
- name: Run Test
run: |
sudo apt-get install -y make && \
make test &&
make build-examples