2323
2424jobs :
2525
26- build-package :
26+ build-windows-wheels :
2727
2828 runs-on : windows-2022
2929 strategy :
@@ -74,25 +74,120 @@ jobs:
7474 cd %GITHUB_WORKSPACE%
7575 python -m setup bdist_wheel --plat-name win_amd64 --dist-dir dist
7676
77- - uses : actions/upload-artifact@v4
77+ - name : Upload Windows ${{ matrix.python-version }} Wheel
78+ uses : actions/upload-artifact@v4
7879 with :
79- name : pltools wheel
80- path : |
81- ${{ github.workspace }}/dist/*.whl
82- ${{ github.workspace }}/dist/*.tar.gz
83- retention-days : 1
84- if-no-files-found : error
80+ name : windowsbuild${{ matrix.python-version }}
81+ path : ${{ github.workspace }}/dist/*.whl
82+ overwrite : true
83+
84+ build-linux-wheels :
85+
86+ runs-on : ubuntu-22.04
87+ env :
88+ CXX : g++-10
89+ strategy :
90+ matrix :
91+ python-version : ["3.14"]
92+
93+ steps :
94+
95+ - name : Checkout
96+ uses : actions/checkout@v4
97+
98+ - name : Setup Python ${{ matrix.python-version }}
99+ uses : actions/setup-python@v5
100+ with :
101+ python-version : ${{ matrix.python-version }}
102+
103+ - name : Show Python build paths
104+ run : |
105+ python -c "import sys, sysconfig; print(sys.executable); print(sys.version)"
106+ python -c "import sysconfig; print('include=', sysconfig.get_paths()['include'])"
107+ python -c "import sysconfig; print('platinclude=', sysconfig.get_paths().get('platinclude'))"
108+ python -c "import sysconfig; print('EXT_SUFFIX=', sysconfig.get_config_var('EXT_SUFFIX'))"
109+
110+ - name : Install Dependencies
111+ run : |
112+ wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
113+ 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
114+ sudo apt update
115+ sudo apt install vulkan-sdk
116+ sudo apt install libx11-dev
117+ sudo apt install libxkbcommon-x11-dev
118+ sudo apt install libx11-xcb-dev
119+ sudo apt install libxcb-xfixes0-dev
120+ sudo apt install libxcb-cursor-dev
121+ sudo apt install libxcb-cursor0
122+ sudo apt install libxcb-keysyms1-dev
123+ sudo apt install libxcursor-dev
124+ sudo apt install libxrandr-dev
125+ sudo apt install libxinerama-dev
126+ sudo apt install libgl-dev
127+ sudo apt install libxi-dev
128+ cd $GITHUB_WORKSPACE
129+ cd ..
130+ git clone https://github.com/PilotLightTech/pilotlight
131+ cd pilotlight-python
132+
133+ - name : Build Package
134+ run : |
135+ cd $GITHUB_WORKSPACE
136+ cd scripts
137+ python3 gen_build.py
138+ cd ../src
139+ chmod +x build.sh
140+ ./build.sh -c deploy
141+ cd ..
142+
143+ - name : Build Wheel
144+ run : |
145+ cd $GITHUB_WORKSPACE
146+ python -m pip install --upgrade pip twine wheel setuptools
147+ python -m setup bdist_wheel --plat-name manylinux1_x86_64 --dist-dir dist
148+
149+ - name : Upload Linux ${{ matrix.python-version }} Wheel
150+ uses : actions/upload-artifact@v4
151+ with :
152+ name : linuxbuild${{ matrix.python-version }}
153+ path : ${{ github.workspace }}/dist/*.whl
154+ overwrite : true
155+
156+ deploy-packages :
157+
158+ needs : [build-windows-wheels, build-linux-wheels]
159+ runs-on : windows-2022
160+
161+ steps :
162+
163+ - name : Checkout
164+ uses : actions/checkout@v4
165+
166+ - name : Set up Python 3.9
167+ uses : actions/setup-python@v5
168+ with :
169+ python-version : 3.9
170+
171+ - name : Install Dependencies
172+ run : |
173+ python -m pip install --upgrade pip setuptools wheel twine
174+
175+ - name : Download artifacts
176+ uses : actions/download-artifact@v4
85177
86178 - name : PyPi Deployment
87179 shell : cmd
88180 if : ${{contains(github.event.inputs.deploy, 'true') && github.ref == 'refs/heads/master'}}
89181 run : |
90- python -m pip install twine
91- python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing
182+ python -m twine upload windowsbuild*/* -u __token__ -p ${{ secrets.PYPI_PASSWORD }} --skip-existing
183+ python -m twine upload apple10sbuild*/* -u __token__ -p ${{ secrets.PYPI_PASSWORD }} --skip-existing
184+ python -m twine upload linuxbuild*/* -u __token__ -p ${{ secrets.PYPI_PASSWORD }} --skip-existing
92185
93186 - name : Test PyPi Deployment
94187 shell : cmd
95- if : ${{ contains(github.event.inputs.deploytest, 'true') && github.ref == 'refs/heads/master'}}
188+ if : " contains(github.event.inputs.deploytest, 'true')"
96189 run : |
97- python -m pip install twine
98- python -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing
190+ dir
191+ python -m twine upload --repository testpypi windowsbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing
192+ python -m twine upload --repository testpypi apple10sbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing
193+ python -m twine upload --repository testpypi linuxbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing
0 commit comments