-
Notifications
You must be signed in to change notification settings - Fork 39
341 lines (337 loc) · 13.4 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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
name: build
on:
push:
branches:
- "*"
tags:
- "v*.*.*"
pull_request:
branches:
- "*"
env:
PAWPAW_VERSION: c37490457b3b9a8183d99145ab0cbf8921da03a8
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
linux64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq python3-pip lv2-dev libfftw3-dev ninja-build
sudo pip install meson
- name: Build noise-repellent
shell: bash
run: |
meson build --buildtype release --prefix /tmp --libdir /tmp
meson compile -v -C build
meson install -C build --skip-subprojects
mv /tmp/lv2/nrepellent.lv2 ./nrepellent.lv2
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Pack build
shell: bash
run: |
zip -r noise-repellent-linux64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} ./nrepellent.lv2
- uses: actions/upload-artifact@v2
with:
name: noise-repellent-linux64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: noise-repellent-linux64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip
- name: Get release version number
if: startsWith(github.ref, 'refs/tags/')
id: get_version
uses: battila7/get-version-action@v2
- name: Rename zip if tag branch
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
mv noise-repellent-linux64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip noise-repellent-linux64-${{ steps.get_version.outputs.version }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
noise-repellent-linux64-${{ steps.get_version.outputs.version }}.zip
macos_universal:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: macos-universal
- name: Set up dependencies
run: |
brew install meson ninja
- name: Fix up Xcode
run: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
sudo xcode-select -s /Applications/Xcode_12.3.app
- name: Bootstrap macOS universal
shell: bash
run: |
if [ ! -d PawPaw ]; then
git clone https://github.com/DISTRHO/PawPaw.git
git -C PawPaw checkout ${PAWPAW_VERSION}
fi
./PawPaw/bootstrap-plugins.sh macos-universal && ./PawPaw/.cleanup.sh macos-universal
- name: Build noise-repellent
shell: bash
run: |
pushd PawPaw && source local.env macos-universal && popd
meson build --buildtype release --prefix /tmp --libdir /tmp
meson compile -v -C build
meson install -C build --skip-subprojects
mv /tmp/lv2/nrepellent.lv2 ./nrepellent.lv2
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Pack build
shell: bash
run: |
zip -r noise-repellent-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} ./nrepellent.lv2
- uses: actions/upload-artifact@v2
with:
name: noise-repellent-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: noise-repellent-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip
- name: Get release version number
if: startsWith(github.ref, 'refs/tags/')
id: get_version
uses: battila7/get-version-action@v2
- name: Rename zip if tag branch
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
mv noise-repellent-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip noise-repellent-macOS-universal-${{ steps.get_version.outputs.version }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
noise-repellent-macOS-universal-${{ steps.get_version.outputs.version }}.zip
macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: macos
- name: Set up dependencies
run: |
brew install meson ninja
- name: Bootstrap macOS intel
shell: bash
run: |
if [ ! -d PawPaw ]; then
git clone https://github.com/DISTRHO/PawPaw.git
git -C PawPaw checkout ${PAWPAW_VERSION}
fi
./PawPaw/bootstrap-plugins.sh macos && ./PawPaw/.cleanup.sh macos
- name: Build noise-repellent
shell: bash
run: |
pushd PawPaw && source local.env macos && popd
meson build --buildtype release --prefix /tmp --libdir /tmp
meson compile -v -C build
meson install -C build --skip-subprojects
mv /tmp/lv2/nrepellent.lv2 ./nrepellent.lv2
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Pack build
shell: bash
run: |
zip -r noise-repellent-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} ./nrepellent.lv2
- uses: actions/upload-artifact@v2
with:
name: noise-repellent-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: noise-repellent-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip
- name: Get release version number
if: startsWith(github.ref, 'refs/tags/')
id: get_version
uses: battila7/get-version-action@v2
- name: Rename zip if tag branch
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
mv noise-repellent-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip noise-repellent-macOS-intel-${{ steps.get_version.outputs.version }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
noise-repellent-macOS-intel-${{ steps.get_version.outputs.version }}.zip
win32:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/debs
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: win32
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Fix GitHub's mess
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt-get install -qy build-essential ninja-build python3-pip mingw-w64 \
binutils-mingw-w64-i686 g++-mingw-w64-i686 wine-stable:i386 wine-binfmt
sudo pip install meson
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs && \
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win32 cross-compiled
shell: bash
run: |
if [ ! -d PawPaw ]; then
git clone https://github.com/DISTRHO/PawPaw.git
git -C PawPaw checkout ${PAWPAW_VERSION}
fi
./PawPaw/bootstrap-plugins.sh win32 && ./PawPaw/.cleanup.sh win32
- name: Build noise-repellent
shell: bash
run: |
pushd PawPaw && source local.env win32 && popd
wineboot -u
meson build --buildtype release --prefix /tmp --libdir /tmp --cross-file $PWD/setup/win32.ini
meson compile -v -C build
meson install -C build --skip-subprojects
mv /tmp/lv2/nrepellent.lv2 ./nrepellent.lv2
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Pack build
shell: bash
run: |
zip -r noise-repellent-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} ./nrepellent.lv2
- name: Get release version number
if: startsWith(github.ref, 'refs/tags/')
id: get_version
uses: battila7/get-version-action@v2
- uses: actions/upload-artifact@v2
with:
name: noise-repellent-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: noise-repellent-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip
- name: Rename zip if tag branch
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
mv noise-repellent-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip noise-repellent-win32-${{ steps.get_version.outputs.version }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
noise-repellent-win32-${{ steps.get_version.outputs.version }}.zip
win64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/debs
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: win64
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Fix GitHub's mess
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
- name: Set up dependencies
run: |
sudo apt update
sudo apt-get install -qy build-essential ninja-build python3-pip mingw-w64 \
binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine-stable wine-binfmt
sudo pip install meson
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs && \
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win64 cross-compiled
shell: bash
run: |
if [ ! -d PawPaw ]; then
git clone https://github.com/DISTRHO/PawPaw.git
fi
./PawPaw/bootstrap-plugins.sh win64 && ./PawPaw/.cleanup.sh win64
- name: Build noise-repellent
shell: bash
run: |
pushd PawPaw && source local.env win64 && popd
wineboot -u
meson build --buildtype release --prefix /tmp --libdir /tmp --cross-file $PWD/setup/win64.ini
meson compile -v -C build
meson install -C build --skip-subprojects
mv /tmp/lv2/nrepellent.lv2 ./nrepellent.lv2
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Pack build
shell: bash
run: |
zip -r noise-repellent-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} ./nrepellent.lv2
- uses: actions/upload-artifact@v2
with:
name: noise-repellent-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: noise-repellent-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip
- name: Get release version number
if: startsWith(github.ref, 'refs/tags/')
id: get_version
uses: battila7/get-version-action@v2
- name: Rename zip if tag branch
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
mv noise-repellent-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip noise-repellent-win64-${{ steps.get_version.outputs.version }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
noise-repellent-win64-${{ steps.get_version.outputs.version }}.zip