mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-13 21:09:07 +08:00
run-on-arch-action is simply a wrapper around docker. There is no value in using it in libbpf, as it is not complicated to run non-native arch docker images directly on github-hosted runners. Docker relies on qemu-user-static installed on the system to emulate different architectures. Recently there were various reports about multi-arch docker builds failing with seemingly random issues, and it appears to boil down to qemu [1]. I stumbled on this problem while updating s390x runners [2] for BPF CI, and setting up more recent version of qemu helped. This change addresses recent build failures on s390x and ppc64le. [1] https://github.com/docker/setup-qemu-action/issues/188 [2] https://github.com/kernel-patches/runner/pull/69 [3] https://docs.docker.com/build/buildkit/#getting-started Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
93 lines
2.3 KiB
YAML
93 lines
2.3 KiB
YAML
name: libbpf-build
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
schedule:
|
|
- cron: '0 18 * * *'
|
|
|
|
concurrency:
|
|
group: ci-build-${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
|
|
debian:
|
|
runs-on: ubuntu-latest
|
|
name: Debian Build (${{ matrix.name }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: default
|
|
target: RUN
|
|
- name: ASan+UBSan
|
|
target: RUN_ASAN
|
|
- name: clang ASan+UBSan
|
|
target: RUN_CLANG_ASAN
|
|
- name: gcc-10 ASan+UBSan
|
|
target: RUN_GCC10_ASAN
|
|
- name: clang
|
|
target: RUN_CLANG
|
|
- name: clang-14
|
|
target: RUN_CLANG14
|
|
- name: clang-15
|
|
target: RUN_CLANG15
|
|
- name: clang-16
|
|
target: RUN_CLANG16
|
|
- name: gcc-10
|
|
target: RUN_GCC10
|
|
- name: gcc-11
|
|
target: RUN_GCC11
|
|
- name: gcc-12
|
|
target: RUN_GCC12
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
- uses: ./.github/actions/setup
|
|
name: Setup
|
|
- uses: ./.github/actions/debian
|
|
name: Build
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
|
|
ubuntu:
|
|
runs-on: ubuntu-latest
|
|
name: Ubuntu Build (${{ matrix.arch }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: aarch64
|
|
- arch: ppc64le
|
|
- arch: s390x
|
|
- arch: amd64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
|
|
- name: Setup QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
image: tonistiigi/binfmt:qemu-v8.1.5
|
|
|
|
- uses: ./.github/actions/setup
|
|
name: Pre-Setup
|
|
|
|
- run: source /tmp/ci_setup && sudo -E $CI_ROOT/managers/ubuntu.sh
|
|
if: matrix.arch == 'amd64'
|
|
name: Setup
|
|
|
|
- name: Build in docker
|
|
if: matrix.arch != 'amd64'
|
|
run: |
|
|
cp /tmp/ci_setup ${GITHUB_WORKSPACE}
|
|
docker run --rm \
|
|
--platform linux/${{ matrix.arch }} \
|
|
-v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} \
|
|
-e GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
|
-w /ci/workspace \
|
|
ubuntu:noble \
|
|
${GITHUB_WORKSPACE}/ci/build-in-docker.sh
|
|
|