-
-
Notifications
You must be signed in to change notification settings - Fork 59
172 lines (142 loc) · 5.22 KB
/
build.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Build executables
on:
push:
branches: [ master, build ]
pull_request:
branches: [ master, develop ]
jobs:
build-nix:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Gather build version (*nix)
run: |
mkdir dist
echo "::set-env name=VERSION::$(python scripts/get_version.py)"
echo "::set-env name=ARCH::$(python scripts/get_arch.py)"
echo Building branch ${{ env.GITHUB_REF }} - version ${{ env.VERSION }} - on ${{ env.ARCH }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Install PySide6 apt Requirements
run: |
sudo apt update
sudo apt install libopengl0 freeglut3 freeglut3-dev libxcb-icccm4 libxkbcommon-x11-0 libxcb-xkb1 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-image0 libxcb-shape0-dev libxcb-cursor-dev -y
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
pip install .
pip install .[develop]
- name: Grab iso-639 lists
run: |
cp $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
cp $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
- name: Build single executable
run: pyinstaller FastFlix_Nix_OneFile.spec
- name: Copy license to dist
run: |
cp docs/build-licenses.txt dist/LICENSE
- name: Test executable
run: |
chmod +x dist/FastFlix
dist/FastFlix --version
dist/FastFlix --test
- name: Archive excutables
run: |
pushd dist
7z a -mm=Deflate -mfb=258 -mpass=15 FastFlix_${{ env.VERSION }}_${{ matrix.os }}_${{ env.ARCH }}.zip *
popd
- name: Build Mac App
if : ${{ startsWith(matrix.os, 'macos') }}
run: |
python scripts/build_mac_app.py ${{ matrix.os }}
pushd dist
7z a -mm=Deflate -mfb=258 -mpass=15 FastFlix_${{ env.VERSION }}_appbundle_${{ matrix.os }}_${{ env.ARCH }}.zip FastFlix.app
popd
- name: Upload executable artifacts
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_OUTER_DO_NOT_UPLOAD_${{ matrix.os }}_${{ env.ARCH }}
path: dist/*.zip
build-windows-2022:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Gather build version
shell: powershell
run: |
mkdir dist
New-Item -Path Env: -Name VERSION -Value $(python.exe scripts\get_version.py)
echo "Building branch $env:GITHUB_REF - version $env:VERSION"
echo "::set-env name=VERSION::$env:VERSION"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
pip install .
pip install .[develop]
- name: Grab iso-639 lists
shell: powershell
run: |
copy $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
copy $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
- name: Build single executable
shell: cmd
run: pyinstaller FastFlix_Windows_OneFile.spec
- name: Build installer executable
shell: cmd
run: pyinstaller FastFlix_Windows_Installer.spec
- uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CODE_CERT_B64 }}'
password: '${{ secrets.CODE_CERT_PASS }}'
certificatesha1: '${{ secrets.CODE_CERT_THUMB }}'
description: 'FastFlix'
timestampUrl: 'http://timestamp.sectigo.com'
folder: 'dist\FastFlix'
recursive: false
- name: Package installer
shell: cmd
run: |
makensis.exe FastFlix.nsi
move FastFlix_installer.exe dist\FastFlix_${{ env.VERSION }}_installer.exe
- uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CODE_CERT_B64 }}'
password: '${{ secrets.CODE_CERT_PASS }}'
certificatesha1: '${{ secrets.CODE_CERT_THUMB }}'
description: 'FastFlix'
timestampUrl: 'http://timestamp.sectigo.com'
folder: 'dist'
recursive: false
- name: Test executable
run: |
dist\FastFlix.exe --version
dist\FastFlix.exe --test
- name: Package single executable
shell: cmd
run: |
move dist\*.exe .
move docs\build-licenses.txt LICENSE
- name: Upload standalone executable artifact
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_win64
path: |
FastFlix.exe
LICENSE
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_installer
path: FastFlix_${{ env.VERSION }}_installer.exe