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: action: Use script to test qemu disk image
Signed-off-by: Maxim Polyakov <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
2 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 |
---|---|---|
|
@@ -78,7 +78,7 @@ jobs: | |
with: | ||
name: '${{ env.VERSION }}-boot-disk-img-artifact' | ||
path: boot-disk.img | ||
test-on-qemu: | ||
test-exe-on-qemu: | ||
needs: build-all-components | ||
name: 'CI [i386] Run exe on QEMU' | ||
runs-on: ubuntu-latest | ||
|
@@ -97,11 +97,38 @@ jobs: | |
echo "::set-env name=VERSION::$pversion" | ||
- name: 'Step 3: Install QEMU' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get update | ||
sudo apt-get install -yy qemu-system-i386 | ||
- name: 'Step 4: Dowmload artifact with exe image' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
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 | ||
test-image-on-qemu: | ||
needs: creating-qemu-image | ||
name: 'CI [i386] Check virtual disk image' | ||
runs-on: ubuntu-latest | ||
continue-on-error: false | ||
steps: | ||
- name: 'Step 1: Checkout Repo' | ||
uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- name: 'Step 2: Make preparations' | ||
run: | | ||
./preparations.sh | ||
pversion=$(bash ./ci/ci-generate-version.sh --arch ${{ env.RTEMS_ARCH }} --bsp ${{ env.RTEMS_BSP }} --branch ${{ github.head_ref }}) | ||
echo ${pversion} | ||
echo "::set-env name=VERSION::$pversion" | ||
- name: 'Step 3: Install QEMU' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -yy qemu-system-i386 | ||
- name: 'Step 4: Dowmload artifact with QEMU disk image' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: '${{ env.VERSION }}-boot-disk-img-artifact' | ||
- name: 'Step 5: Test disk image on QEMU' | ||
run: timeout 10 ./ci/ci-test-image-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}/*.img) | ||
echo "Use ${filename} disk image file to test on QEMU" | ||
qemu-system-i386 -m 128 -hda ${ROOT_DIR}/${filename} -M q35 -nographic |