Skip to content

Commit 8179544

Browse files
committed
.github/workflows/test.yml: Fix
Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
1 parent c17084d commit 8179544

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/test.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: CI on push release tag
2+
name: Run DTS tests
33
on:
44
pull_request:
55
# branches:
@@ -10,9 +10,11 @@ jobs:
1010
run-tests:
1111
name: Run DTS tests
1212
if: ${{ contains(join(needs.*.result, ','), 'success') }}
13-
needs: build
13+
needs: build-dts
1414
runs-on:
1515
labels: dts-builder
16+
outputs:
17+
qemu_pid: ${{ steps.run_qemu.outputs.qemu_pid }}
1618
steps:
1719
- name: Checkout OSFV repo
1820
uses: actions/checkout@v4
@@ -24,15 +26,11 @@ jobs:
2426
- name: Copy DTS binary
2527
shell: bash
2628
run: |
29+
mkdir open-source-firmware-validation/scripts/ci/qemu-data
2730
bmaptool copy \
2831
--bmap build/tmp/deploy/images/genericx86-64/dts-base-image-genericx86-64.wic.bmap \
2932
build/tmp/deploy/images/genericx86-64/dts-base-image-genericx86-64.wic.gz \
3033
open-source-firmware-validation/scripts/ci/qemu-data/dts.img
31-
- name: Set up Python
32-
uses: actions/setup-python@v5
33-
with:
34-
cache: 'pip'
35-
python-version: '3.12'
3634
- name: Install requirements
3735
shell: bash
3836
run: |
@@ -44,6 +42,7 @@ jobs:
4442
shell: bash
4543
id: run_qemu
4644
run: |
45+
cd open-source-firmware-validation
4746
HDD_PATH=./scripts/ci/qemu-data/dts.img ./scripts/ci/qemu-run.sh nographic os &
4847
pid=$!
4948
echo "qemu_pid=$pid" >> "$GITHUB_OUTPUT"
@@ -71,14 +70,19 @@ jobs:
7170
LOG_DIR: ${{ steps.log_dirs.outputs.directory }}
7271
run: |
7372
cp log.html $LOG_DIR/log.html
74-
- name: Cleanup
75-
if: always()
73+
cleanup:
74+
name: Cleanup
75+
if: always()
76+
needs: run-tests
77+
runs-on:
78+
labels: dts-builder
79+
steps:
80+
- name: Cleanup after tests
7681
shell: bash
7782
run: |
78-
deactivate
79-
qemu_pid="${{ steps.run_qemu.outputs.qemu_pid }}"
83+
qemu_pid="${{ needs.run-tests.outputs.qemu_pid }}"
8084
if [ ! -z "$qemu_pid" ]; then
8185
kill $qemu_pid
8286
fi
8387
cd ..
84-
rm -rf open-source-firmware-validation meta-dts
88+
rm -rf open-source-firmware-validation meta-dts build

0 commit comments

Comments
 (0)