Skip to content

Commit 174ea82

Browse files
committed
WIP
1 parent fceb685 commit 174ea82

File tree

2 files changed

+189
-1
lines changed

2 files changed

+189
-1
lines changed

.github/workflows/build.yml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
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+
strategy:
27+
matrix:
28+
python-version: [ 3.14 ]
29+
30+
steps:
31+
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Retrieve submodules
41+
run: git submodule update --init --recursive
42+
43+
- name: Install Dependencies
44+
run: |
45+
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.296.0/windows/VulkanSDK-1.3.296.0-Installer.exe" -OutFile VulkanSDK.exe
46+
# ./VulkanSDK.exe --help
47+
./VulkanSDK.exe --accept-licenses --default-answer --root D:/a/VulkanSDK --confirm-command install
48+
python -m pip install pl-build
49+
cd ..
50+
git clone https://github.com/PilotLightTech/pilotlight
51+
cd pilotlight-python
52+
53+
- name: Prep 1
54+
shell: cmd
55+
run: |
56+
cd scripts
57+
python gen_build.py
58+
build_python_for_win32.bat
59+
60+
- name: Build Pilot Light Python
61+
shell: cmd
62+
run: |
63+
set VULKAN_SDK=D:/a/VulkanSDK
64+
cd src
65+
call build.bat
66+
cd ..
67+
if not exist out/pilotlight_python.exe exit 1
68+
if not exist out/glfwd.lib exit 1
69+
if not exist out/pl_platform_ext.lib exit 1
70+
if not exist out/python3.dll exit 1
71+
if not exist out/python314_d.dll exit 1
72+
if not exist pilotlight/pilotlight_d.pyd exit 1
73+
74+
MacOS:
75+
76+
runs-on: macos-latest
77+
strategy:
78+
matrix:
79+
python-version: [ 3.14 ]
80+
81+
steps:
82+
83+
- name: Checkout
84+
uses: actions/checkout@v4
85+
86+
- name: Setup Python ${{ matrix.python-version }}
87+
uses: actions/setup-python@v5
88+
with:
89+
python-version: ${{ matrix.python-version }}
90+
91+
- name: Retrieve submodules
92+
run: git submodule update --init --recursive
93+
94+
- name: Install Dependencies
95+
run: |
96+
curl https://sdk.lunarg.com/sdk/download/1.3.283.0/mac/vulkansdk-macos-1.3.283.0.dmg -o vk.dmg
97+
hdiutil attach vk.dmg
98+
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
99+
python3 -m pip install pl-build
100+
cd ..
101+
git clone https://github.com/PilotLightTech/pilotlight
102+
cd pilotlight-python
103+
104+
- name: Prep 1
105+
run: |
106+
cd $GITHUB_WORKSPACE
107+
cd scripts
108+
python3 gen_build.py
109+
chmod +x build_python_for_mac.sh
110+
./build_python_for_mac.sh
111+
112+
- name: Build Pilot Light Python
113+
run: |
114+
cd $GITHUB_WORKSPACE
115+
cd src
116+
chmod +x build.sh
117+
./build.sh
118+
cd ..
119+
test -f ./out/pilotlight_python || exit 1
120+
test -f ./out/gltfd.a || exit 1
121+
test -f ./out/pl_platform_ext.a || exit 1
122+
test -f ./pilotlight/pilotlight.so || exit 1
123+
124+
Ubuntu:
125+
126+
runs-on: ubuntu-22.04
127+
strategy:
128+
matrix:
129+
python-version: [ 3.14 ]
130+
131+
steps:
132+
133+
- name: Checkout
134+
uses: actions/checkout@v4
135+
136+
- name: Setup Python ${{ matrix.python-version }}
137+
uses: actions/setup-python@v5
138+
with:
139+
python-version: ${{ matrix.python-version }}
140+
141+
- name: Retrieve submodules
142+
run: git submodule update --init --recursive
143+
144+
- name: Install Dependencies
145+
run: |
146+
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
147+
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
148+
sudo apt update
149+
sudo apt install vulkan-sdk
150+
sudo apt install libx11-dev
151+
sudo apt install libxkbcommon-x11-dev
152+
sudo apt install libx11-xcb-dev
153+
sudo apt install libxcb-xfixes0-dev
154+
sudo apt install libxcb-cursor-dev
155+
sudo apt install libxcb-cursor0
156+
sudo apt install libxcb-keysyms1-dev
157+
sudo apt install libxcursor-dev
158+
sudo apt install libxrandr-dev
159+
sudo apt install libxinerama-dev
160+
sudo apt install libgl-dev
161+
sudo apt install libxi-dev
162+
python3 -m pip install pl-build
163+
cd ..
164+
git clone https://github.com/PilotLightTech/pilotlight
165+
cd pilotlight-python
166+
167+
- name: Prep 1
168+
run: |
169+
cd $GITHUB_WORKSPACE
170+
cd scripts
171+
python3 gen_build.py
172+
chmod +x build_python_for_linux.sh
173+
./build_python_for_linux.sh
174+
175+
- name: Build Pilot Light Python
176+
run: |
177+
cd $GITHUB_WORKSPACE
178+
cd src
179+
chmod +x build.sh
180+
./build.sh
181+
cd ..
182+
test -f ./out/pilotlight_python || exit 1
183+
test -f ./out/gltfd.a || exit 1
184+
test -f ./out/pl_platform_ext.a || exit 1
185+
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)