forked from libbpf/blazesym
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.91 KB
/
test-kernel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build Linux
on:
push:
jobs:
build-linux-kernel:
uses: ./.github/workflows/build-linux.yml
secrets: inherit
test:
needs: [build-linux-kernel]
name: Test and coverage
runs-on: ubuntu-22.04
env:
LLVM_GSYMUTIL: /usr/bin/llvm-gsymutil-14
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
id: py312
with:
python-version: '3.12'
- name: Install required tools
run: sudo apt-get install -y llvm-14
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Build main.sh
env:
KERNEL_URL: ${{ needs.build-linux-kernel.outputs.kernel-url }}
PYTHON: ${{ steps.py312.outputs.python-path }}
run: |
# Yes, there appears to be no way to just retrieve the
# uploaded artifact. One can't use actions/download-artifact
# and provide any of the outputs of actions/upload-artifact.
# Neither is it possible to just download the thing directly,
# because contents are unconditionally zipped. Good. Lord.
curl --location \
--fail-with-body \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
--header "X-GitHub-Api-Version: 2022-11-28" \
--output linux-kernel.zip \
"${KERNEL_URL}"
unzip linux-kernel.zip
cat <<EOF > main.sh
export PYTHON=${PYTHON}
exec cargo test --workspace --all-targets --features=nightly,generate-large-test-files -- --include-ignored
EOF
chmod a+x main.sh
- name: Test
uses: danobi/vmtest-action@master
with:
kernel: bzImage
command: "/bin/bash -c ${{ github.workspace }}/main.sh"