From 6c0bf0e6467ffd67b93fdf0ae521c2b6f53e5c6e Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 10 Oct 2024 09:47:47 +0200 Subject: [PATCH] ci: Run integration tests on Alpine This way we are making sure that the integration tests infra doesn't regress on musl environments. --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7704179b9..15f0dc82e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -194,14 +194,24 @@ jobs: - target: x86_64-unknown-linux-gnu # We don't use ubuntu-latest because we care about the apt packages available. os: ubuntu-22.04 + - target: x86_64-unknown-linux-musl + os: ubuntu-22.04 + container: docker.io/alpine:3.20 runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} steps: + - name: Install git + if: runner.os == 'Linux' && contains(matrix.container, 'alpine') + run: | + set -euxo pipefail + apk add git + - uses: actions/checkout@v4 with: submodules: recursive - name: Install prerequisites - if: runner.os == 'Linux' + if: runner.os == 'Linux' && matrix.container == '' # ubuntu-22.04 comes with clang 13-15[0]; support for signed and 64bit # enum values was added in clang 15[1] which isn't in `$PATH`. # @@ -216,6 +226,24 @@ jobs: sudo apt -y install gcc-multilib locate qemu-system-{arm,x86} echo /usr/lib/llvm-15/bin >> $GITHUB_PATH + - name: Install prerequisites + if: runner.os == 'Linux' && contains(matrix.container, 'alpine') + # Use clang for building the C eBPF programs for integration tests. + # Use gcc with binutils as the linker and libgcc_s as the runtime + # library. + run: | + set -euxo pipefail + apk add \ + bash \ + clang \ + curl \ + dpkg \ + gcc \ + jq \ + qemu-system-arm \ + qemu-system-x86_64 \ + wget + - name: Install prerequisites if: runner.os == 'macOS' # The xargs shipped on macOS always exits 0 with -P0, so we need GNU findutils.