-
Notifications
You must be signed in to change notification settings - Fork 1
235 lines (198 loc) · 6.52 KB
/
build.yml
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
232
233
234
235
name: Build
on:
push:
paths-ignore:
- "**/**.md"
pull_request:
branches:
- master
paths-ignore:
- "**/**.md"
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
actions: none
checks: none
contents: write
deployments: none
issues: none
packages: read
pull-requests: none
repository-projects: none
security-events: none
statuses: read
env:
VCPKG_COMMITTISH: 53bef8994c541b6561884a8395ea35715ece75db
jobs:
build_windows:
name: Windows
runs-on: windows-2022
strategy:
fail-fast: false
env:
CMAKE_BUILD_TYPE: ${{startsWith(github.ref, 'refs/tags/') && 'Release' || 'RelWithDebInfo'}}
CMAKE_GENERATOR: Visual Studio 17 2022
VCPKG_TRIPLET: x64-windows
NSIS_INSTALLER: ${{startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF'}}
PKG_EXTENSION: ${{startsWith(github.ref, 'refs/tags/') && '.exe' || '.zip'}}
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
- name: Setup Overlays
uses: actions/checkout@v4
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Configure
run: |
mkdir C:/vcpkg_buildtrees
cmake -S . -B build \
-G "${{env.CMAKE_GENERATOR}}" \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_OVERLAY_PORTS=build/overlays/ports \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}} \
-DNSIS_INSTALLER=${{env.NSIS_INSTALLER}} \
-DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=c:/vcpkg_buildtrees"
- name: Build
run: cmake --build build --target package --config ${{env.CMAKE_BUILD_TYPE}}
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: Windows build
path: build/*${{env.PKG_EXTENSION}}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*${{env.PKG_EXTENSION}}
build_macos:
name: macOS
runs-on: macos-12
if: false
strategy:
fail-fast: false
matrix:
config:
- name: Intel
OSX_ARCH: x86_64
VCPKG_TRIPLET: x64-osx
- name: Apple Silicon
OSX_ARCH: arm64
VCPKG_TRIPLET: arm64-osx
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
cache-key: vcpkg-macOS-${{matrix.config.OSX_ARCH}}-${{github.sha}}
cache-restore-keys: vcpkg-macOS-${{matrix.config.OSX_ARCH}}-
- name: Setup Overlays
uses: actions/checkout@v3
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Install Dependencies
run: brew install nasm automake autoconf-archive ninja
- name: Configure
run: cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_OSX_ARCHITECTURES=${{matrix.config.OSX_ARCH}}
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_OVERLAY_PORTS=build/overlays/ports
-DVCPKG_TARGET_TRIPLET=${{matrix.config.VCPKG_TRIPLET}}
-DDMG=ON
- name: Build
run: cmake --build build --target dmg
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: macOS (${{matrix.config.name}}) build
path: build/*.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*.dmg
build_linux:
name: Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: Ubuntu
docker_image: ubuntu:23.10
package_type: DEB
package_ext: .deb
- name: Fedora
docker_image: fedora:39
package_type: RPM
package_ext: .rpm
env:
VCPKG_TRIPLET: x64-linux
CMAKE_BUILD_TYPE: Release
container:
image: ${{matrix.config.docker_image}}
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "Install dependencies"
run: |
if [[ "${{matrix.config.name}}" == "Ubuntu" ]]; then
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y curl zip unzip tar build-essential git cmake pkg-config python3 nasm qtbase5-dev qttools5-dev
fi
if [[ "${{matrix.config.name}}" == "Fedora" ]]; then
dnf install -y curl zip unzip tar git make pkg-config gcc-c++ fedora-packager rpmdevtools cmake nasm qt5-qtbase-devel qt5-qttools-devel
fi
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
cache-key: vcpkg-${{matrix.config.name}}-${{github.sha}}
cache-restore-keys: vcpkg-${{matrix.config.name}}-
- name: Setup Overlays
uses: actions/checkout@v3
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Configure
run: cmake -S . -B build
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}}
-DVCPKG_OVERLAY_PORTS=build/overlays/ports
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DSTRIP_BINARY=ON
-DQT_VERSION=5
-DPACKAGE=${{matrix.config.package_type}}
- name: Build
run: cmake --build build --target package
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}} build
path: build/*${{matrix.config.package_ext}}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*${{matrix.config.package_ext}}
token: ${{secrets.ACTIONS_SECRET}}