-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (37 loc) · 1.16 KB
/
test.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
on: [pull_request]
name: gmon test
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: docker build -t gmonbuildenv -f Dockerfile.buildenv .
- name: Format gmon
run: |
docker run --rm -v ${{ github.workspace }}:/src \
-e GOFLAGS="-buildvcs=false" \
gmonbuildenv \
script/format.sh
- name: Build gmon
run: |
docker run --rm -v ${{ github.workspace }}:/src \
-e GOFLAGS="-buildvcs=false" \
-e BPF_CLANG="clang" \
-e BPF_CFLAGS="-O2 -g -Wall -Werror" \
gmonbuildenv \
script/build.sh
- name: Check changes
run: |
if ! git diff --quiet || ! git diff --staged --quiet; then
echo "Changes detected"
uname -a
git diff
git diff --staged
exit 1
fi
- run: docker build -t gmone2e -f Dockerfile.e2e .
- name: Run e2e tests
run: |
docker run --rm --privileged -v ${{ github.workspace }}/bin/gmon:/usr/bin/gmon -v /sys/kernel/debug:/sys/kernel/debug:ro gmone2e