This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Set a timeout on qemu job and do not terminate with an error
Add a separate ci script for testing on qemu. Signed-off-by: Maxim Polyakov <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 'CI: i386: Build all. Test' | ||
name: 'CI [i386] Full testing cycle' | ||
|
||
on: | ||
push: | ||
|
@@ -16,7 +16,7 @@ env: | |
|
||
jobs: | ||
build-all-components: | ||
name: 'CI: i386: Build all' | ||
name: 'CI [i386] Build all' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Step 1: Clone the project repo' | ||
|
@@ -51,7 +51,7 @@ jobs: | |
path: ./*.exe | ||
creating-qemu-image: | ||
needs: build-all-components | ||
name: 'CI: i386: Create the QEMU bootable image' | ||
name: 'CI [i386] Create the QEMU bootable image' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Step 1: Repo' | ||
|
@@ -79,11 +79,12 @@ jobs: | |
name: '${{ env.VERSION }}-boot-disk-img-artifact' | ||
path: boot-disk.img | ||
test-on-qemu: | ||
needs: creating-qemu-image | ||
name: 'CI: i386: Create the QEMU bootable disk image' | ||
needs: build-all-components | ||
name: 'CI [i386] Run exe on QEMU' | ||
runs-on: ubuntu-latest | ||
continue-on-error: false | ||
steps: | ||
- name: 'Step 1: checkout Repo' | ||
- name: 'Step 1: Checkout Repo' | ||
uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
|
@@ -98,11 +99,9 @@ jobs: | |
run: | | ||
sudo apt-get update | ||
sudo apt-get install -yy qemu-system-i386 | ||
- name: 'Step 4: Dowmload artifact with the QEMU disk image' | ||
- name: 'Step 4: Dowmload artifact with exe image' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: '${{ env.VERSION }}-boot-disk-img-artifact' | ||
- name: 'Step 5: Test the image on QEMU' | ||
timeout-minutes: 10 | ||
run: | | ||
qemu-system-i386 -m 128 -hda boot-disk.img -M q35 -nographic | ||
name: '${{ env.VERSION }}-exe-artifact' | ||
- name: 'Step 5: Test exe on QEMU' | ||
run: timeout 5 ./ci/ci-test-exe-on-qemu.sh || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
CI_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))" | ||
ROOT_DIR="${CI_DIR}/.." | ||
|
||
filename=$(basename ${ROOT_DIR}/*.exe) | ||
echo "Run ${filename} on QEMU" | ||
qemu-system-i386 -machine type=q35 -m 128 -no-reboot -append "--video=off --console=/dev/com1" -nographic -kernel ${ROOT_DIR}/$filename |