Skip to content

Commit 3eefd04

Browse files
committed
WIP
1 parent fceb685 commit 3eefd04

File tree

2 files changed

+165
-1
lines changed

2 files changed

+165
-1
lines changed

.github/workflows/build.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
name: Build
2+
3+
on:
4+
5+
schedule:
6+
- cron: '0 1 * * 1'
7+
8+
push:
9+
10+
branches:
11+
- master
12+
- dev
13+
- feature/*
14+
- dev/*
15+
- fix/*
16+
17+
pull_request:
18+
19+
workflow_dispatch:
20+
21+
jobs:
22+
23+
Windows:
24+
25+
runs-on: windows-2022
26+
27+
steps:
28+
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Retrieve submodules
33+
run: git submodule update --init --recursive
34+
35+
- name: Install Dependencies
36+
run: |
37+
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.296.0/windows/VulkanSDK-1.3.296.0-Installer.exe" -OutFile VulkanSDK.exe
38+
# ./VulkanSDK.exe --help
39+
./VulkanSDK.exe --accept-licenses --default-answer --root D:/a/VulkanSDK --confirm-command install
40+
python -m pip install pl-build
41+
cd ..
42+
git clone https://github.com/PilotLightTech/pilotlight
43+
cd pilotlight-python
44+
45+
- name: Prep 1
46+
shell: cmd
47+
run: |
48+
cd scripts
49+
python gen_build.py
50+
build_python_for_win32.bat
51+
52+
- name: Build Pilot Light Python
53+
shell: cmd
54+
run: |
55+
set VULKAN_SDK=D:/a/VulkanSDK
56+
cd src
57+
call build.bat
58+
cd ..
59+
if not exist out/pilotlight_python.exe exit 1
60+
if not exist out/glfwd.lib exit 1
61+
if not exist out/pl_platform_ext.lib exit 1
62+
if not exist out/python3.dll exit 1
63+
if not exist out/python314_d.dll exit 1
64+
if not exist pilotlight/pilotlight_d.pyd exit 1
65+
66+
MacOS:
67+
68+
runs-on: macos-14
69+
70+
steps:
71+
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
75+
- name: Retrieve submodules
76+
run: git submodule update --init --recursive
77+
78+
- name: Install Dependencies
79+
run: |
80+
curl https://sdk.lunarg.com/sdk/download/1.3.283.0/mac/vulkansdk-macos-1.3.283.0.dmg -o vk.dmg
81+
hdiutil attach vk.dmg
82+
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
83+
python3 -m pip install pl-build
84+
cd ..
85+
git clone https://github.com/PilotLightTech/pilotlight
86+
cd pilotlight-python
87+
88+
- name: Prep 1
89+
run: |
90+
cd $GITHUB_WORKSPACE
91+
cd scripts
92+
python3 gen_build.py
93+
chmod +x build_python_for_mac.sh
94+
./build_python_for_mac.sh
95+
96+
- name: Build Pilot Light Python
97+
run: |
98+
cd $GITHUB_WORKSPACE
99+
cd src
100+
chmod +x build.sh
101+
./build.sh
102+
cd ..
103+
test -f ./out/pilotlight_python || exit 1
104+
test -f ./out/gltfd.a || exit 1
105+
test -f ./out/pl_platform_ext.a || exit 1
106+
test -f ./pilotlight/pilotlight.so || exit 1
107+
108+
Ubuntu:
109+
110+
runs-on: ubuntu-22.04
111+
112+
steps:
113+
114+
- name: Checkout
115+
uses: actions/checkout@v4
116+
117+
- name: Retrieve submodules
118+
run: git submodule update --init --recursive
119+
120+
- name: Install Dependencies
121+
run: |
122+
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
123+
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.4.309-jammy.list https://packages.lunarg.com/vulkan/1.4.309/lunarg-vulkan-1.4.309-jammy.list
124+
sudo apt update
125+
sudo apt install vulkan-sdk
126+
sudo apt install libx11-dev
127+
sudo apt install libxkbcommon-x11-dev
128+
sudo apt install libx11-xcb-dev
129+
sudo apt install libxcb-xfixes0-dev
130+
sudo apt install libxcb-cursor-dev
131+
sudo apt install libxcb-cursor0
132+
sudo apt install libxcb-keysyms1-dev
133+
sudo apt install libxcursor-dev
134+
sudo apt install libxrandr-dev
135+
sudo apt install libxinerama-dev
136+
sudo apt install libgl-dev
137+
sudo apt install libxi-dev
138+
python3 -m pip install pl-build
139+
cd ..
140+
git clone https://github.com/PilotLightTech/pilotlight
141+
cd pilotlight-python
142+
143+
- name: Prep 1
144+
run: |
145+
cd $GITHUB_WORKSPACE
146+
cd scripts
147+
python3 gen_build.py
148+
chmod +x build_python_for_linux.sh
149+
./build_python_for_linux.sh
150+
151+
- name: Build Pilot Light Python
152+
run: |
153+
cd $GITHUB_WORKSPACE
154+
cd src
155+
chmod +x build.sh
156+
./build.sh
157+
cd ..
158+
test -f ./out/pilotlight_python || exit 1
159+
test -f ./out/gltfd.a || exit 1
160+
test -f ./out/pl_platform_ext.a || exit 1
161+
test -f ./pilotlight/pilotlight.so || exit 1

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
cd ../src
6767
build.bat -c deploy
6868
cd ..
69+
if not exist pilotlight/pilotlight.pyd exit 1
6970
7071
- name: Build Wheel
7172
shell: cmd
@@ -141,6 +142,7 @@ jobs:
141142
chmod +x build.sh
142143
./build.sh -c deploy
143144
cd ..
145+
test -f ./pilotlight/pilotlight.so || exit 1
144146
145147
- name: Build Wheel
146148
run: |
@@ -205,7 +207,8 @@ jobs:
205207
chmod +x build.sh
206208
./build.sh -c deploy
207209
cd ..
208-
210+
test -f ./pilotlight/pilotlight.so || exit 1
211+
209212
- name: Build Wheel
210213
run: |
211214
cd $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)