Skip to content

Commit

Permalink
.github/workflows: Set DID_UNSHARE programmatically instead of explic…
Browse files Browse the repository at this point in the history
…itly

Instead of having to define the DID_UNSHARE value explicitly as part of the test
matrix, set the environment variable programmatically based on the kernel
version. This removes the need for an 'include' block and some copy-paste to
accommodate the two old kernel versions.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed Aug 5, 2024
1 parent a301ba8 commit d767f28
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/selftests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@ jobs:
- "6.6.14-200.fc39"
- "6.1.9-200.fc37"
- "5.16.8-200.fc35"
DID_UNSHARE:
- 0
include:
- KERNEL_VERSION: "5.11.0-156.fc34"
DID_UNSHARE: 1
- KERNEL_VERSION: "5.6.19-300.fc32"
DID_UNSHARE: 1
- "5.11.0-156.fc34"
- "5.6.19-300.fc32"
fail-fast: false

env:
KERNEL_VERSION: ${{ matrix.KERNEL_VERSION }}
DID_UNSHARE: ${{ matrix.DID_UNSHARE }}
CLANG: clang-16
LLC: llc-16
# can't use unshare on old kernels
DID_UNSHARE: ${{ (startsWith(matrix.KERNEL_VERSION, '5.6') || startsWith(matrix.KERNEL_VERSION, '5.11')) && 1 || 0 }}

steps:
- name: Check out repository code
Expand Down

0 comments on commit d767f28

Please sign in to comment.