Skip to content

ci: refactor toolchain setup#369

Merged
theihor merged 2 commits intomasterfrom
gcc-14
Apr 30, 2025
Merged

ci: refactor toolchain setup#369
theihor merged 2 commits intomasterfrom
gcc-14

Conversation

@theihor
Copy link
Contributor

@theihor theihor commented Apr 30, 2025

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

@theihor theihor force-pushed the gcc-14 branch 4 times, most recently from 24694f9 to 0280a6a Compare April 30, 2025 19:23
@theihor theihor changed the title Test gcc-14 and llvm-20 ci: refactor toolchain setup Apr 30, 2025
@theihor theihor marked this pull request as ready for review April 30, 2025 19:36
@theihor
Copy link
Contributor Author

theihor commented Apr 30, 2025

Note: this depends on libbpf/ci#181

theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to theihor/libbpf-ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to libbpf/ci that referenced this pull request Apr 30, 2025
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added 2 commits April 30, 2025 15:38
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>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
@theihor theihor merged commit c36ce33 into master Apr 30, 2025
51 checks passed
@theihor theihor deleted the gcc-14 branch April 30, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant