-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (71 loc) · 2.47 KB
/
test-labgrid-pytest.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
name: test images
on: [push, pull_request]
jobs:
labgrid-pytest:
runs-on: ubuntu-latest
container:
image: ghcr.io/barebox/barebox/barebox-ci:latest
# allow mounting and devtmpfs in the container
options: --user=root --privileged -v /dev:/dev
strategy:
fail-fast: false
matrix:
include:
- ARCH: arm
lgenv: 'test/arm/*@multi_v7_defconfig.yaml'
defconfig: multi_v7_defconfig
- ARCH: arm
lgenv: test/arm/multi_v8_defconfig.yaml
defconfig: multi_v8_defconfig
- ARCH: mips
lgenv: test/mips/qemu-malta_defconfig.yaml
defconfig: qemu-malta_defconfig
- ARCH: mips
lgenv: test/mips/qemu-malta64el_defconfig.yaml
defconfig: qemu-malta64el_defconfig
- ARCH: openrisc
lgenv: test/openrisc/generic_defconfig.yaml
defconfig: generic_defconfig
- ARCH: x86
lgenv: test/x86/efi_defconfig.yaml
defconfig: efi_defconfig
- ARCH: riscv
lgenv: test/riscv/qemu@virt32_defconfig.yaml
defconfig: virt32_defconfig
- ARCH: riscv
lgenv: 'test/riscv/qemu-virt64@rv64i_defconfig.yaml'
defconfig: rv64i_defconfig
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
export ARCH=${{matrix.arch}}
./test/generate-dummy-fw.sh
./MAKEALL -O build-${{matrix.arch}} -k test/kconfig/enable_self_test.kconf \
-k test/kconfig/disable_target_tools.kconf ${{matrix.defconfig}}
if [ ${{matrix.arch}} = "riscv" ]; then
cp /usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.bin build-${{matrix.arch}}
fi
- name: labgrid-pytest
run: |
export KBUILD_OUTPUT=build-${{matrix.arch}}
for i in ${{matrix.lgenv}}; do
grep -wqe QEMUDriver: "$i" || continue
cfg=$(basename $i .yaml)
echo "Testing $cfg"
labgrid-pytest --lg-env $i test/py --verbosity=1 \
--junitxml=$cfg.tests.xml --lg-log=log/$cfg
done
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: ./*.tests.xml
- name: Publish Labgrid Log Results
uses: actions/upload-artifact@v3
if: always()
with:
name: Console Logs
path: log/
if-no-files-found: error