macos #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: macos | |
on: | |
workflow_run: | |
workflows: ["MAIN_CI"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
release_macos: | |
runs-on: macos-12 | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Install prerequisites | |
run: | | |
brew install create-dmg | |
- 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_macos | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: main_ci.yml | |
workflow_conclusion: success | |
name: quard_star_tools_macos | |
- name: release_packet | |
shell: bash -l {0} | |
run: | | |
tar -xzvf output.tar.gz | |
tar -xzvf quard_star_tools.tar.gz | |
tar -xzvf qemu_macos.tar.gz | |
rm -rf output.tar.gz quard_star_tools.tar.gz | |
rm -rf output/busybox output/qemu | |
rm -rf ./gui_tools/quard_star_tools_macos/._quard_star_tools.dmg | |
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 | |
mv ./gui_tools/quard_star_tools_macos/installer_background.png ./installer_background.png | |
sudo hdiutil attach ./gui_tools/quard_star_tools_macos/quard_star_tools.dmg | |
cp -R /Volumes/quard_star_tools/quard_star_tools.app ./ | |
mv ./output ./quard_star_tools.app/Contents/Frameworks/output | |
mv run.sh ./quard_star_tools.app/Contents/Frameworks/run.sh | |
create-dmg --volname "quard_star_tools" --background "installer_background.png" --window-pos 200 120 --window-size 800 450 --icon-size 100 --icon "quard_star_tools.app" 200 190 --app-drop-link 600 185 "quard_star_tools.dmg" "quard_star_tools.app" | |
tar -czf release_macos.tar.gz quard_star_tools.dmg | |
- name: Upload build asserts | |
uses: actions/[email protected] | |
with: | |
name: release_macos | |
path: | | |
release_macos.tar.gz | |
test_macos: | |
runs-on: macos-12 | |
needs: [release_macos] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: release_macos | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Install prerequisites | |
run: | | |
brew install libffi gettext glib pkg-config autoconf automake pixman ninja coreutils | |
tar -xzvf release_macos.tar.gz | |
sudo hdiutil attach quard_star_tools.dmg | |
cp -R /Volumes/quard_star_tools/quard_star_tools.app ./ | |
- name: Run tests sd boot | |
shell: bash -l {0} | |
run: | | |
cd ./quard_star_tools.app/Contents/Frameworks | |
AUDIO_PARAM="-audiodev none,id=audio0" gtimeout --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 | |
} |