linux #257
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: linux | |
on: | |
workflow_run: | |
workflows: ["MAIN_CI"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
release_linux: | |
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: quard_star_tools | |
- name: release_packet | |
shell: bash -l {0} | |
run: | | |
tar -xzvf output.tar.gz | |
tar -xzvf quard_star_tools.tar.gz | |
rm -rf output.tar.gz quard_star_tools.tar.gz | |
rm -rf output/busybox | |
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 | |
tar -czf release_linux.tar.gz gui_tools/ update_tools/ output/ run.sh update_tools.sh run_quard_star_tools.sh | |
- name: Upload build asserts | |
uses: actions/[email protected] | |
with: | |
name: release_linux | |
path: | | |
release_linux.tar.gz | |
test_linux: | |
runs-on: ubuntu-20.04 | |
needs: [release_linux] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: release_linux | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Install prerequisites | |
shell: bash -l {0} | |
run: | | |
sudo apt update | |
sudo apt install -y wget device-tree-compiler ninja-build git build-essential \ | |
pkg-config zlib1g-dev libsdl2-dev libglib2.0-0 libglib2.0-dev libsdl1.2-dev \ | |
libpixman-1-dev libfdt-dev autoconf automake libtool librbd-dev libaio-dev flex \ | |
bison make cmake gcc python3 ninja-build vim swig python3-dev libedit-dev \ | |
libncurses5-dev liblzma-dev lua5.3 liblua5.3-dev libxml2-dev doxygen graphviz \ | |
ninja-build pkg-config libglib2.0-dev libpixman-1-dev libgtk-3-dev libcap-ng-dev \ | |
libattr1-dev device-tree-compiler bison gperf intltool mtd-utils libslirp-dev \ | |
libvirglrenderer-dev libsdl2-image-dev | |
tar -xzvf release_linux.tar.gz | |
- name: Run tests sd boot | |
shell: bash -l {0} | |
run: | | |
AUDIO_PARAM="-audiodev none,id=audio0" timeout --foreground -s SIGKILL 3m ./run.sh nographic default sd > >(tee run_qemu.log) || { | |
echo | |
if cat run_qemu.log | grep "init process" | |
then | |
echo "Kernel boot successfully" | |
else | |
echo "Kernel boot failed" | |
killall qemu-system-riscv64 | |
exit 1 | |
fi | |
if cat run_qemu.log | grep "Welcome debugging on Qemu Quard Star board!" | |
then | |
killall qemu-system-riscv64 | |
echo "Pass simulation" | |
else | |
killall qemu-system-riscv64 | |
echo "Failed in init process" | |
exit 1 | |
fi | |
} |