chore: cleanup properly on macos shutdown #381
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: Build | |
on: | |
schedule: | |
- cron: '0 1 * * 1' | |
push: | |
branches: | |
- master | |
- dev | |
- feature/* | |
- dev/* | |
- fix/* | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
Windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Retrieve submodules | |
run: git submodule update --init --recursive | |
- name: Install Dependencies | |
run: | | |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.224.1/windows/VulkanSDK-1.3.224.1-Installer.exe" -OutFile VulkanSDK.exe | |
# ./VulkanSDK.exe --help | |
./VulkanSDK.exe --accept-licenses --default-answer --root D:/a/VulkanSDK --confirm-command install | |
- name: Build Pilot Light | |
shell: cmd | |
run: | | |
set VULKAN_SDK=D:/a/VulkanSDK | |
cd scripts | |
python gen_build.py | |
cd ../src | |
call build.bat | |
cd ../examples | |
call build.bat | |
if not exist ../out/app.dll exit 1 | |
if not exist ../out/example_0.dll exit 1 | |
if not exist ../out/example_1.dll exit 1 | |
if not exist ../out/example_2.dll exit 1 | |
if not exist ../out/example_3.dll exit 1 | |
if not exist ../out/example_4.dll exit 1 | |
if not exist ../out/example_5.dll exit 1 | |
if not exist ../out/example_6.dll exit 1 | |
if not exist ../out/example_8.dll exit 1 | |
if not exist ../out/pilot_light.exe exit 1 | |
if not exist ../out/pilot_light.dll exit 1 | |
if not exist ../out/pl_script_camera.dll exit 1 | |
if not exist ../out/pilot_light.lib exit 1 | |
- name: Package Pilot Light | |
shell: cmd | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd scripts | |
python package.py | |
- name: Upload Pilot Light | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pilotlight_release_win32 | |
path: D:\a\pilotlight\pilotlight\out\pilotlight_win32.zip | |
overwrite: true | |
MacOS: | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Retrieve submodules | |
run: git submodule update --init --recursive | |
- name: Install Dependencies | |
run: | | |
curl https://sdk.lunarg.com/sdk/download/1.3.283.0/mac/vulkansdk-macos-1.3.283.0.dmg -o vk.dmg | |
hdiutil attach vk.dmg | |
sudo /Volumes/vulkansdk-macos-1.3.283.0/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK/1.3.283.0 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.usr com.lunarg.vulkan.sdl2 com.lunarg.vulkan.glm com.lunarg.vulkan.volk com.lunarg.vulkan.vma com.lunarg.vulkan.ios | |
- name: Build Pilot Light | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd scripts | |
python3 gen_build.py | |
cd ../src | |
chmod +x build.sh | |
./build.sh | |
cd ../examples | |
chmod +x build.sh | |
./build.sh | |
cd .. | |
cd out | |
chmod +x pilot_light | |
cd .. | |
test -f ./out/pilot_light || exit 1 | |
test -f ./out/app.dylib || exit 1 | |
test -f ./out/example_0.dylib || exit 1 | |
test -f ./out/example_1.dylib || exit 1 | |
test -f ./out/example_2.dylib || exit 1 | |
test -f ./out/example_3.dylib || exit 1 | |
test -f ./out/example_4.dylib || exit 1 | |
test -f ./out/example_5.dylib || exit 1 | |
test -f ./out/example_6.dylib || exit 1 | |
test -f ./out/example_8.dylib || exit 1 | |
test -f ./out/pilot_light.dylib || exit 1 | |
test -f ./out/pl_script_camera.dylib || exit 1 | |
test -f ./out/libpilot_light.a || exit 1 | |
- name: Package Pilot Light | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd scripts | |
python3 package.py | |
- name: Upload Pilot Light | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pilotlight_release_macos | |
path: /Users/runner/work/pilotlight/pilotlight/out/pilotlight_macos.zip | |
overwrite: true | |
Ubuntu: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Retrieve submodules | |
run: git submodule update --init --recursive | |
- name: Install Dependencies | |
run: | | |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - | |
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.224-focal.list https://packages.lunarg.com/vulkan/1.3.224/lunarg-vulkan-1.3.224-focal.list | |
sudo apt update | |
sudo apt install vulkan-sdk | |
sudo apt install libx11-dev | |
sudo apt install libxkbcommon-x11-dev | |
sudo apt install libx11-xcb-dev | |
sudo apt install libxcb-xfixes0-dev | |
sudo apt install libxcb-cursor-dev | |
sudo apt install libxcb-cursor0 | |
sudo apt install libxcb-keysyms1-dev | |
- name: Build Pilot Light | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd scripts | |
python3 gen_build.py | |
cd ../src | |
chmod +x build.sh | |
./build.sh | |
cd ../examples | |
chmod +x build.sh | |
./build.sh | |
cd .. | |
cd out | |
chmod +x pilot_light | |
cd .. | |
test -f ./out/pilot_light || exit 1 | |
test -f ./out/app.so || exit 1 | |
test -f ./out/example_0.so || exit 1 | |
test -f ./out/example_1.so || exit 1 | |
test -f ./out/example_2.so || exit 1 | |
test -f ./out/example_3.so || exit 1 | |
test -f ./out/example_4.so || exit 1 | |
test -f ./out/example_5.so || exit 1 | |
test -f ./out/example_6.so || exit 1 | |
test -f ./out/example_8.so || exit 1 | |
test -f ./out/pilot_light.so || exit 1 | |
test -f ./out/pl_script_camera.so || exit 1 | |
test -f ./out/pilot_light.a || exit 1 | |
- name: Package Pilot Light | |
run: | | |
cd $GITHUB_WORKSPACE | |
cd scripts | |
python3 package.py | |
pwd | |
- name: Upload Pilot Light | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pilotlight_release_linux | |
path: /home/runner/work/pilotlight/pilotlight/out/pilotlight_linux_amd64.zip | |
overwrite: true |