windows #265
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
name: windows | |
on: | |
workflow_run: | |
workflows: ["MAIN_CI"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
release_windows: | |
runs-on: ubuntu-20.04 | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: main_ci.yml | |
workflow_conclusion: success | |
name: output | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: main_ci.yml | |
workflow_conclusion: success | |
name: qemu_w64 | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: main_ci.yml | |
workflow_conclusion: success | |
name: quard_star_tools_w64 | |
- name: release_packet | |
shell: bash -l {0} | |
run: | | |
tar -xzvf output.tar.gz | |
rm -rf output.tar.gz update_tools.sh update_tools run.sh | |
rm -rf output/busybox output/qemu | |
rm -rf ./output/lowlevelboot/lowlevelboot.elf | |
rm -rf ./output/lowlevelboot/lowlevelboot.hex | |
rm -rf ./output/lowlevelboot/lowlevelboot.lst | |
rm -rf ./output/lowlevelboot/lowlevelboot.map | |
rm -rf ./output/mask_rom/mask_rom.elf | |
rm -rf ./output/mask_rom/mask_rom.hex | |
rm -rf ./output/mask_rom/mask_rom.lst | |
rm -rf ./output/mask_rom/mask_rom.map | |
rm -rf ./output/opensbi/fw_jump.elf | |
rm -rf ./output/opensbi/fw_jump.lst | |
rm -rf ./output/trusted_domain/trusted_fw.elf | |
rm -rf ./output/trusted_domain/trusted_fw.hex | |
rm -rf ./output/trusted_domain/trusted_fw.lst | |
rm -rf ./output/trusted_domain/trusted_fw.map | |
rm -rf ./output/uboot/u-boot.elf | |
rm -rf ./output/uboot/u-boot.lst | |
rm -rf ./output/uboot/u-boot.map | |
zip -r release_win64.zip gui_tools/ output/ run.bat run_quard_star_tools.bat | |
- name: Upload build asserts | |
uses: actions/[email protected] | |
with: | |
name: release_win64 | |
path: | | |
release_win64.zip | |
test_windows: | |
runs-on: windows-2022 | |
needs: [release_windows] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: release_win64 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Install prerequisites | |
run: | | |
Choco-Install -PackageName unzip --force | |
unzip release_win64.zip | |
- uses: msys2/setup-msys2@v2 | |
- name: sed script | |
shell: msys2 {0} | |
run: | | |
sed -i 's/-audiodev dsound,id=audio0/-audiodev none,id=audio0/g' run.bat | |
- name: Run tests | |
shell: msys2 {0} | |
run: | | |
timeout --foreground -s SIGKILL 60m ./run.bat nographic > >(tee run_qemu.log) || { | |
echo | |
if cat run_qemu.log | grep "init process" | |
then | |
echo "Kernel boot successfully" | |
else | |
echo "Kernel boot failed" | |
ps -W | awk '/qemu-system-riscv64.exe/,NF=1' | xargs kill -f | |
exit 1 | |
fi | |
if cat run_qemu.log | grep "Welcome debugging on Qemu Quard Star board!" | |
then | |
ps -W | awk '/qemu-system-riscv64.exe/,NF=1' | xargs kill -f | |
echo "Pass simulation" | |
else | |
ps -W | awk '/qemu-system-riscv64.exe/,NF=1' | xargs kill -f | |
echo "Failed in init process" | |
exit 1 | |
fi | |
} |