66 pull_request :
77 branches : ["**"]
88
9+ permissions :
10+ contents : read
11+
912jobs :
1013 legal :
1114 name : Check licenses of dependencies
1215 runs-on : ubuntu-24.04
1316 steps :
1417 - name : Clone code
15- uses : actions/checkout@v4
18+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1619 - name : Set up environment
1720 uses : ./.github/workflows/env
1821 - name : Check for changes in licenses of dependencies
@@ -31,24 +34,20 @@ jobs:
3134 target_arch : [amd64, arm64]
3235 steps :
3336 - name : Clone code
34- uses : actions/checkout@v4
37+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3538 - name : Set up environment
3639 uses : ./.github/workflows/env
3740 - name : Get linter version
3841 id : linter-version
3942 run : (echo -n "version="; make linter-version) >> "$GITHUB_OUTPUT"
40- - name : golangci-lint
41- uses : golangci/golangci-lint-action@v6
43+ - name : linter
4244 env :
4345 GOARCH : ${{ matrix.target-arch }}
4446 CGO_ENABLED : 1
45- with :
46- version : ${{ steps.linter-version.outputs.version }}
47- - name : Lint eBPF code
4847 run : |
4948 sudo apt update
5049 sudo apt install -y clang-format-17
51- make lint -C support/ebpf
50+ make lint
5251
5352 test :
5453 name : Test (${{ matrix.target_arch }})
@@ -58,53 +57,65 @@ jobs:
5857 target_arch : [amd64, arm64]
5958 steps :
6059 - name : Clone code
61- uses : actions/checkout@v4
60+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6261 - name : Set up environment
6362 uses : ./.github/workflows/env
63+ with :
64+ skip_rust : true
6465 - name : Cache coredump modules
65- uses : actions/cache@v4
66+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6667 with :
6768 path : tools/coredump/modulecache
6869 key : coredumps-${{ matrix.target_arch }}-${{ hashFiles('tools/coredump/testdata/*/*.json') }}
6970 restore-keys : |
7071 coredumps-${{ matrix.target_arch }}
7172 coredumps-
72- - name : Direct Rust test
73- run : make rust-tests
7473 - name : Tests
7574 run : make test TARGET_ARCH=${{ matrix.target_arch }}
7675
76+ rust-test :
77+ name : Rust Tests (${{ matrix.target_arch }})
78+ runs-on : ubuntu-24.04
79+ strategy :
80+ matrix :
81+ target_arch : [amd64, arm64]
82+ steps :
83+ - name : Clone code
84+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
85+ - name : Set up environment
86+ uses : ./.github/workflows/env
87+ - name : Tests
88+ run : make rust-tests
89+
7790 check-binary-blobs :
78- name : Check for differences in the eBPF and Rust binary blobs
91+ name : Check for differences in the eBPF binary blobs
7992 runs-on : ubuntu-24.04
80- container : otel/opentelemetry-ebpf-profiler-dev:latest
93+ container : otel/opentelemetry-ebpf-profiler-dev:latest@sha256:acce547f366150eb25392e1aff270df430ef6b759baeb4292999116018e70e6e
8194 defaults :
8295 run :
8396 shell : bash --login {0}
8497 steps :
8598 - name : Clone code
86- uses : actions/checkout@v4
99+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87100 - name : Hash binary blobs
88101 run : |
89- sha256sum support/ebpf/tracer.ebpf.release.* > binary-blobs.hash
90- sha256sum target/x86_64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash
91- sha256sum target/aarch64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash
102+ sha256sum support/ebpf/tracer.ebpf.* > binary-blobs.hash
92103 - name : Rebuild eBPF blobs
93104 run : |
94- rm support/ebpf/tracer.ebpf.release. *
105+ rm support/ebpf/tracer.ebpf.*
95106 make amd64 -C support/ebpf
96107 make arm64 -C support/ebpf
97- - name : Rebuild Rust blobs
98- run : |
99- rm -rf target/
100- make rust-components TARGET_ARCH=amd64
101- make rust-components TARGET_ARCH=arm64
102108 - name : Check for differences
103109 run : |
104110 if ! sha256sum --check binary-blobs.hash; then
105111 echo "Please rebuild and commit the updated binary blobs."
106112 exit 1
107113 fi
114+ - if : failure()
115+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
116+ with :
117+ name : binary-blobs
118+ path : support/ebpf/tracer.ebpf.*
108119
109120 build-integration-test-binaries :
110121 name : Build integration test binaries (${{ matrix.target_arch }})
@@ -115,13 +126,13 @@ jobs:
115126 target_arch : [amd64, arm64]
116127 steps :
117128 - name : Clone code
118- uses : actions/checkout@v4
129+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119130 - name : Set up environment
120131 uses : ./.github/workflows/env
121132 - name : Prepare integration test binaries for qemu tests
122133 run : make integration-test-binaries TARGET_ARCH=${{ matrix.target_arch }}
123134 - name : Upload integration test binaries
124- uses : actions/upload-artifact@v4
135+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
125136 with :
126137 name : integration-test-binaries-${{ matrix.target_arch }}
127138 path : support/*.test
@@ -138,7 +149,6 @@ jobs:
138149 # https://github.com/cilium/ci-kernels/pkgs/container/ci-kernels/versions?filters%5Bversion_type%5D=tagged
139150
140151 # AMD64
141- # - { target_arch: amd64, kernel: 4.19.314 }
142152 - { target_arch: amd64, kernel: 5.4.276 }
143153 - { target_arch: amd64, kernel: 5.10.217 }
144154 - { target_arch: amd64, kernel: 5.15.159 }
@@ -155,7 +165,7 @@ jobs:
155165 - { target_arch: arm64, kernel: 6.12.16 }
156166 steps :
157167 - name : Clone code
158- uses : actions/checkout@v4
168+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
159169 - name : Install dependencies
160170 run : |
161171 sudo apt-get update -y
@@ -167,7 +177,7 @@ jobs:
167177 go install github.com/florianl/[email protected] 168178 sudo mv ~/go/bin/bluebox /usr/local/bin/.
169179 - name : Fetch integration test binaries
170- uses : actions/download-artifact@v4
180+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
171181 with : { name: "integration-test-binaries-${{ matrix.target_arch }}" }
172182 - name : Fetch precompiled kernel
173183 run : |
0 commit comments