Skip to content

Commit aaef3a2

Browse files
committed
build: setup ci
1 parent 311cda7 commit aaef3a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4954
-625
lines changed

.github/workflows/build.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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: Build Python
54+
shell: cmd
55+
run: |
56+
cd scripts
57+
python gen_build.py
58+
build_python_for_win32.bat
59+
60+
- name: Build Binaries
61+
shell: cmd
62+
run: |
63+
set VULKAN_SDK=D:/a/VulkanSDK
64+
cd src
65+
call build.bat
66+
if %ERRORLEVEL% NEQ 0 exit 1
67+
68+
MacOS:
69+
70+
runs-on: macos-latest
71+
env:
72+
CXX: g++-10
73+
strategy:
74+
matrix:
75+
python-version: [ 3.14 ]
76+
77+
steps:
78+
79+
- name: Checkout
80+
uses: actions/checkout@v4
81+
82+
- name: Setup Python ${{ matrix.python-version }}
83+
uses: actions/setup-python@v5
84+
with:
85+
python-version: ${{ matrix.python-version }}
86+
87+
- name: Retrieve submodules
88+
run: git submodule update --init --recursive
89+
90+
- name: Install Dependencies
91+
run: |
92+
curl https://sdk.lunarg.com/sdk/download/1.3.283.0/mac/vulkansdk-macos-1.3.283.0.dmg -o vk.dmg
93+
hdiutil attach vk.dmg
94+
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
95+
python3 -m pip install pl-build
96+
cd ..
97+
git clone https://github.com/PilotLightTech/pilotlight
98+
cd pilotlight-python
99+
100+
- name: Build Python
101+
run: |
102+
cd $GITHUB_WORKSPACE
103+
cd scripts
104+
python3 gen_build.py
105+
chmod +x build_python_for_mac.sh
106+
./build_python_for_mac.sh
107+
108+
- name: Build Binaries
109+
run: |
110+
cd $GITHUB_WORKSPACE
111+
cd src
112+
chmod +x build.sh
113+
./build.sh || exit 1
114+
115+
Ubuntu:
116+
117+
runs-on: ubuntu-22.04
118+
strategy:
119+
matrix:
120+
python-version: [ 3.14 ]
121+
122+
steps:
123+
124+
- name: Checkout
125+
uses: actions/checkout@v4
126+
127+
- name: Setup Python ${{ matrix.python-version }}
128+
uses: actions/setup-python@v5
129+
with:
130+
python-version: ${{ matrix.python-version }}
131+
132+
- name: Retrieve submodules
133+
run: git submodule update --init --recursive
134+
135+
- name: Install Dependencies
136+
run: |
137+
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
138+
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
139+
sudo apt update
140+
sudo apt install vulkan-sdk
141+
sudo apt install libx11-dev
142+
sudo apt install libxkbcommon-x11-dev
143+
sudo apt install libx11-xcb-dev
144+
sudo apt install libxcb-xfixes0-dev
145+
sudo apt install libxcb-cursor-dev
146+
sudo apt install libxcb-cursor0
147+
sudo apt install libxcb-keysyms1-dev
148+
sudo apt install libxcursor-dev
149+
sudo apt install libxrandr-dev
150+
sudo apt install libxinerama-dev
151+
sudo apt install libgl-dev
152+
sudo apt install libxi-dev
153+
python3 -m pip install pl-build
154+
cd ..
155+
git clone https://github.com/PilotLightTech/pilotlight
156+
cd pilotlight-python
157+
158+
- name: Build Python
159+
run: |
160+
cd $GITHUB_WORKSPACE
161+
cd scripts
162+
python3 gen_build.py
163+
chmod +x build_python_for_linux.sh
164+
./build_python_for_linux.sh
165+
166+
- name: Build Binaries
167+
run: |
168+
cd $GITHUB_WORKSPACE
169+
cd src
170+
chmod +x build.sh
171+
./build.sh || exit 1

0 commit comments

Comments
 (0)