-
-
Notifications
You must be signed in to change notification settings - Fork 100
231 lines (222 loc) · 7.41 KB
/
ci.yml
File metadata and controls
231 lines (222 loc) · 7.41 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install dependencies
run: sudo apt update && sudo apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.8
build-windows:
name: Build Windows
runs-on: windows-latest
timeout-minutes: 30
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
path-type: inherit
update: true
install: >-
make
wget
zip
p7zip
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install Dependencies
run: >
pacman -Syu &&
pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-mpv
- name: Install Fyne tool
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Package
run: make package_windows
- name: Download mpv dll
run: >
wget https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20260301/mpv-dev-x86_64-20260301-git-05fac7f.7z &&
7z x mpv-dev-x86_64-20260301-git-05fac7f.7z
- name: Download smtc dll
run: >
wget https://github.com/supersonic-app/smtc-dll/releases/download/v0.1.2/SMTC.dll
- name: Generate zip bundle
run: >
zip Supersonic_windows_x64.zip Supersonic.exe libmpv-2.dll SMTC.dll
- name: Generate installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.7
with:
path: win_inno_installscript.iss
- name: Rename installer
run: cp Output/supersonic-installer.exe Supersonic_windows_x64_installer.exe
- name: Upload zip
uses: actions/upload-artifact@v7
with:
name: Supersonic_windows_x64.zip
path: Supersonic_windows_x64.zip
- name: Upload installer
uses: actions/upload-artifact@v7
with:
name: Supersonic_windows_x64_installer.exe
path: Supersonic_windows_x64_installer.exe
build-macos-arm64:
name: Build macOS arm64
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install Dependencies
run: brew install --force mpv && brew install --force dylibbundler
- name: Setup path
run: export C_INCLUDE_PATH=/usr/local/include:/opt/homebrew/include:$C_INCLUDE_PATH && export LIBRARY_PATH=/usr/local/lib:/opt/homebrew/lib:$LIBRARY_PATH
- name: Install Fyne tool
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Package app bundle
run: >
make package_macos &&
make bundledeps_macos_homebrew &&
make zip_macos
- name: Rename artifact
run: mv Supersonic.zip Supersonic_mac_arm64.zip
- name: Upload package
uses: actions/upload-artifact@v7
with:
name: Supersonic_mac_arm64.zip
path: Supersonic_mac_arm64.zip
build-macos-x64:
name: Build macOS x64
runs-on: macos-15-intel
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install Dependencies
run: brew install --force mpv && brew install --force dylibbundler
- name: Setup path
run: export C_INCLUDE_PATH=/usr/local/include:/opt/homebrew/include:$C_INCLUDE_PATH && export LIBRARY_PATH=/usr/local/lib:/opt/homebrew/lib:$LIBRARY_PATH
- name: Install Fyne tool
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Build and package app bundles
run: >
make package_macos &&
cp -r Supersonic.app Supersonic.app.2 &&
make bundledeps_macos_homebrew && make zip_macos &&
mv Supersonic.zip Supersonic_mac_x64_BigSur+.zip &&
rm -r Supersonic.app &&
mv Supersonic.app.2 Supersonic.app &&
make bundledeps_macos_highsierra && make zip_macos &&
mv Supersonic.zip Supersonic_mac_x64_HighSierra+.zip
- name: Upload Big Sur+ package
uses: actions/upload-artifact@v7
with:
name: Supersonic_mac_x64_BigSur+.zip
path: Supersonic_mac_x64_BigSur+.zip
- name: Upload High Sierra+ package
uses: actions/upload-artifact@v7
with:
name: Supersonic_mac_x64_HighSierra+.zip
path: Supersonic_mac_x64_HighSierra+.zip
build-ubuntu-22:
name: Build Ubuntu 22.04
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install dependencies
run: sudo apt update && sudo apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev
- name: Install Fyne tool
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Fyne package
run: make package_linux
- name: Rename artifact
run: mv Supersonic.tar.xz Supersonic_ubuntu22.04_x64.tar.xz
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: Supersonic_ubuntu22.04_x64.tar.xz
path: Supersonic_ubuntu22.04_x64.tar.xz
build-ubuntu-24:
name: Build Ubuntu 24.04
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install dependencies
run: sudo apt update && sudo apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev
- name: Install Fyne tool
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Fyne package
run: make package_linux
- name: Rename artifact
run: mv Supersonic.tar.xz Supersonic_ubuntu24.04_x64.tar.xz
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: Supersonic_ubuntu24.04_x64.tar.xz
path: Supersonic_ubuntu24.04_x64.tar.xz
build-appimage:
name: Build AppImage
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Install dependencies
run: sudo apt update && sudo apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev
- name: Build
run: make build
- name: Make appimage
run: |
chmod +x ./scripts/appimage-build.sh
./scripts/appimage-build.sh --manual-libs
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: Supersonic-x86_64.AppImage
path: Supersonic-x86_64.AppImage