Skip to content

Commit 7ed2797

Browse files
committed
.github/workflows: Add different LLVM versions to test matrix
Instead of only testing on LLVM 16, add different LLVM versions to the test matrix for wider test coverage. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent 6fa62fc commit 7ed2797

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/selftests.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,19 @@ jobs:
1818
- "5.16.8-200.fc35"
1919
- "5.11.0-156.fc34"
2020
- "5.6.19-300.fc32"
21+
LLVM_VERSION:
22+
- 16
23+
- 17
24+
- 18
25+
- 19
2126
fail-fast: false
2227

2328
env:
2429
KERNEL_VERSION: ${{ matrix.KERNEL_VERSION }}
25-
CLANG: clang-16
26-
LLC: llc-16
30+
LLVM_VERSION: ${{ matrix.LLVM_VERSION }}
31+
CLANG: clang-${{ matrix.LLVM_VERSION }}
32+
LLC: llc-${{ matrix.LLVM_VERSION }}
33+
LLVM_STRIP: llvm-strip-${{ matrix.LLVM_VERSION }}
2734
# can't use unshare on old kernels
2835
DID_UNSHARE: ${{ (startsWith(matrix.KERNEL_VERSION, '5.6') || startsWith(matrix.KERNEL_VERSION, '5.11')) && 1 || 0 }}
2936

@@ -39,13 +46,13 @@ jobs:
3946
- name: Prepare Clang
4047
run: |
4148
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
42-
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list
49+
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main" | sudo tee -a /etc/apt/sources.list
4350
sudo apt-get -qq update
44-
sudo apt-get -qq -y install clang-16 lld-16 llvm-16
51+
sudo apt-get -qq -y install clang-$LLVM_VERSION lld-$LLVM_VERSION llvm-$LLVM_VERSION
4552
- name: Install latest bpftool
4653
run: |
4754
git clone --depth=1 --recurse-submodules https://github.com/libbpf/bpftool bpftool
48-
make LLVM_STRIP=llvm-strip-16 -C bpftool/src
55+
make -C bpftool/src
4956
sudo make install -C bpftool/src prefix=/usr
5057
- name: Compile
5158
run: make

0 commit comments

Comments
 (0)