-
Notifications
You must be signed in to change notification settings - Fork 1
127 lines (110 loc) · 3.72 KB
/
pyinstaller.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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: 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
- 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}}"