From 1ab4e9e0fcd86db09756dede75e9766aa38312cb Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Mon, 11 Dec 2023 10:05:32 +0100 Subject: [PATCH] chore(ci): enable aarch64 falco driver loader tests. Signed-off-by: Federico Di Pierro --- .github/workflows/reusable_test_packages.yaml | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/reusable_test_packages.yaml b/.github/workflows/reusable_test_packages.yaml index 978bdaaf9d1..2cebeeb8dc1 100644 --- a/.github/workflows/reusable_test_packages.yaml +++ b/.github/workflows/reusable_test_packages.yaml @@ -44,12 +44,25 @@ jobs: cd falco-${{ inputs.version }}-${{ inputs.arch }} sudo cp -r * / - # x86_64 job run on ubuntu-22.04 and here we can install kernel-headers - - name: Install dependencies for falco-driver-loader tests on x86 - if: ${{ inputs.arch == 'x86_64' }} + - name: Install dependencies for falco-driver-loader tests run: | sudo apt update -y - sudo apt install -y --no-install-recommends build-essential clang make llvm gcc dkms linux-headers-$(uname -r) + sudo apt install -y --no-install-recommends build-essential clang make llvm gcc dkms + + - name: Install kernel headers (workaround) + if: inputs.arch == 'aarch64' + run: | + sudo mkdir -p /usr/src + sudo git clone --depth 1 --branch v$(uname -r) git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git /usr/src/linux + sudo rm /lib/modules/$(uname -r)/build + sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/build + sudo rm /lib/modules/$(uname -r)/source + sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/source + + - name: Install kernel headers + if: inputs.arch == 'x86_64' + run: | + sudo apt install -y --no-install-recommends linux-headers-$(uname -r) - name: Install go-junit-report run: | @@ -63,9 +76,6 @@ jobs: go generate ./... popd - # Right now we are not able to install kernel-headers on our ARM64 self-hosted runner. - # For this reason, we disable the falco-driver-loader tests, which require kernel headers on the host. - # TODO: check if it's possible to do so in actuated runners - name: Run regression tests env: # fixme(leogr): this is a workaround for https://github.com/falcosecurity/falco/issues/2784 @@ -76,9 +86,7 @@ jobs: if ${{ inputs.static && 'false' || 'true' }}; then ./build/falcoctl.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true ./build/k8saudit.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true - if ${{ inputs.arch == 'x86_64' && 'true' || 'false' }}; then - sudo ./build/falco-driver-loader.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true - fi + sudo ./build/falco-driver-loader.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true fi cat ./report.txt | go-junit-report -set-exit-code > report.xml popd