Skip to content

Commit

Permalink
ci: run on arm64 github-hosted runners
Browse files Browse the repository at this point in the history
Github recently started offering arm64 runners, so we can take
advantage of that to add arm64 testing for free [1].

Setting up other architectures will require QEMU/docker setup similar
to libbpf [2].

[1] https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/
[2] https://github.com/libbpf/libbpf/blob/master/.github/workflows/build.yml

Signed-off-by: Ihor Solodrai <[email protected]>
  • Loading branch information
theihor committed Feb 7, 2025
1 parent 6b36680 commit 52b107f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ apt-get install -y curl file gawk libfuse2t64 make sudo
apt-get install -y gcc-${GCC_VERSION} g++-${GCC_VERSION}

# Download bpftrace release
BIN_DIR=/usr/local/bin
mkdir -p $BIN_DIR
curl -L -o bpftrace https://github.com/bpftrace/bpftrace/releases/download/v${BPFTRACE_VERSION}/bpftrace
chmod +x bpftrace
mv bpftrace $BIN_DIR
bpftrace --version
apt-get install -y bpftrace
# BIN_DIR=/usr/local/bin
# mkdir -p $BIN_DIR
# curl -L -o bpftrace https://github.com/bpftrace/bpftrace/releases/download/v${BPFTRACE_VERSION}/bpftrace
# chmod +x bpftrace
# mv bpftrace $BIN_DIR
# bpftrace --version

# mount tracefs to avoid warnings from bpftrace
grep -q tracefs /proc/mounts || mount -t tracefs tracefs /sys/kernel/tracing
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ on:
jobs:
build-and-test:

runs-on: ubuntu-latest

strategy:
matrix:
gcc-version: [ 10, 11, 12, 13, 14 ]
runs-on: [ 'ubuntu-latest', 'ubuntu-24.04-arm' ]
shared: [ 0, 1 ]
gcc-version: [ 10, 11, 12, 13, 14 ]

runs-on: ${{ matrix.runs-on }}

name: gcc-${{ matrix.gcc-version }} SHARED=${{ matrix.shared }}
name: ${{ endsWith(matrix.runs-on, '-arm') && 'arm64' || 'x86_64' }} SHARED=${{ matrix.shared }} gcc-${{ matrix.gcc-version }}

env:
GCC_VERSION: ${{ matrix.gcc-version }}
Expand Down

0 comments on commit 52b107f

Please sign in to comment.