-
-
Notifications
You must be signed in to change notification settings - Fork 47
313 lines (305 loc) · 11.7 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
name: build
on:
push:
env:
CACHE_VERSION: 1
DEBIAN_FRONTEND: noninteractive
DESTDIR: /tmp/destdir
LIBGL_ALWAYS_SOFTWARE: 'true'
jobs:
linux:
strategy:
matrix:
include:
- name: amd64
cflags:
ldflags:
prefix: x86_64-linux-gnu
- name: arm64
cflags:
ldflags:
prefix: aarch64-linux-gnu
- name: armhf
cflags: -mfpu=neon-vfpv4 -mfloat-abi=hard
ldflags:
prefix: arm-linux-gnueabihf
- name: i386
cflags:
ldflags:
prefix: i686-linux-gnu
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Set up dependencies
run: |
dpkg --add-architecture ${{ matrix.name }}
if [ "${{ matrix.name }}" != "amd64" ] && [ "${{ matrix.name }}" != "i386" ]; then
sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
echo "deb [arch=${{ matrix.name }}] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | tee -a /etc/apt/sources.list
echo "deb [arch=${{ matrix.name }}] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list
echo "deb [arch=${{ matrix.name }}] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | tee -a /etc/apt/sources.list
fi
apt-get update -qq
apt-get install -yqq \
build-essential \
git \
meson \
g++-${{ matrix.prefix }} \
libasound2-dev:${{ matrix.name }} \
libfftw3-dev:${{ matrix.name }} \
libfreetype6-dev:${{ matrix.name }} \
libgl1-mesa-dev:${{ matrix.name }} \
libx11-dev:${{ matrix.name }} \
libxcomposite-dev:${{ matrix.name }} \
libxcursor-dev:${{ matrix.name }} \
libxrender-dev:${{ matrix.name }}
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
env:
AR: ${{ matrix.prefix }}-ar
CC: ${{ matrix.prefix }}-gcc
CXX: ${{ matrix.prefix }}-g++
LD: ${{ matrix.prefix }}-ld
NM: ${{ matrix.prefix }}-nm
STRIP: ${{ matrix.prefix }}-strip
CFLAGS: ${{ matrix.cflags }}
CXXFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }} -static-libgcc -static-libstdc++
PKG_CONFIG_PATH: /usr/lib/${{ matrix.prefix }}/pkgconfig
run: |
meson build --buildtype=release --prefix=/usr
ninja -C build
- name: Install
run: |
ninja -C build install
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack binaries
run: |
tar czf ${{ github.event.repository.name }}-linux-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C ${{ env.DESTDIR }}/usr/lib lv2 vst vst3
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-linux-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.tar.gz
windows:
strategy:
matrix:
include:
- name: win32
prefix: i686
- name: win64
prefix: x86-64
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
steps:
- name: Set up dependencies
run: |
dpkg --add-architecture i386
apt-get update -qq
apt-get install -yqq \
build-essential \
git \
meson \
wine-stable \
xvfb \
binutils-mingw-w64-${{ matrix.prefix }} \
g++-mingw-w64-${{ matrix.prefix }}
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
env:
WINEARCH: ${{ matrix.name }}
WINEDEBUG: -all
WINEDLLOVERRIDES: mscoree,mshtml=
WINEPREFIX: /tmp/wine
run: |
wineboot -u
meson build --buildtype=release --prefix=/usr --cross-file scripts/meson/${{ matrix.name }}.ini
ninja -C build
- name: Install
run: |
ninja -C build install
- name: Set sha8 (release)
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
run: |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack binaries
run: |
tar czf ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C ${{ env.DESTDIR }}/usr/lib lv2 vst vst3
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.tar.gz
#linux-x86_64-debug:
#runs-on: ubuntu-20.04
#steps:
#- uses: actions/checkout@v3
#with:
#submodules: recursive
#- name: Set up dependencies
#run: |
#sudo apt-get update -qq
#sudo apt-get install -yqq build-essential meson
#sudo apt-get install -yqq libasound2-dev libfftw3-dev libfreetype6-dev libgl1-mesa-dev libx11-dev libxcomposite-dev libxcursor-dev libxrender-dev
#- name: Build linux x86_64 (debug)
#env:
#LDFLAGS: -static-libgcc -static-libstdc++
#run: |
#meson build --buildtype=debug --prefix=/usr
#ninja -C build
#- name: Install linux x86_64 (debug)
#run: |
#ninja -C build install
#- name: Set sha8
#id: slug
#run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
#- name: Pack binaries
#run: |
#tar czf ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C ${{ env.DESTDIR }}/usr/lib lv2 vst vst3
#- uses: actions/upload-artifact@v3
#with:
#name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
#path: |
#*.tar.gz
#linux-x86_64-embed:
#runs-on: ubuntu-20.04
#steps:
#- uses: actions/checkout@v3
#with:
#submodules: recursive
#- name: Set up dependencies
#run: |
#sudo apt-get update -qq
#sudo apt-get install -yqq build-essential meson
#sudo apt-get install -yqq libasound2-dev libfftw3-dev
#- name: Build linux x86_64 (embed)
#run: |
#meson build --buildtype=release --prefix=/usr -Dlinux-embed=true
#ninja -C build
#macos-intel:
#runs-on: macos-11
#steps:
#- uses: actions/checkout@v3
#with:
#submodules: recursive
##- name: Set up cache
##id: cache
##uses: actions/cache@v3
##with:
##path: |
##build
##key: macos-intel-v${{ env.CACHE_VERSION }}
#- name: Set up dependencies
#run: |
#brew install meson
#- name: Build macOS intel
#env:
#CFLAGS: -arch x86_64 -mmacosx-version-min=10.8 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_8 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_8
#CXXFLAGS: -arch x86_64 -mmacosx-version-min=10.8 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_8 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_8
#LDFLAGS: -arch x86_64 -mmacosx-version-min=10.8 -stdlib=libc++
#run: |
#meson build --buildtype=release --prefix=/usr
#ninja -C build
#- name: Install macOS intel
#run: |
#ninja -C build install
#- name: Set sha8 (non-release)
#if: startsWith(github.ref, 'refs/tags/') != true
#id: slug1
#run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
#- name: Set sha8 (release)
#if: startsWith(github.ref, 'refs/tags/')
#id: slug2
#run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
#- name: Set sha8
#id: slug
#run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
#- name: Pack binaries
#run: |
#tar czf ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C ${{ env.DESTDIR }}/usr/lib lv2 vst vst3
#- uses: actions/upload-artifact@v3
#with:
#name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
#path: |
#*.tar.gz
#macos-universal:
#runs-on: macos-11
#steps:
#- uses: actions/checkout@v3
#with:
#submodules: recursive
##- name: Set up cache
##id: cache
##uses: actions/cache@v3
##with:
##path: |
##build
##key: macos-universal-v${{ env.CACHE_VERSION }}
#- name: Set up dependencies
#run: |
#brew install meson
#- name: Build macOS universal
#env:
#CFLAGS: -mmacosx-version-min=10.12 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_12
#CXXFLAGS: -mmacosx-version-min=10.12 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_12
#LDFLAGS: -mmacosx-version-min=10.12
#run: |
#meson build --buildtype=release --prefix=/usr -Dbuild-universal=true
#ninja -C build
#- name: Install macOS universal
#run: |
#ninja -C build install
#- name: Set sha8 (non-release)
#if: startsWith(github.ref, 'refs/tags/') != true
#id: slug1
#run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
#- name: Set sha8 (release)
#if: startsWith(github.ref, 'refs/tags/')
#id: slug2
#run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
#- name: Set sha8
#id: slug
#run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
#- name: Pack binaries
#run: |
#tar czf ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C ${{ env.DESTDIR }}/usr/lib lv2 vst vst3
#- uses: actions/upload-artifact@v3
#with:
#name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
#path: |
#*.tar.gz