File tree Expand file tree Collapse file tree 4 files changed +89
-0
lines changed
Expand file tree Collapse file tree 4 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Tests (DAILY)
2+
3+ on :
4+ workflow_dispatch : {}
5+ schedule :
6+ # Daily at 03:00
7+ - cron : ' 0 3 * * *'
8+ workflow_call :
9+
10+ env :
11+ GO_VERSION : " 1.17"
12+ OPA_VERSION : " v0.41.0"
13+
14+ jobs :
15+ compile-tracee :
16+ name : Test Latest libbpfgo
17+ runs-on : ubuntu-20.04
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v2
21+ with :
22+ submodules : true
23+ - name : Install Dependencies
24+ uses : ./.github/actions/build-dependencies
25+ with :
26+ go-version : ${{ env.GO_VERSION }}
27+ opa-version : ${{ env.OPA_VERSION }}
28+ - name : Compile Tracee
29+ run : |
30+ make test-upstream-libbpfgo
Original file line number Diff line number Diff line change @@ -655,6 +655,13 @@ test-rules: \
655655#
656656 $(CMD_OPA) test $(REGO_SIGNATURES_DIR) --verbose
657657
658+ .PHONY : test-upstream-libbpfgo
659+ test-upstream-libbpfgo : \
660+ .checkver_$(CMD_GO ) \
661+ $(OUTPUT_DIR ) /libbpf/libbpf.a
662+ #
663+ ./tests/libbpfgo.sh $(GO_ENV_EBPF)
664+
658665#
659666# code checkers (hidden from help on purpose)
660667#
Original file line number Diff line number Diff line change 77[ ![ Test Signatures] ( https://github.com/aquasecurity/tracee/actions/workflows/test-signatures.yaml/badge.svg )] ( https://github.com/aquasecurity/tracee/actions/workflows/test-signatures.yaml )
88[ ![ Release Snapshot] ( https://github.com/aquasecurity/tracee/actions/workflows/release-snapshot.yaml/badge.svg )] ( https://github.com/aquasecurity/tracee/actions/workflows/release-snapshot.yaml )
99[ ![ OS Packages (DAILY)] ( https://github.com/aquasecurity/tracee/actions/workflows/test-os-packaging-daily.yaml/badge.svg )] ( https://github.com/aquasecurity/tracee/actions/workflows/test-os-packaging-daily.yaml )
10+ [ ![ Tests (DAILY)] ( https://github.com/aquasecurity/tracee/actions/workflows/test-daily.yaml/badge.svg )] ( https://github.com/aquasecurity/tracee/actions/workflows/test-daily.yaml )
1011
1112# Tracee: Runtime Security and Forensics using eBPF
1213
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ #
4+ # This test attempts to compile tracee using upstream libbpfgo.
5+ # It's run by github workflows inside action runners, just as
6+ # it can be run locally. In both cases it must be triggered by
7+ # 'make test-upstream-libbpfgo'.
8+ #
9+
10+ info () {
11+ echo -n " INFO: "
12+ echo " $@ "
13+ }
14+
15+ error_exit () {
16+ echo -n " ERROR: "
17+ echo " $@ "
18+ exit 1
19+ }
20+
21+ git_setup () {
22+ git add go.mod go.sum
23+ if ! go get github.com/aquasecurity/libbpfgo@main;
24+ then
25+ git restore --staged go.mod go.sum
26+ error_exit " could not go get libbpfgo@main"
27+ fi
28+ }
29+
30+ git_restore () {
31+ git checkout go.mod go.sum
32+ git restore --staged go.mod go.sum
33+ }
34+
35+ BASE_DIR=" $( dirname " $( realpath " ${0} " ) " ) "
36+ TRACEE_DIR=" $( realpath " ${BASE_DIR} " /..) "
37+ GO_ENV_EBPF=( " $@ " )
38+ export " ${GO_ENV_EBPF[@]} "
39+
40+ git_setup
41+ trap git_restore ERR
42+
43+ set -e
44+ STATIC=1 make -C " ${TRACEE_DIR} "
45+ set +e
46+
47+ git_restore
48+
49+ info " SUCCESS"
50+
51+ exit 0
You can’t perform that action at this time.
0 commit comments