-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (90 loc) · 3.25 KB
/
multikernel-tester.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
on:
workflow_call:
inputs:
architecture:
required: true
type: string
description: Architecture string, for example aarch64
runner:
required: true
type: string
description: The runner to execute the build on, for example ubuntu-latest
kernels:
required: true
type: string
description: Stringified JSON string of kernels, for example '[ "debian", "fedora" ]'
workflow_dispatch:
inputs:
architecture:
required: true
type: string
description: Architecture string, for example aarch64
runner:
required: true
type: string
description: The runner to execute the build on, for example ubuntu-latest
kernels:
required: true
type: string
description: Stringified JSON string of kernels, for example '[ "debian", "fedora" ]'
jobs:
test-kernel:
name: Kernel
strategy:
fail-fast: false
matrix:
kernel_flavor: ${{ fromJSON(inputs.kernels) }}
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install packages needed for testing
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
libcap-dev \
parallel \
qemu-system-x86 \
qemu-system-arm \
qemu-user-static
env:
DEBIAN_FRONTEND: noninteractive
- name: Get Env
run: echo "ELASTIC_EBPF_VERSION=$(cat VERSION)" >> $GITHUB_ENV && echo "PWD=$(pwd)" >> $GITHUB_ENV
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: elastic-ebpf-${{ inputs.architecture }}
path: ${{ env.PWD }}/artifacts
- name: Untar
run: cd artifacts && tar -zxf elastic-ebpf-${ELASTIC_EBPF_VERSION}-SNAPSHOT.tar.gz
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Run tests
run: make run-multikernel-test IMG_FILTER=${{ matrix.kernel_flavor }} ARCH=${{ inputs.architecture }} ARTIFACTS_PATH=${PWD}/artifacts
- name: Prepare for archival
if: always()
run: |
mv testing/bpf-check-summary.txt results-${{ matrix.kernel_flavor }}-${{ inputs.architecture }}.txt || true
mkdir -p logs && mv testing/results logs/${{ matrix.kernel_flavor }}-${{ inputs.architecture }}
- name: Archive test summary
if: always()
uses: actions/upload-artifact@v4
with:
name: result-summary-${{ matrix.kernel_flavor }}-${{ inputs.architecture }}.txt
path: results-${{ matrix.kernel_flavor }}-${{ inputs.architecture }}.txt
- name: Archive individual test results
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.kernel_flavor }}-${{ inputs.architecture }}.txt
path: logs
- name: Print summary
if: always()
run: |
echo "Summary results for ${{ matrix.kernel_flavor }}-${{ inputs.architecture }}" >> $GITHUB_STEP_SUMMARY
cat results-${{ matrix.kernel_flavor }}-${{ inputs.architecture }}.txt | grep "FAIL\|PASS" | sed s/FAIL:/:x:/g | sed s/PASS:/:white_check_mark:/g >> $GITHUB_STEP_SUMMARY