mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Installing meant cloning the repository and running a shell script, which is a fair ask of somebody who already has a terminal open and no ask at all of anybody else. The releases page now carries an AppImage and a disk image per Mac architecture: a push to master rebuilds a rolling "latest", a v* tag publishes a version and leaves it there, and the Run button in the Actions tab raises the number by running scripts/release.sh, which is the same script and not a second copy of what it does. Two things in the application had to give for that. A build has no __main__.py on disk, and an AppImage is mounted somewhere new every run, so the command a shortcut is registered with cannot go on being this interpreter and this file; ipc.launcher() answers with the AppImage or the bundle instead. And a build carries its own libstdc++, which every process it starts inherits through LD_LIBRARY_PATH and none of them can live with: ffmpeg, ydotool and wl-copy are the distribution's binaries built against the distribution's libraries, and AppImageLauncher, which is what starting the AppImage again goes through, refuses outright. integrate.py puts that variable back before anything else runs. Nothing installs itself over an installation that is already there. install.sh's menu entry, install-mac.sh's login item and the desktop file AppImageLauncher writes are each recognised and left alone, so trying a download once does not quietly move the machine onto it. `dikte integrate` is how you ask for it outright, and --remove takes it back. The disk image carries an ffmpeg, pinned and checksummed, because macOS records through one and ships nothing like it. It is signed ad-hoc and not with an Apple certificate, so a first launch is refused until Open Anyway and the permissions are asked for again after each update; both READMEs and the release notes say so.
80 lines
2.6 KiB
YAML
80 lines
2.6 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python: ["3.11", "3.12", "3.13"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
# PyQt6 ships Qt itself, but Qt still loads these from the system, even
|
|
# for the offscreen platform the tests run on. QtNetwork wants the Kerberos
|
|
# library, and the widgets want fontconfig, whether or not anything is
|
|
# ever drawn.
|
|
- name: Install the Qt runtime libraries
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --no-install-recommends -y \
|
|
libegl1 libgl1 libxkbcommon0 libdbus-1-3 libglib2.0-0 \
|
|
libfontconfig1 libfreetype6 libgssapi-krb5-2
|
|
|
|
- name: Install PyQt6
|
|
run: python -m pip install --quiet PyQt6
|
|
|
|
# Nothing else is needed: the code is standard library and PyQt6, and the
|
|
# tests reach neither the network nor a sound device.
|
|
- name: Run the tests
|
|
run: python -m unittest discover --verbose
|
|
|
|
# The macOS backends are written to be checked from either side, so most of
|
|
# what runs here also runs above. What only this job can catch is the half
|
|
# that reads the real platform: the Carbon and CoreGraphics libraries have to
|
|
# be there to be opened, the paths under ~/Library have to be the ones macOS
|
|
# actually uses, and the Linux tests are skipped rather than failed.
|
|
macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python: ["3.11", "3.13"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
# No apt step: PyQt6's wheel carries the frameworks it needs on a Mac.
|
|
- name: Install PyQt6
|
|
run: python -m pip install --quiet PyQt6
|
|
|
|
- name: Run the tests
|
|
run: python -m unittest discover --verbose
|
|
|
|
# The installer is most of what is new on a Mac, and a syntax error in it
|
|
# would otherwise only turn up on somebody's machine. Running it is not on
|
|
# the table here: it wants a microphone, a login session and a keychain.
|
|
- name: Check the installer parses
|
|
run: |
|
|
bash -n install.sh
|
|
bash -n scripts/install-mac.sh
|
|
bash -n scripts/update.sh
|
|
bash -n scripts/uninstall.sh
|
|
bash -n scripts/release.sh
|
|
bash -n packaging/build-appimage.sh
|
|
bash -n packaging/build-dmg.sh
|