Skip to content

Commit 3d73785

Browse files
committed
.github/workflows: Set DID_UNSHARE programmatically instead of explicitly
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 a lot of copy-paste to accommodate the two old kernel versions, now that we also have clang versions as part of the test matrix. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent b35f074 commit 3d73785

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/selftests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,23 @@ jobs:
1616
- "6.6.14-200.fc39"
1717
- "6.1.9-200.fc37"
1818
- "5.16.8-200.fc35"
19-
DID_UNSHARE:
20-
- 0
19+
- "5.11.0-156.fc34"
20+
- "5.6.19-300.fc32"
2121
CLANG_VERSION:
2222
- 16
2323
- 17
2424
- 18
2525
- 19
26-
include:
27-
- KERNEL_VERSION: "5.11.0-156.fc34"
28-
DID_UNSHARE: 1
29-
- KERNEL_VERSION: "5.6.19-300.fc32"
30-
DID_UNSHARE: 1
3126
fail-fast: false
3227

3328
env:
3429
KERNEL_VERSION: ${{ matrix.KERNEL_VERSION }}
35-
DID_UNSHARE: ${{ matrix.DID_UNSHARE }}
3630
CLANG_VERSION: ${{ matrix.CLANG_VERSION }}
3731
CLANG: clang-${{ matrix.CLANG_VERSION }}
3832
LLC: llc-${{ matrix.CLANG_VERSION }}
3933
LLVM_STRIP: llvm-strip-${{ matrix.CLANG_VERSION }}
34+
# can't use unshare on old kernels
35+
DID_UNSHARE: ${{ (startsWith(matrix.KERNEL_VERSION, '5.6') || startsWith(matrix.KERNEL_VERSION, '5.11')) && 1 || 0 }}
4036

4137
steps:
4238
- name: Check out repository code

0 commit comments

Comments
 (0)