| 1 |
name: pyinstaller_build |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
build: |
| 7 |
runs-on: ${{ matrix.os }} |
| 8 |
strategy: |
| 9 |
fail-fast: false |
| 10 |
matrix: |
| 11 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 12 |
python-version: ["3.12"] |
| 13 |
|
| 14 |
steps: |
| 15 |
- uses: actions/checkout@v4 |
| 16 |
with: |
| 17 |
submodules: "recursive" |
| 18 |
|
| 19 |
- name: Set up Python |
| 20 |
uses: actions/setup-python@v5 |
| 21 |
with: |
| 22 |
python-version: ${{ matrix.python-version }} |
| 23 |
|
| 24 |
- name: Install linux libraries |
| 25 |
shell: bash |
| 26 |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' }} |
| 27 |
run: | |
| 28 |
sudo apt update |
| 29 |
sudo apt install libegl1 libopengl0 libevent-2.1-7 libopus0 libminizip1 libpulse0 \ |
| 30 |
libxcb-icccm4 libxcb-image0 libxcb-cursor0 libxcb-keysyms1 libxcb-xkb1 libxcb-shape0 \ |
| 31 |
libxkbcommon-x11-0 libxcb-render-util0 libxml2 libxml2-dev libxslt1-dev libxslt1.1 libxslt-dev python3-dev |
| 32 |
|
| 33 |
- name: Install Python packages |
| 34 |
run: | |
| 35 |
pip install tox |
| 36 |
|
| 37 |
- name: Build the executable |
| 38 |
run: | |
| 39 |
tox -e pyinstaller -- --distpath dist/${{ matrix.os }} --noconfirm --clean |
| 40 |
|
| 41 |
# see: https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts |
| 42 |
- name: Archive dist artifacts |
| 43 |
uses: actions/upload-artifact@v4 |
| 44 |
with: |
| 45 |
name: pyinstaller-${{ matrix.os }} |
| 46 |
path: dist/${{ matrix.os }}/** |
| 47 |
if-no-files-found: error |