-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 2.12 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: CI Build
on:
pull_request:
branches: [main]
push:
branches: [main]
# Checks if any concurrent jobs under the same pull request or branch are being executed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: build syscalls-bumper
runs-on: ubuntu-latest
steps:
- name: Checkout libs ⤵️
uses: actions/checkout@v4
with:
repository: falcosecurity/libs
path: ${{ github.workspace }}/libs
- name: Checkout syscalls-bumper repo ⤵️
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/syscalls-bumper
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ github.workspace }}/syscalls-bumper/go.mod'
- name: Install deps ⛓️
run: |
sudo apt update
sudo apt install -y --no-install-recommends ca-certificates cmake build-essential clang llvm pkg-config autoconf automake libtool libelf-dev libcap-dev linux-headers-$(uname -r)
- name: Build syscalls-bumper
working-directory: ${{ github.workspace }}/syscalls-bumper
run: make build
- name: Execute syscalls-bumper against local libs
working-directory: ${{ github.workspace }}/syscalls-bumper
run: ./build/syscalls-bumper --repo-root $GITHUB_WORKSPACE/libs --overwrite
- name: Generate diff
working-directory: ${{ github.workspace }}/libs
run: git diff > syscalls-bumper.diff
- name: Upload diff tarball
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: libs-diff
path: ${{ github.workspace }}/libs/syscalls-bumper.diff
- name: Test scap-open build
working-directory: ${{ github.workspace }}/libs
run: |
mkdir build && cd build
cmake -DUSE_BUNDLED_DEPS=On -DBUILD_BPF=On -DBUILD_LIBSCAP_MODERN_BPF=On -DBUILD_LIBSCAP_GVISOR=Off ../
make driver
make bpf
make scap-open -j8