Skip to content

Commit 9b63017

Browse files
committed
Signed-off-by: Ihor Solodrai <[email protected]>
1 parent 89c8652 commit 9b63017

File tree

4 files changed

+47
-31
lines changed

4 files changed

+47
-31
lines changed

.github/workflows/gcc-bpf.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ on:
99
arch:
1010
required: true
1111
type: string
12-
llvm-version:
12+
gcc_version:
13+
required: true
14+
type: string
15+
llvm_version:
1316
required: true
1417
type: string
1518
toolchain:
@@ -74,7 +77,8 @@ jobs:
7477
uses: ./setup-build-env
7578
with:
7679
arch: ${{ inputs.arch }}
77-
llvm-version: ${{ inputs.llvm-version }}
80+
gcc-version: ${{ inputs.gcc_version }}
81+
llvm-version: ${{ inputs.llvm_version }}
7882

7983
- name: Download GCC BPF compiler
8084
shell: bash
@@ -91,6 +95,5 @@ jobs:
9195
with:
9296
arch: ${{ inputs.arch }}
9397
kernel-root: ${{ env.REPO_ROOT }}
94-
llvm-version: ${{ inputs.llvm-version }}
98+
llvm-version: ${{ inputs.llvm_version }}
9599
toolchain: ${{ inputs.toolchain }}
96-

.github/workflows/kernel-build-test.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ on:
2323
required: true
2424
type: string
2525
description: The runners to run the builds on. This is a json string representing an array of labels.
26-
llvm-version:
26+
gcc_version:
2727
required: true
2828
type: string
29-
description: The version of LLVM used to build selftest.... for llvm toolchain, this should match the one from toolchain_full, for gcc it is an arbritrary version we decide to build selftests against.
29+
description: GCC version to install
30+
llvm_version:
31+
required: true
32+
type: string
33+
description: LLVM version to install
3034
kernel:
3135
required: true
3236
type: string
@@ -60,7 +64,8 @@ jobs:
6064
toolchain_full: ${{ inputs.toolchain_full }}
6165
toolchain: ${{ inputs.toolchain }}
6266
runs_on: ${{ inputs.build_runs_on }}
63-
llvm-version: ${{ inputs.llvm-version }}
67+
gcc_version: ${{ inputs.gcc_version }}
68+
llvm_version: ${{ inputs.llvm_version }}
6469
kernel: ${{ inputs.kernel }}
6570
download_sources: ${{ inputs.download_sources }}
6671

@@ -72,7 +77,8 @@ jobs:
7277
toolchain_full: ${{ inputs.toolchain_full }}
7378
toolchain: ${{ inputs.toolchain }}
7479
runs_on: ${{ inputs.build_runs_on }}
75-
llvm-version: ${{ inputs.llvm-version }}
80+
gcc_version: ${{ inputs.gcc_version }}
81+
llvm_version: ${{ inputs.llvm_version }}
7682
kernel: ${{ inputs.kernel }}
7783
download_sources: ${{ inputs.download_sources }}
7884
release: true
@@ -105,7 +111,8 @@ jobs:
105111
# GCC BPF does not need /dev/kvm, so use the "build" runners
106112
runs_on: ${{ inputs.build_runs_on }}
107113
arch: ${{ inputs.arch }}
108-
llvm-version: ${{ inputs.llvm-version }}
114+
gcc_version: ${{ inputs.gcc_version }}
115+
llvm_version: ${{ inputs.llvm_version }}
109116
toolchain: ${{ inputs.toolchain }}
110117
toolchain_full: ${{ inputs.toolchain_full }}
111118
download_sources: ${{ inputs.download_sources }}

.github/workflows/kernel-build.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ on:
2020
required: true
2121
type: string
2222
description: The runners to run the test on. This is a json string representing an array of labels.
23-
llvm-version:
23+
gcc_version:
2424
required: true
2525
type: string
26-
description: The version of LLVM used to build selftest.... for llvm toolchain, this should match the one from toolchain_full, for gcc it is an arbritrary version we decide to build selftests against.
26+
description: GCC version to install
27+
llvm_version:
28+
required: true
29+
type: string
30+
description: LLVM version to install
2731
kernel:
2832
required: true
2933
type: string
@@ -41,7 +45,7 @@ on:
4145

4246
jobs:
4347
build:
44-
name: build for ${{ inputs.arch }} with ${{ inputs.toolchain_full }}${{ inputs.release && '-O2' || '' }}
48+
name: build kernel and selftests ${{ inputs.release && '-O2' || '' }}
4549
# To run on CodeBuild, runs-on value must correspond to the AWS
4650
# CodeBuild project associated with the kernel-patches webhook
4751
# However matrix.py passes just a 'codebuild' string
@@ -111,7 +115,8 @@ jobs:
111115
uses: ./setup-build-env
112116
with:
113117
arch: ${{ inputs.arch }}
114-
llvm-version: ${{ inputs.llvm-version }}
118+
gcc-version: ${{ inputs.gcc_version }}
119+
llvm-version: ${{ inputs.llvm_version }}
115120
pahole: master
116121

