You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'toolchain' matrix parameter has been used in a confusing way. The
'version' field was only applicable to LLVM, but there is also a
separate 'llvm-version' action parameter spread across the workflows.
Now that we want to be able to specify a particular GCC version for
kernel build, a refactoring is appropriate.
Given that libbpf/ci/setup-build-env action sets up a particular
compiler version systemwide, and mixing LLVM versions between kernel
and selftests build is an unlikely scenario, it makes sense to simply
have gcc_version and llvm_version parameter, fixed within a particular
workflow. And so the composite 'toolchain' becomes unnecessary: it's
enough to distinguish between gcc and llvm build of the kernel.
However 'toolchain' and 'toolchain_full' are still useful variables
between the workflows and actions, particularly for identifying build
artifacts.
Here is what happens now:
* DEFAULT_{GCC,LLVM}_VERSION is set in matrix.py
* 'toolchain' is replaced with 'kernel_compiler' in the job matrix
* test.yml workflow looks at kernel_compiler to construct and pass
'toolchain' and 'toolchain_full' to other workflows
* '{gcc,llvm}_version' inputs are used to determine compiler
versions for the build setup
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Copy file name to clipboardExpand all lines: .github/workflows/kernel-build-test.yml
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -23,10 +23,14 @@ on:
23
23
required: true
24
24
type: string
25
25
description: The runners to run the builds on. This is a json string representing an array of labels.
26
-
llvm-version:
26
+
gcc_version:
27
27
required: true
28
28
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
30
34
kernel:
31
35
required: true
32
36
type: string
@@ -67,7 +71,8 @@ jobs:
67
71
toolchain_full: ${{ inputs.toolchain_full }}
68
72
toolchain: ${{ inputs.toolchain }}
69
73
runs_on: ${{ inputs.build_runs_on }}
70
-
llvm-version: ${{ inputs.llvm-version }}
74
+
gcc_version: ${{ inputs.gcc_version }}
75
+
llvm_version: ${{ inputs.llvm_version }}
71
76
kernel: ${{ inputs.kernel }}
72
77
download_sources: ${{ inputs.download_sources }}
73
78
@@ -79,7 +84,8 @@ jobs:
79
84
toolchain_full: ${{ inputs.toolchain_full }}
80
85
toolchain: ${{ inputs.toolchain }}
81
86
runs_on: ${{ inputs.build_runs_on }}
82
-
llvm-version: ${{ inputs.llvm-version }}
87
+
gcc_version: ${{ inputs.gcc_version }}
88
+
llvm_version: ${{ inputs.llvm_version }}
83
89
kernel: ${{ inputs.kernel }}
84
90
download_sources: ${{ inputs.download_sources }}
85
91
release: true
@@ -112,7 +118,7 @@ jobs:
112
118
contents: read
113
119
with:
114
120
arch: ${{ inputs.arch }}
115
-
toolchain: ${{ inputs.toolchain }}
121
+
toolchain_full: ${{ inputs.toolchain_full }}
116
122
runs_on: ${{ inputs.runs_on }}
117
123
118
124
veristat-meta:
@@ -125,7 +131,7 @@ jobs:
125
131
contents: read
126
132
with:
127
133
arch: ${{ inputs.arch }}
128
-
toolchain: ${{ inputs.toolchain }}
134
+
toolchain_full: ${{ inputs.toolchain_full }}
129
135
aws_region: ${{ vars.AWS_REGION }}
130
136
runs_on: ${{ inputs.runs_on }}
131
137
secrets:
@@ -140,7 +146,8 @@ jobs:
140
146
# GCC BPF does not need /dev/kvm, so use the "build" runners
Copy file name to clipboardExpand all lines: .github/workflows/kernel-build.yml
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,14 @@ on:
20
20
required: true
21
21
type: string
22
22
description: The runners to run the test on. This is a json string representing an array of labels.
23
-
llvm-version:
23
+
gcc_version:
24
24
required: true
25
25
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
27
31
kernel:
28
32
required: true
29
33
type: string
@@ -41,7 +45,7 @@ on:
41
45
42
46
jobs:
43
47
build:
44
-
name: build for ${{ inputs.arch }} with ${{ inputs.toolchain_full }}${{ inputs.release && '-O2' || '' }}
0 commit comments