fix: file names with space would fail; shows error message if cant bi… #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- GUI | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
permissions: write-all | |
name: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
- name: 'Linux-x64' | |
os: ubuntu-latest | |
- name: 'macOS-x64' | |
arch: x86-64 | |
os: macos-latest | |
- name: 'macOS-arm64' | |
arch: arm64 | |
os: macos-latest | |
- name: 'Windows-x64' | |
arch: x86-64 | |
os: windows-latest | |
env: | |
BUILD_PATH: ${{ github.workspace }}/ | |
INSTALL_PATH: ${{ github.workspace }}/dist | |
ARCHIVE_NAME: ffglitch-livecoding-${{ matrix.name }}.zip | |
steps: | |
- name: Update python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download ffglitch binaries | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
curl https://bgo.la/ffglitch-0.10.2-bugfix-builds/ffglitch-0.10.2-linux-x86_64.zip -o ffglitch-0.10.2-linux-x86_64.zip | |
unzip ffglitch-0.10.2-linux-x86_64.zip | |
mv ffglitch-0.10.2-linux-x86_64 bin/ | |
- name: Download ffglitch binaries | |
if: runner.os == 'macOS' && runner.arch == 'arm64' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
curl https://bgo.la/ffglitch-0.10.2-bugfix-builds/ffglitch-0.10.2-macos-aarch64.zip -o ffglitch-0.10.2-macos-aarch64.zip | |
unzip ffglitch-0.10.2-macos-aarch64.zip | |
mv ffglitch-0.10.2-macos-aarch64 bin/ | |
- name: Download ffglitch binaries | |
if: runner.os == 'macOS' && runner.arch == 'x86-64' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
curl https://bgo.la/ffglitch-0.10.2-bugfix-builds/ffglitch-0.10.2-macos-x86_64.zip -o ffglitch-0.10.2-macos-x86_64.zip | |
unzip ffglitch-0.10.2-macos-x86_64.zip | |
mv ffglitch-0.10.2-macos-x86_64 bin/ | |
- name: Download ffglitch binaries | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
curl https://bgo.la/ffglitch-0.10.2-bugfix-builds/ffglitch-0.10.2-windows-x86_64.zip -o ffglitch-0.10.2-windows-x86_64.zip | |
unzip ffglitch-0.10.2-windows-x86_64.zip | |
mv ffglitch-0.10.2-windows-x86_64 bin/ | |
# Build | |
- name: Prepare pyinstaller | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
python -m venv env | |
. env/bin/activate | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Prepare pyinstaller | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
python -m venv env | |
. env/Scripts/activate | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Run pyinstaller | |
if: runner.os != 'Windows' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
. env/bin/activate | |
pyinstaller zmqserver_livecoding_watchdog.py --onefile --windowed --add-data "scripts:scripts" --add-data "bin:bin" | |
- name: Run pyinstaller | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
cd $BUILD_PATH | |
. env/Scripts/activate | |
pyinstaller zmqserver_livecoding_watchdog.py --onefile --windowed --add-data "scripts;scripts" --add-data "bin;bin" | |
# Gather all files in a zip | |
- name: Zip up build (Unix) | |
if: runner.os != 'Windows' | |
shell: bash | |
working-directory: ${{ env.INSTALL_PATH }} | |
run: zip -r "$ARCHIVE_NAME" zmqserver_livecoding_watchdog* | |
- name: Zip up build (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
working-directory: ${{ env.INSTALL_PATH }} | |
run: 7z a "$ARCHIVE_NAME" -tzip zmqserver_livecoding_watchdog* | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts-${{ matrix.name }} | |
path: "${{ env.INSTALL_PATH }}/${{env.ARCHIVE_NAME}}" |