117122
# We have to setup qemu+binfmt in order to enable cross-compation of selftests.
@@ -133,7 +138,7 @@ jobs:
133138
toolchain: ${{ inputs.toolchain }}
134139
kbuild-output: ${{ env.KBUILD_OUTPUT }}
135140
max-make-jobs: 32
136-
llvm-version: ${{ inputs.llvm-version }}
141+
llvm-version: ${{ inputs.llvm_version }}
137142

138143
- name: Build selftests/bpf
139144
uses: ./build-selftests
@@ -143,7 +148,7 @@ jobs:
143148
with:
144149
arch: ${{ inputs.arch }}
145150
kernel-root: ${{ env.KERNEL_ROOT }}
146-
llvm-version: ${{ inputs.llvm-version }}
151+
llvm-version: ${{ inputs.llvm_version }}
147152
toolchain: ${{ inputs.toolchain }}
148153

149154
- if: ${{ env.BUILD_SCHED_EXT_SELFTESTS }}
@@ -154,7 +159,7 @@ jobs:
154159
repo-root: ${{ env.REPO_ROOT }}
155160
arch: ${{ inputs.arch }}
156161
toolchain: ${{ inputs.toolchain }}
157-
llvm-version: ${{ inputs.llvm-version }}
162+
llvm-version: ${{ inputs.llvm_version }}
158163
max-make-jobs: 32
159164

160165
- if: ${{ github.event_name != 'push' }}
@@ -165,7 +170,7 @@ jobs:
165170
toolchain: ${{ inputs.toolchain }}
166171
kbuild-output: ${{ env.KBUILD_OUTPUT }}
167172
max-make-jobs: 32
168-
llvm-version: ${{ inputs.llvm-version }}
173+
llvm-version: ${{ inputs.llvm_version }}
169174
- name: Tar artifacts
170175
id: tar-artifacts
171176
uses: ./tar-artifacts

.github/workflows/test.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
runs_on: ["ubuntu-24.04"]
1818
build_runs_on: ["ubuntu-24.04"]
1919
arch: ["x86_64"]
20-
toolchain:
21-
- {"name": "gcc", "fullname": "gcc", "version": 17}
22-
- {"name": "llvm", "fullname": "llvm-17", "version": 17}
20+
kernel_compiler: ["gcc", "llvm"]
21+
gcc_version: [13]
22+
llvm_version: [17]
23+
kernel: ["LATEST"]
24+
build_release: [false]
2325
tests:
2426
- include:
2527
- {"test": "test_progs", "continue_on_error": false, "timeout_minutes": 360}
@@ -29,25 +31,24 @@ jobs:
2931
# - {"test": "sched_ext", "continue_on_error": false, "timeout_minutes": 360}
3032
# - {"test": "test_progs-bpf_gcc", "continue_on_error": false, "timeout_minutes": 360}
3133
fail-fast: false
32-
# Setting name to arch-compiler here to avoid lengthy autogenerated names due to matrix
33-
# e.g build-and-test x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
34-
name: "${{ matrix.arch }}-${{ matrix.toolchain.fullname }}"
34+
35+
name: ${{ matrix.arch }} ${{ matrix.kernel_compiler }}-${{ matrix.kernel_compiler == 'gcc' && matrix.gcc_version || matrix.llvm_version }}
3536
uses: ./.github/workflows/kernel-build-test.yml
3637
permissions:
3738
id-token: write
3839
contents: read
3940

4041
with:
4142
arch: ${{ matrix.arch }}
42-
toolchain_full: ${{ matrix.toolchain.fullname }}
43-
toolchain: ${{ matrix.toolchain.name }}
43+
toolchain: ${{ matrix.kernel_compiler }}
44+
toolchain_full: ${{ matrix.kernel_compiler }}-${{ matrix.kernel_compiler == 'gcc' && matrix.gcc_version || matrix.llvm_version }}
4445
runs_on: ${{ toJSON(matrix.runs_on) }}
4546
build_runs_on: ${{ toJSON(matrix.build_runs_on) }}
46-
llvm-version: ${{ matrix.toolchain.version }}
47-
kernel: "LATEST"
47+
gcc_version: ${{ matrix.gcc_version }}
48+
llvm_version: ${{ matrix.llvm_version }}
49+
kernel: ${{ matrix.kernel }}
4850
tests: ${{ toJSON(matrix.tests) }}
49-
# We only run tests on pull requests.
50-
run_tests: ${{ github.event_name != 'push' }}
51-
# Download sources
51+
run_tests: true
5252
download_sources: true
53-
build_release: false
53+
build_release: ${{ matrix.build_release }}
54+

0 commit comments

Comments
 (0)