@@ -7,6 +7,9 @@ name: Build executables
77# individual release assets, the same way existing releases already do (so
88# in-place updates via Update.exe keep working).
99#
10+ # All jobs run on GitHub-hosted runners (including the ARM64 leg, via
11+ # GitHub's ubuntu-24.04-arm image) — no self-hosted machine is required.
12+ #
1013# `workflow_call` is included so a future release workflow can trigger a
1114# fresh build directly instead of reusing old artifacts.
1215on :
@@ -32,37 +35,28 @@ jobs:
3235 include :
3336 - os : windows-latest
3437 label : windows
35- hosted : github
3638 pyinstaller : pyinstaller
3739 add_data_sep : " ;"
3840 exe_suffix : " .exe"
39- # GitHub-hosted, so a fresh x86_64 VM every run: the common case,
40- # what almost every Linux desktop needs.
41+ # A fresh x86_64 VM every run: the common case, what almost every
42+ # Linux desktop needs.
4143 - os : ubuntu-22.04
4244 label : linux-x86_64
43- hosted : github
4445 pyinstaller : pyinstaller
4546 add_data_sep : " :"
4647 exe_suffix : " "
47- # Self-hosted (a Raspberry Pi) — the only realistic way to get an
48- # ARM64 build without cross-compiling. NOTE: this binary only runs
49- # on ARM64 Linux (other Pis, ARM SBCs), never on x86_64 desktops.
50- - os : [self-hosted, Linux, ARM64]
48+ # GitHub-hosted ARM64 image. NOTE: this binary only runs on ARM64
49+ # Linux (Raspberry Pis, ARM SBCs), never on x86_64 desktops.
50+ - os : ubuntu-24.04-arm
5151 label : linux-arm64
52- hosted : self
53- pyinstaller : venv/bin/pyinstaller
52+ pyinstaller : pyinstaller
5453 add_data_sep : " :"
5554 exe_suffix : " "
5655 runs-on : ${{ matrix.os }}
5756 steps :
5857 - uses : actions/checkout@v4
5958
60- # actions/setup-python doesn't reliably have a matching download for
61- # every Python version on ARM, and isn't needed anyway: the self-hosted
62- # runner is a persistent machine with its own system Python already
63- # set up (see the apt note below), unlike an ephemeral GitHub-hosted VM.
6459 - uses : actions/setup-python@v5
65- if : matrix.hosted == 'github'
6660 with :
6761 python-version : " 3.12"
6862
7165 # GStreamer bindings. None of this is pip-installable; it has to come
7266 # from apt, on the same interpreter pip installs into.
7367 - name : Install Linux system dependencies
74- if : matrix.label == 'linux-x86_64'
68+ if : startsWith( matrix.label, 'linux-')
7569 run : |
7670 sudo apt-get update
7771 sudo apt-get install -y \
@@ -80,33 +74,11 @@ jobs:
8074 gstreamer1.0-plugins-good gstreamer1.0-pipewire \
8175 python3-dbus libgirepository1.0-dev
8276
83- # The self-hosted runner is persistent, not an ephemeral VM: install
84- # these once by hand instead, so every run doesn't re-apt-get them:
85- # sudo apt-get install -y python3-gi gir1.2-webkit2-4.1 python3-tk \
86- # gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-base \
87- # gstreamer1.0-plugins-good gstreamer1.0-pipewire \
88- # python3-dbus libgirepository1.0-dev python3-venv \
89- # build-essential python3-dev
90- # (the last three are for pip to build python-uinput/pynput from
91- # source on ARM, where prebuilt wheels are less common.)
92-
93- - name : Install Python dependencies (GitHub-hosted)
94- if : matrix.hosted == 'github'
77+ - name : Install Python dependencies
9578 run : |
9679 python -m pip install --upgrade pip
9780 pip install -r requirements.txt pyinstaller
9881
99- # --system-site-packages: the apt packages above (WebKitGTK/GStreamer
100- # bindings) only exist system-wide, not on PyPI, so the venv needs to
101- # see them. Recreated every run for a clean, reproducible build.
102- - name : Install Python dependencies (self-hosted)
103- if : matrix.hosted == 'self'
104- run : |
105- rm -rf venv
106- python3 -m venv --system-site-packages venv
107- venv/bin/pip install --upgrade pip
108- venv/bin/pip install -r requirements.txt pyinstaller
109-
11082 - name : Build Text2Pen
11183 run : ${{ matrix.pyinstaller }} --onefile --noconsole --add-data "webui${{ matrix.add_data_sep }}webui" --name Text2Pen Text2Pen.py
11284
0 commit comments