8
8
branches :
9
9
- ' *'
10
10
env :
11
- CACHE_VERSION : 6
12
- DEBIAN_FRONTEND : noninteractive
13
- HOMEBREW_NO_AUTO_UPDATE : 1
14
- PAWPAW_VERSION : 86d947d472e1478af882175ee329a6f769b4d15c
11
+ CACHE_VERSION : 20230704
12
+ PAWPAW_VERSION : 6a3c6a65a89abe221858c3f7635140074506bfc3
15
13
PAWPAW_SKIP_LTO : 1
14
+ PAWPAW_SKIP_GLIB : 1
15
+ PAWPAW_SKIP_LV2 : 1
16
16
17
17
jobs :
18
- # macOS native intel build
19
18
macos :
20
- runs-on : macos-10.15
19
+ strategy :
20
+ matrix :
21
+ target : [intel, universal]
22
+ runs-on : macos-11
21
23
steps :
22
24
- uses : actions/checkout@v3
23
25
with :
@@ -27,40 +29,45 @@ jobs:
27
29
with :
28
30
path : |
29
31
~/PawPawBuilds
30
- key : macos-v${{ env.CACHE_VERSION }}
32
+ key : macos-${{ matrix.target }}- v${{ env.CACHE_VERSION }}
31
33
- name : Set up dependencies
32
34
run : |
33
35
brew install cmake jq meson
34
- - name : Bootstrap macOS intel
36
+ - name : Bootstrap dependencies
35
37
shell : bash
36
38
run : |
37
39
if [ ! -d PawPaw ]; then
38
40
git clone https://github.com/DISTRHO/PawPaw.git
39
41
git -C PawPaw checkout ${PAWPAW_VERSION}
40
42
fi
41
- ./PawPaw/bootstrap-jack2.sh macos && ./PawPaw/.cleanup.sh macos
43
+ ./PawPaw/bootstrap-jack2.sh macos-${{ matrix.target }} && ./PawPaw/.cleanup.sh macos-${{ matrix.target }}
42
44
- name : Build jack2
43
45
shell : bash
44
46
run : |
45
- pushd PawPaw && source local.env macos && popd
47
+ pushd PawPaw && source local.env macos-${{ matrix.target }} && popd
46
48
python ./waf configure --platform=darwin --prefix=/usr/local
47
49
python ./waf build -j $(sysctl -n hw.logicalcpu)
48
50
python ./waf install --destdir=$(pwd)/destdir
49
- - name : Set sha8
50
- id : slug
51
- run : echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
51
+ - name : Set sha8 (non-release)
52
+ if : startsWith(github.ref, 'refs/tags/') != true
53
+ run : echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
54
+ - name : Set sha8 (release)
55
+ if : startsWith(github.ref, 'refs/tags/')
56
+ run : echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
52
57
- name : Generate macOS package
53
58
shell : bash
54
59
run : |
55
- ./macosx/generate-pkg.sh $(pwd)/destdir/usr/local ${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
60
+ ./macosx/generate-pkg.sh $(pwd)/destdir/usr/local ${{ github.event.pull_request.number || env.SHA8 }}
56
61
- uses : actions/upload-artifact@v3
57
62
with :
58
- name : jack2-macOS-intel -${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
63
+ name : jack2-macOS-${{ matrix.target }} -${{ github.event.pull_request.number || env.SHA8 }}
59
64
path : macosx/jack2-osx-*.pkg
60
65
61
- # macOS native universal build
62
- macos_universal :
63
- runs-on : macos-10.15
66
+ windows :
67
+ strategy :
68
+ matrix :
69
+ target : [win32, win64]
70
+ runs-on : ubuntu-22.04
64
71
steps :
65
72
- uses : actions/checkout@v3
66
73
with :
70
77
with :
71
78
path : |
72
79
~/PawPawBuilds
73
- key : macos-universal-v${{ env.CACHE_VERSION }}
74
- - name : Set up dependencies
75
- run : |
76
- brew install cmake jq meson
77
- - name : Fix up Xcode
78
- run : |
79
- sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
80
- sudo xcode-select -s /Applications/Xcode_12.3.app
81
- - name : Bootstrap macOS universal
82
- shell : bash
83
- run : |
84
- if [ ! -d PawPaw ]; then
85
- git clone https://github.com/DISTRHO/PawPaw.git
86
- git -C PawPaw checkout ${PAWPAW_VERSION}
87
- fi
88
- ./PawPaw/bootstrap-jack2.sh macos-universal && ./PawPaw/.cleanup.sh macos-universal
89
- - name : Build jack2
90
- shell : bash
91
- run : |
92
- pushd PawPaw && source local.env macos-universal && popd
93
- python ./waf configure --platform=darwin --prefix=/usr/local
94
- python ./waf build -j $(sysctl -n hw.logicalcpu)
95
- python ./waf install --destdir=$(pwd)/destdir
96
- - name : Set sha8
97
- id : slug
98
- run : echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
99
- - name : Generate macOS package
100
- shell : bash
101
- run : |
102
- ./macosx/generate-pkg.sh $(pwd)/destdir/usr/local ${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
103
- - uses : actions/upload-artifact@v3
104
- with :
105
- name : jack2-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
106
- path : macosx/jack2-osx-*.pkg
107
-
108
- # linux with win32 cross-compilation
109
- win32 :
110
- runs-on : ubuntu-20.04
111
- steps :
112
- - uses : actions/checkout@v3
113
- with :
114
- submodules : recursive
115
- - name : Set up cache
116
- uses : actions/cache@v3
117
- with :
118
- path : |
119
- ~/PawPawBuilds
120
- key : win32-v${{ env.CACHE_VERSION }}
80
+ key : ${{ matrix.target }}-v${{ env.CACHE_VERSION }}
121
81
- name : Restore debian packages cache
122
82
run : |
123
83
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
@@ -126,119 +86,50 @@ jobs:
126
86
- name : Fix GitHub's mess
127
87
run : |
128
88
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
89
+ sudo dpkg --add-architecture i386
129
90
sudo apt-get update -qq
130
- sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
131
- sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
91
+ sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386
132
92
- name : Set up dependencies
93
+ if : ${{ matrix.target == 'win32' }}
133
94
run : |
134
- sudo dpkg --add-architecture i386
135
- sudo apt-get update -qq
136
95
sudo apt-get install -y autopoint build-essential curl cmake jq llvm mingw-w64 xvfb \
137
96
binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
97
+ - name : Set up dependencies
98
+ if : ${{ matrix.target == 'win64' }}
99
+ run : |
100
+ sudo apt-get install -y autopoint build-essential curl cmake jq llvm mingw-w64 xvfb \
101
+ binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
138
102
- name : Cache debian packages
139
103
run : |
140
104
mkdir -p ~/PawPawBuilds/debs && \
141
105
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
142
- - name : Bootstrap win32 cross-compiled
106
+ - name : Bootstrap dependencies
143
107
shell : bash
144
108
run : |
145
109
if [ ! -d PawPaw ]; then
146
110
git clone https://github.com/DISTRHO/PawPaw.git
147
111
git -C PawPaw checkout ${PAWPAW_VERSION}
148
112
fi
149
- ./PawPaw/bootstrap-jack2.sh win32 && ./PawPaw/.cleanup.sh win32
113
+ ./PawPaw/bootstrap-jack2.sh ${{ matrix.target }} && ./PawPaw/.cleanup.sh ${{ matrix.target }}
150
114
- name : Build jack2
151
115
shell : bash
152
116
run : |
153
- pushd PawPaw && source local.env win32 && popd
154
- ./waf configure --platform=win32 --prefix=$(pwd)/destdir --static
117
+ pushd PawPaw && source local.env ${{ matrix.target }} && popd
118
+ export PATH+=":/usr/i686-w64-mingw32/bin"
119
+ export LDFLAGS+="-L~/PawPawBuilds/targets/win64/lib32"
120
+ ./waf configure --platform=win32 --prefix=$(pwd)/destdir --static ${{ matrix.target == 'win64' && '--mixed' || '' }}
155
121
./waf build -j $(nproc)
156
122
./waf install
157
123
- name : Generate MSVC lib files
158
- shell : bash
124
+ if : ${{ matrix.target == 'win32' }}
159
125
run : |
160
126
pushd $(pwd)/destdir/lib
161
127
llvm-dlltool -m i386 -D libjack.dll -d libjack.def -l libjack.lib
162
128
llvm-dlltool -m i386 -D libjacknet.dll -d libjacknet.def -l libjacknet.lib
163
129
llvm-dlltool -m i386 -D libjackserver.dll -d libjackserver.def -l libjackserver.lib
164
130
popd
165
- - name : Set sha8
166
- id : slug
167
- run : echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
168
- - name : Generate Windows installer
169
- shell : bash
170
- run : |
171
- # Setup wine
172
- export WINEDLLOVERRIDES="mscoree,mshtml="
173
- export WINEPREFIX=$(pwd)/innosetup
174
- xvfb-run wineboot -u
175
- # Download and install innosetup
176
- curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o is.exe
177
- xvfb-run wine is.exe /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent
178
- # create installer
179
- ln -sf $(pwd)/destdir windows/inno/win32
180
- pushd windows/inno
181
- echo "#define VERSION \"${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}\"" > version.iss
182
- xvfb-run wine ${WINEPREFIX}/drive_c/InnoSeup/ISCC.exe win32-mini.iss
183
- popd
184
- - uses : actions/upload-artifact@v3
185
- with :
186
- name : jack2-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
187
- path : windows/inno/jack2-*.exe
188
-
189
- # linux with win64 cross-compilation
190
- win64 :
191
- runs-on : ubuntu-20.04
192
- steps :
193
- - uses : actions/checkout@v3
194
- with :
195
- submodules : recursive
196
- - name : Set up cache
197
- uses : actions/cache@v3
198
- with :
199
- path : |
200
- ~/PawPawBuilds
201
- key : win64-v${{ env.CACHE_VERSION }}
202
- - name : Restore debian packages cache
203
- run : |
204
- if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
205
- sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
206
- fi
207
- - name : Fix GitHub's mess
208
- run : |
209
- sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
210
- sudo apt-get update -qq
211
- sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
212
- sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
213
- - name : Set up dependencies
214
- run : |
215
- sudo dpkg --add-architecture i386
216
- sudo apt-get update -qq
217
- sudo apt-get install -y autopoint build-essential curl cmake jq llvm mingw-w64 xvfb \
218
- binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
219
- - name : Cache debian packages
220
- run : |
221
- mkdir -p ~/PawPawBuilds/debs && \
222
- sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
223
- - name : Bootstrap win64 cross-compiled
224
- shell : bash
225
- run : |
226
- if [ ! -d PawPaw ]; then
227
- git clone https://github.com/DISTRHO/PawPaw.git
228
- git -C PawPaw checkout ${PAWPAW_VERSION}
229
- fi
230
- ./PawPaw/bootstrap-jack2.sh win64 && ./PawPaw/.cleanup.sh win64
231
- - name : Build jack2
232
- shell : bash
233
- run : |
234
- pushd PawPaw && source local.env win64 && popd
235
- export PATH+=":/usr/i686-w64-mingw32/bin"
236
- export LDFLAGS+="-L~/PawPawBuilds/targets/win64/lib32"
237
- ./waf configure --platform=win32 --prefix=$(pwd)/destdir --static --mixed
238
- ./waf build -j $(nproc)
239
- ./waf install
240
131
- name : Generate MSVC lib files
241
- shell : bash
132
+ if : ${{ matrix.target == 'win64' }}
242
133
run : |
243
134
# 32bit
244
135
pushd $(pwd)/destdir/lib32
@@ -250,9 +141,12 @@ jobs:
250
141
llvm-dlltool -m i386:x86-64 -D libjacknet64.dll -d libjacknet64.def -l libjacknet64.lib
251
142
llvm-dlltool -m i386:x86-64 -D libjackserver64.dll -d libjackserver64.def -l libjackserver64.lib
252
143
popd
253
- - name : Set sha8
254
- id : slug
255
- run : echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
144
+ - name : Set sha8 (non-release)
145
+ if : startsWith(github.ref, 'refs/tags/') != true
146
+ run : echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
147
+ - name : Set sha8 (release)
148
+ if : startsWith(github.ref, 'refs/tags/')
149
+ run : echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
256
150
- name : Generate Windows installer
257
151
shell : bash
258
152
run : |
@@ -262,60 +156,14 @@ jobs:
262
156
xvfb-run wineboot -u
263
157
# Download and install innosetup
264
158
curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o is.exe
265
- xvfb-run wine64 is.exe /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent
159
+ xvfb-run wine is.exe /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent
266
160
# create installer
267
- ln -sf $(pwd)/destdir windows/inno/win64
161
+ ln -sf $(pwd)/destdir windows/inno/${{ matrix.target }}
268
162
pushd windows/inno
269
- echo "#define VERSION \"${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}\"" > version.iss
270
- xvfb-run wine64 ${WINEPREFIX}/drive_c/InnoSeup/ISCC.exe win64 -mini.iss
163
+ echo "#define VERSION \"${{ github.event.pull_request.number || env.SHA8 }}\"" > version.iss
164
+ xvfb-run wine ${WINEPREFIX}/drive_c/InnoSeup/ISCC.exe ${{ matrix.target }} -mini.iss
271
165
popd
272
166
- uses : actions/upload-artifact@v3
273
167
with :
274
- name : jack2-win64 -${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
168
+ name : jack2-${{ matrix.target }} -${{ github.event.pull_request.number || env.SHA8 }}
275
169
path : windows/inno/jack2-*.exe
276
-
277
- # ubuntu-20.04
278
- # ubuntu_20_04:
279
- # runs-on: ubuntu-20.04
280
- # steps:
281
- # - uses: actions/checkout@v3
282
- # with:
283
- # submodules: recursive
284
- # - name: Set up cache
285
- # uses: actions/cache@v3
286
- # with:
287
- # path: |
288
- # ~/debs
289
- # key: ubuntu-20.04-v${{ env.CACHE_VERSION }}
290
- # - name: Restore debian packages cache
291
- # run: |
292
- # if [ -d ~/debs ] && [ "$(ls ~/debs | wc -l)" -ne 0 ]; then \
293
- # sudo cp ~/debs/*.deb /var/cache/apt/archives/; \
294
- # fi
295
- # - name: Set up dependencies
296
- # run: |
297
- # sudo add-apt-repository -y ppa:ubuntustudio-ppa/backports
298
- # sudo sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list /etc/apt/sources.list.d/*.list
299
- # sudo apt-get update -qq
300
- # sudo apt-get build-dep jackd2
301
- # sudo apt-get install devscripts
302
- # - name: Cache debian packages
303
- # run: |
304
- # mkdir -p ~/debs && \
305
- # sudo mv /var/cache/apt/archives/*.deb ~/debs/
306
- # - name: Set sha8
307
- # id: slug
308
- # run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
309
- # - name: Build jack2 packages
310
- # shell: bash
311
- # run: |
312
- # apt-get source -d jackd2
313
- # tar xf *.debian.tar.xz
314
- # rm -rf debian/source
315
- # sed -i "s|--prefix=/usr --classic|--prefix=/usr --classic|" debian/rules
316
- # dch -M -b -v "$(cat wscript | awk 'sub("^VERSION = ","")' | tr -d "'")~$(date +"%Y%m%d")git${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}" -D focal "automated build"
317
- # debuild -rfakeroot --no-lintian || true
318
- # - uses: actions/upload-artifact@v3
319
- # with:
320
- # name: jack2-ubuntu-20.04-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
321
- # path: ~/work/jack2/*.deb
0 commit comments