1818 - name : Set up Go
1919 uses : actions/setup-go@v5
2020 with :
21- go-version : " 1.23 "
21+ go-version-file : go.mod
2222 check-latest : true
2323 cache-dependency-path : go.sum
2424 id : go
3030 exit 1
3131 fi
3232
33- tracer :
34- name : Check that tracer is up-to-date
35- runs-on : ubuntu-24.04
36- strategy :
37- matrix :
38- target_arch : [amd64, arm64]
39- steps :
40- - name : Clone code
41- uses : actions/checkout@v4
42- - name : Set up environment
43- uses : ./.github/workflows/env
44- - name : Check that tracer is up-to-date
45- env :
46- TARGET_ARCH : ${{ matrix.target_arch }}
47- run : |
48- make -C support/ebpf
49- if [ -n "$(git status --porcelain)" ]; then
50- echo "run \"make -C support/ebpf\"."
51- exit 1
52- fi
53-
5433 lint :
5534 name : Lint (${{ matrix.target_arch }})
5635 runs-on : ubuntu-24.04
6544 - name : Set up Go
6645 uses : actions/setup-go@v5
6746 with :
68- go-version : " 1.23 "
47+ go-version-file : go.mod
6948 check-latest : true
7049 cache-dependency-path : go.sum
7150 id : go
7958 CGO_ENABLED : 1
8059 with :
8160 version : ${{ steps.linter-version.outputs.version }}
61+ - name : Lint eBPF code
62+ run : |
63+ sudo apt update
64+ sudo apt install -y clang-format-17
65+ make lint -C support/ebpf
8266
8367 test :
8468 name : Test (${{ matrix.target_arch }})
@@ -102,8 +86,56 @@ jobs:
10286 - name : Tests
10387 run : make test TARGET_ARCH=${{ matrix.target_arch }}
10488
89+ test-rust :
90+ name : Test rust components
91+ runs-on : ubuntu-24.04
92+ steps :
93+ - name : Clone code
94+ uses : actions/checkout@v4
95+ - name : Install Rust
96+ uses : dtolnay/rust-toolchain@stable
97+ - name : Install protoc
98+ env :
99+ PB_URL : " https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
100+ PB_FILE : " protoc-24.4-linux-x86_64.zip"
101+ INSTALL_DIR : " /usr/local"
102+ run : |
103+ wget -q "$PB_URL/$PB_FILE"
104+ sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
105+ sudo chmod +xr "$INSTALL_DIR/bin/protoc"
106+ sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
107+ sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
108+ rm "$PB_FILE"
109+ - name : Tests
110+ run : |
111+ cargo test
112+
113+ check-ebpf-blobs :
114+ name : Check for differences in the eBPF binary blobs
115+ runs-on : ubuntu-24.04
116+ container : otel/opentelemetry-ebpf-profiler-dev:latest
117+ steps :
118+ - name : Clone code
119+ uses : actions/checkout@v4
120+ - name : Hash eBPF blobs
121+ run : |
122+ sha256sum support/ebpf/tracer.ebpf.release.* > ebpf-blobs.hash
123+ cat ebpf-blobs.hash
124+ - name : Rebuild eBPF blobs
125+ run : |
126+ rm support/ebpf/tracer.ebpf.release.*
127+ make amd64 -C support/ebpf
128+ make arm64 -C support/ebpf
129+ - name : Check for differences
130+ run : |
131+ if ! sha256sum --check ebpf-blobs.hash; then
132+ echo "Please rebuild and commit the updated eBPF binary blobs."
133+ exit 1
134+ fi
135+
136+
105137 build-integration-test-binaries :
106- name : Build integration test binaries (${{ matrix.target_arch }})
138+ name : Build integration test binaries (${{ matrix.target_arch }}-go${{ matrix.go_version}} )
107139 runs-on : ubuntu-24.04
108140 timeout-minutes : 10
109141 strategy :
@@ -131,7 +163,7 @@ jobs:
131163 path : support/*.test
132164
133165 integration-tests :
134- name : Integration tests (v${{ matrix.kernel }} ${{ matrix.target_arch }})
166+ name : Integration tests (v${{ matrix.kernel }} ${{ matrix.target_arch }} ${{ matrix.go_version}} )
135167 runs-on : ubuntu-24.04
136168 needs : build-integration-test-binaries
137169 timeout-minutes : 10
@@ -159,10 +191,9 @@ jobs:
159191 steps :
160192 - name : Clone code
161193 uses : actions/checkout@v4
162- - name : Set up environment
163- uses : ./.github/workflows/env
164194 - name : Install dependencies
165195 run : |
196+ sudo apt-get update
166197 case "${{ matrix.target_arch }}" in
167198 amd64) sudo apt-get -y install qemu-system-x86;;
168199 arm64) sudo apt-get -y install qemu-system-arm;;
0 commit comments