From c37355e78d34533bc2f43b6cf7cd5dd48961d9aa 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 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05778c2c2..180f813a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -202,19 +202,25 @@ 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: ghcr.io/vadorovsky/gh-act-containers/alpine:moar-packages-3.20 runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} steps: - 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`. # # gcc-multilib provides at least which is referenced by libbpf. # + # QEMU is used to run virtualized integration tests. + # # [0] https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md # # [1] https://github.com/llvm/llvm-project/commit/dc1c43d @@ -224,6 +230,19 @@ jobs: sudo apt -y install gcc-multilib lynx qemu-system-{arm,x86} echo /usr/lib/llvm-15/bin >> $GITHUB_PATH + - name: Install prerequisites + if: runner.os == 'Linux' && contains(matrix.container, 'alpine') + # dpkg is used to unpack the kernel images from .deb packages, which we + # use for virtualized tests. + # + # QEMU is used to run virtualized integration tests. + run: | + set -euxo pipefail + apk add \ + dpkg \ + qemu-system-arm \ + qemu-system-x86_64 + - name: Install prerequisites if: runner.os == 'macOS' # The xargs shipped on macOS always exits 0 with -P0, so we need GNU findutils.