Skip to content

Commit 5729e80

Browse files
committed
feat(ci): test mimic with multiple clang versions in LVH
1 parent ca80c79 commit 5729e80

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

.github/workflows/push.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,34 @@ jobs:
156156
steps:
157157
- name: Checkout
158158
uses: actions/checkout@v4
159-
- name: Install dependencies
159+
- name: Add LLVM apt repository
160+
shell: bash
160161
run: |
162+
wget https://apt.llvm.org/llvm.sh
163+
chmod +x llvm.sh
164+
for _clang_version in {15..21}; do
165+
sudo ./llvm.sh $_clang_version
166+
done
161167
sudo apt update
162-
sudo apt install clang-15 llvm pahole \
168+
- name: Install dependencies
169+
shell: bash
170+
run: |
171+
sudo apt install clang-{15..21} pahole \
163172
linux-tools-common linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) \
164173
libbpf-dev libffi-dev libelf-dev libxdp-dev
165174
- name: Build CLI
175+
shell: bash
166176
run: |
167-
export BPF_CC=clang-15
168-
make build-cli -j ${{ matrix.flags.flags }}
177+
for _clang_version in {15..21}; do
178+
export BPF_CC=clang-$_clang_version
179+
make build-cli -j ${{ matrix.flags.flags }}
180+
mv out/mimic out/mimic-clang-$_clang_version
181+
done
169182
- name: Upload executable
170183
uses: actions/upload-artifact@v4
171184
with:
172185
name: mimic-${{ matrix.flags.name }}-${{ matrix.arch }}
173-
path: out/mimic
186+
path: out/mimic-clang-*
174187

175188
test-lvh:
176189
name: Test LVH
@@ -303,8 +316,11 @@ jobs:
303316
uname -a
304317
cd /host
305318
insmod kmod/mimic.ko
306-
chmod +x out/mimic
307-
out/mimic run lo --check
319+
chmod +x out/mimic-clang-*
320+
for _mimic in mimic-clang-*; do
321+
echo Checking $_mimic
322+
$_mimic run lo --check
323+
done
308324
- name: Extract kernel log
309325
if: always()
310326
uses: ./.github/actions/lvh-run

0 commit comments

Comments
 (0)