Skip to content

Commit

Permalink
new(ci): run latest-kernel CI against arm64 too.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Oct 16, 2024
1 parent cafb3ea commit 7d150f6
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/latest-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ on:

jobs:
build-latest-kernel:
name: build-latest-kernel
runs-on: ubuntu-latest
name: build-latest-kernel-${{ matrix.arch }}
outputs:
build_amd64: ${{ steps.build-amd64.outcome }}
build_arm64: ${{ steps.build-arm64.outcome }}
latest_vers: ${{ steps.latest-version-amd64.latest_vers }}
runs-on: ${{ (matrix.arch == 'arm64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-22.04' }}
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
container:
image: falcosecurity/driverkit:latest
steps:
Expand All @@ -23,14 +31,14 @@ jobs:
git clone https://aur.archlinux.org/linux-mainline.git linux/
- name: Generate driverkit config
id: latest-version
id: latest-version-${{ matrix.arch }}
# Note: in case we are building latest mainline,
# we grep the linux-mainline aur PKGBUILD "_tag" line, that is made like: "_tag=v6.4-rc1"
# We then need to extract the part after the "=" and finally remove the starting "v".
run: |
cd linux/
echo "kernelversion: 1" > dk.yaml
echo "architecture: amd64" >> dk.yaml
echo "architecture: ${{ matrix.arch }}" >> dk.yaml
echo "driverversion: ${{ github.sha }}" >> dk.yaml
echo "output:" >> dk.yaml
echo " module: mod.ko" >> dk.yaml
Expand All @@ -53,18 +61,22 @@ jobs:
path: linux/dk.yaml

- name: Test drivers build
id: build
id: build-${{ matrix.arch }}
run: |
echo "Testing build of drivers against: ${{ steps.latest-version.outputs.latest_vers }}"
driverkit docker -c linux/dk.yaml -l debug
badge-latest-kernel:
if: always() && github.event_name == 'schedule'
runs-on: 'ubuntu-latest'
needs: 'build-latest-kernel'
steps:
- name: Update README badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
if: always() && github.event_name == 'schedule'
with:
auth: ${{ secrets.FEDEDP_GIST_SECRET }}
gistID: 1cbc5d42edf8e3a02fb75e76625f1072
filename: kernel.json
label: Drivers build
message: ${{ steps.latest-version.outputs.latest_vers }}
color: ${{ steps.build.outcome != 'success' && 'red' || 'brightgreen' }}
message: ${{ needs.build-latest-kernel.latest_vers }}
color: ${{ (needs.build-latest-kernel.build_amd64 != 'success' || needs.build-latest-kernel.build_arm64 != 'success') && 'red' || 'brightgreen' }}

0 comments on commit 7d150f6

Please sign in to comment.