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
6565 - name : Set up Go
6666 uses : actions/setup-go@v5
6767 with :
68- go-version : " 1.23 "
68+ go-version-file : go.mod
6969 check-latest : true
7070 cache-dependency-path : go.sum
7171 id : go
7979 CGO_ENABLED : 1
8080 with :
8181 version : ${{ steps.linter-version.outputs.version }}
82+ - name : Lint eBPF code
83+ run : |
84+ sudo apt update
85+ sudo apt install -y clang-format-17
86+ make lint -C support/ebpf
8287
8388 test :
8489 name : Test (${{ matrix.target_arch }})
@@ -102,6 +107,53 @@ jobs:
102107 - name : Tests
103108 run : make test TARGET_ARCH=${{ matrix.target_arch }}
104109
110+ test-rust :
111+ name : Test rust components
112+ runs-on : ubuntu-24.04
113+ steps :
114+ - name : Clone code
115+ uses : actions/checkout@v4
116+ - name : Install Rust
117+ uses : dtolnay/rust-toolchain@stable
118+ - name : Install protoc
119+ env :
120+ PB_URL : " https://github.com/protocolbuffers/protobuf/releases/download/v24.4/"
121+ PB_FILE : " protoc-24.4-linux-x86_64.zip"
122+ INSTALL_DIR : " /usr/local"
123+ run : |
124+ wget -q "$PB_URL/$PB_FILE"
125+ sudo unzip "$PB_FILE" -d "$INSTALL_DIR" 'bin/*' 'include/*'
126+ sudo chmod +xr "$INSTALL_DIR/bin/protoc"
127+ sudo find "$INSTALL_DIR/include" -type d -exec chmod +x {} \;
128+ sudo find "$INSTALL_DIR/include" -type f -exec chmod +r {} \;
129+ rm "$PB_FILE"
130+ - name : Tests
131+ run : |
132+ cargo test
133+
134+ check-ebpf-blobs :
135+ name : Check for differences in the eBPF binary blobs
136+ runs-on : ubuntu-24.04
137+ container : otel/opentelemetry-ebpf-profiler-dev:latest
138+ steps :
139+ - name : Clone code
140+ uses : actions/checkout@v4
141+ - name : Hash eBPF blobs
142+ run : |
143+ sha256sum support/ebpf/tracer.ebpf.release.* > ebpf-blobs.hash
144+ - name : Rebuild eBPF blobs
145+ run : |
146+ rm support/ebpf/tracer.ebpf.release.*
147+ make amd64 -C support/ebpf
148+ make arm64 -C support/ebpf
149+ - name : Check for differences
150+ run : |
151+ if ! sha256sum --check ebpf-blobs.hash; then
152+ echo "Please rebuild and commit the updated eBPF binary blobs."
153+ exit 1
154+ fi
155+
156+
105157 build-integration-test-binaries :
106158 name : Build integration test binaries (${{ matrix.target_arch }})
107159 runs-on : ubuntu-24.04
@@ -159,8 +211,6 @@ jobs:
159211 steps :
160212 - name : Clone code
161213 uses : actions/checkout@v4
162- - name : Set up environment
163- uses : ./.github/workflows/env
164214 - name : Install dependencies
165215 run : |
166216 case "${{ matrix.target_arch }}" in
0 commit comments