forked from kernel-patches/bpf
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 2.08 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: bpf-ci
on:
pull_request:
push:
branches:
- bpf_base
- bpf-next_base
concurrency:
group: ci-test-${{ github.ref_name }}
cancel-in-progress: true
jobs:
set-matrix:
# FIXME: set-matrix is lightweight, run it on any self-hosted machines for kernel-patches org
# so we do not wait for GH hosted runners when there potentially all are busy because of bpf-rc
# repo for instance.
# This could be somehow fixed long term by making this action/workflow re-usable and letting the called
# specify what to run on.
runs-on: ${{ github.repository_owner == 'kernel-patches' && 'x86_64' || 'ubuntu-latest' }}
outputs:
build-matrix: ${{ steps.set-matrix-impl.outputs.build_matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix-impl
run: |
python3 .github/scripts/matrix.py
build-and-test:
# Setting name to arch-compiler here to avoid lengthy autogenerated names due to matrix
# e.g build-and-test x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
name: "${{ matrix.arch }}-${{ matrix.toolchain.fullname }}"
uses: ./.github/workflows/kernel-build-test.yml
needs: [set-matrix]
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.set-matrix.outputs.build-matrix) }}
with:
arch: ${{ matrix.arch }}
toolchain_full: ${{ matrix.toolchain.fullname }}
toolchain: ${{ matrix.toolchain.name }}
runs_on: ${{ toJSON(matrix.runs_on) }}
build_runs_on: ${{ toJSON(matrix.build_runs_on) }}
llvm-version: ${{ matrix.toolchain.version }}
kernel: ${{ matrix.kernel }}
tests: ${{ toJSON(matrix.tests) }}
run_veristat: ${{ matrix.run_veristat }}
# We only run tests on pull requests.
run_tests: ${{ github.event_name != 'push' }}
# Download sources
download_sources: ${{ github.repository == 'kernel-patches/vmtest' }}
build_release: ${{ matrix.build_release }}
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}