-
Notifications
You must be signed in to change notification settings - Fork 170
78 lines (74 loc) · 2.81 KB
/
test.yml
File metadata and controls
78 lines (74 loc) · 2.81 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: bpf-ci
on:
pull_request:
push:
branches:
- bpf_base
- bpf-next_base
- bpf-net_base
- for-next_base
- linux-next
concurrency:
group: ci-test-${{ github.ref_name }}
cancel-in-progress: true
jobs:
set-matrix:
runs-on: ubuntu-slim
permissions: read-all
outputs:
build-matrix: ${{ steps.set-matrix-impl.outputs.build_matrix }}
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github
ci
- name: Install script dependencies
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install python3-requests
- name: Stagger if runners are busy
if: ${{ github.event.action == 'synchronize' && github.repository == 'kernel-patches/bpf' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_EVENT_ACTION: ${{ github.event.action }}
PR_BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
run: python3 .github/scripts/stagger.py
- id: set-matrix-impl
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_READ_RUNNERS }}
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
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.kernel_compiler }}-${{ matrix.kernel_compiler == 'gcc' && matrix.gcc_version || matrix.llvm_version }}
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: ${{ matrix.kernel_compiler }}
toolchain_full: ${{ matrix.kernel_compiler }}-${{ matrix.kernel_compiler == 'gcc' && matrix.gcc_version || matrix.llvm_version }}
runs_on: ${{ toJSON(matrix.runs_on) }}
build_runs_on: ${{ toJSON(matrix.build_runs_on) }}
gcc_version: ${{ matrix.gcc_version }}
llvm_version: ${{ matrix.llvm_version }}
kernel: ${{ matrix.kernel }}
tests: ${{ toJSON(matrix.tests) }}
run_veristat: ${{ matrix.run_veristat }}
# Pushes normally build only, except linux-next syncs which should run tests too.
run_tests: ${{ github.event_name != 'push' || github.ref_name == 'linux-next' }}
# Download sources
download_sources: ${{ github.repository == 'kernel-patches/vmtest' }}
build_release: ${{ matrix.build_release }}
is_netdev: ${{ matrix.is_netdev }}
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}