Fix /prod -> /proc for processInfo (#439) #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["**"] | |
jobs: | |
legal: | |
name: Check licenses of dependencies | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: ./.github/workflows/env | |
- name: Check for changes in licenses of dependencies | |
run: | | |
make legal | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "run \"make legal\"." | |
exit 1 | |
fi | |
lint: | |
name: Lint (${{ matrix.target_arch }}) | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
target_arch: [amd64, arm64] | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: ./.github/workflows/env | |
- name: Get linter version | |
id: linter-version | |
run: (echo -n "version="; make linter-version) >> "$GITHUB_OUTPUT" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
env: | |
GOARCH: ${{ matrix.target-arch }} | |
CGO_ENABLED: 1 | |
with: | |
version: ${{ steps.linter-version.outputs.version }} | |
- name: Lint eBPF code | |
run: | | |
sudo apt update | |
sudo apt install -y clang-format-17 | |
make lint -C support/ebpf | |
test: | |
name: Test (${{ matrix.target_arch }}) | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
target_arch: [amd64, arm64] | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: ./.github/workflows/env | |
- name: Cache coredump modules | |
uses: actions/cache@v4 | |
with: | |
path: tools/coredump/modulecache | |
key: coredumps-${{ matrix.target_arch }}-${{ hashFiles('tools/coredump/testdata/*/*.json') }} | |
restore-keys: | | |
coredumps-${{ matrix.target_arch }} | |
coredumps- | |
- name: Direct Rust test | |
run: make rust-tests | |
- name: Tests | |
run: make test TARGET_ARCH=${{ matrix.target_arch }} | |
check-binary-blobs: | |
name: Check for differences in the eBPF and Rust binary blobs | |
runs-on: ubuntu-24.04 | |
container: otel/opentelemetry-ebpf-profiler-dev:latest | |
defaults: | |
run: | |
shell: bash --login {0} | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Hash binary blobs | |
run: | | |
sha256sum support/ebpf/tracer.ebpf.release.* > binary-blobs.hash | |
sha256sum target/x86_64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash | |
sha256sum target/aarch64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash | |
- name: Rebuild eBPF blobs | |
run: | | |
rm support/ebpf/tracer.ebpf.release.* | |
make amd64 -C support/ebpf | |
make arm64 -C support/ebpf | |
- name: Rebuild Rust blobs | |
run: | | |
rm -rf target/ | |
make rust-components TARGET_ARCH=amd64 | |
make rust-components TARGET_ARCH=arm64 | |
- name: Check for differences | |
run: | | |
if ! sha256sum --check binary-blobs.hash; then | |
echo "Please rebuild and commit the updated binary blobs." | |
exit 1 | |
fi | |
build-integration-test-binaries: | |
name: Build integration test binaries (${{ matrix.target_arch }}) | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
target_arch: [amd64, arm64] | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: ./.github/workflows/env | |
- name: Prepare integration test binaries for qemu tests | |
run: make integration-test-binaries TARGET_ARCH=${{ matrix.target_arch }} | |
- name: Upload integration test binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: integration-test-binaries-${{ matrix.target_arch }} | |
path: support/*.test | |
integration-tests: | |
name: Integration tests (v${{ matrix.kernel }} ${{ matrix.target_arch }}) | |
runs-on: ubuntu-24.04 | |
needs: build-integration-test-binaries | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
include: | |
# List of available kernels here: | |
# https://github.com/cilium/ci-kernels/pkgs/container/ci-kernels/versions?filters%5Bversion_type%5D=tagged | |
# AMD64 | |
- { target_arch: amd64, kernel: 4.19.314 } | |
- { target_arch: amd64, kernel: 5.4.276 } | |
- { target_arch: amd64, kernel: 5.10.217 } | |
- { target_arch: amd64, kernel: 5.15.159 } | |
- { target_arch: amd64, kernel: 6.1.91 } | |
- { target_arch: amd64, kernel: 6.6.31 } | |
- { target_arch: amd64, kernel: 6.8.10 } | |
- { target_arch: amd64, kernel: 6.9.1 } | |
- { target_arch: amd64, kernel: 6.12.16 } | |
# ARM64 (NOTE: older ARM64 kernels are not available in Cilium repos) | |
- { target_arch: arm64, kernel: 6.6.31 } | |
- { target_arch: arm64, kernel: 6.8.4 } | |
- { target_arch: arm64, kernel: 6.9.1 } | |
- { target_arch: arm64, kernel: 6.12.16 } | |
steps: | |
- name: Clone code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
case "${{ matrix.target_arch }}" in | |
amd64) sudo apt-get -y install qemu-system-x86;; | |
arm64) sudo apt-get -y install qemu-system-arm;; | |
*) echo >&2 "bug: bad arch selected"; exit 1;; | |
esac | |
go install github.com/florianl/[email protected] | |
sudo mv ~/go/bin/bluebox /usr/local/bin/. | |
- name: Fetch integration test binaries | |
uses: actions/download-artifact@v4 | |
with: { name: "integration-test-binaries-${{ matrix.target_arch }}" } | |
- name: Fetch precompiled kernel | |
run: | | |
install -d ci-kernels | |
echo "FROM ghcr.io/cilium/ci-kernels:${{ matrix.kernel }}" \ | |
| docker buildx build --platform linux/${{ matrix.target_arch }} \ | |
--quiet --pull --output="ci-kernels" - | |
mv ci-kernels/boot/ ci-kernels/${{ matrix.kernel }}/ | |
- name: Test on kernel ${{ matrix.kernel }} | |
run: | | |
chmod a+rx *.test | |
case "${{ matrix.target_arch }}" in | |
amd64) export QEMU_ARCH=x86_64;; | |
arm64) export QEMU_ARCH=aarch64;; | |
*) echo >&2 "bug: bad arch selected"; exit 1;; | |
esac | |
support/run-tests.sh ${{ matrix.kernel }} |