-
Notifications
You must be signed in to change notification settings - Fork 8
329 lines (323 loc) · 12.5 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
name: build
on: [push, pull_request]
env:
CACHE_VERSION_LINUX: 21
CACHE_VERSION_MACOS: 19
CACHE_VERSION_WIN64: 19
DEBIAN_FRONTEND: noninteractive
PAWPAW_FAST_MATH: 1
PAWPAW_SKIP_LTO: 1
PAWPAW_SKIP_TESTS: 1
RELEASE_OS_LINUX: ubuntu:18.04
RELEASE_OS_MAC: macos-11
RELEASE_OS_WIN64: ubuntu:22.04
jobs:
# NOTE cannot use actions @v4, incompatible with ubuntu:18.04
# see https://github.com/actions/checkout/issues/1590
linux-x86_64:
strategy:
matrix:
include:
- container: debian:11
#- container: debian:12
- container: ubuntu:18.04
- container: ubuntu:20.04
- container: ubuntu:22.04
#- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Install git
run: |
apt-get update -qq && apt-get install -yqq --no-install-recommends ca-certificates git openssl
case "${{ matrix.container }}" in
"ubuntu:18.04")
apt-get install -yqq --no-install-recommends curl libpcre2-8-0
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git_2.34.1-1ubuntu1~bpo18.04.1~ppa1_amd64.deb
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo18.04.1~ppa1_all.deb
dpkg -i *.deb
rm *.deb
;;
"ubuntu:20.04")
apt-get install -yqq --no-install-recommends curl
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git_2.34.1-1ubuntu1~bpo20.04.1~ppa1_amd64.deb
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo20.04.1~ppa1_all.deb
dpkg -i *.deb
rm *.deb
;;
esac
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up dependencies
run: |
./src/PawPaw/.github/workflows/bootstrap-deps.sh linux-x86_64
if [ "${{ matrix.container }}" = "ubuntu:18.04" ]; then
freetypepkgname="libfreetype6-dev"
else
freetypepkgname="libfreetype-dev"
fi
apt-get install -yqq ${freetypepkgname} p7zip-full unzip wget xdg-user-dirs zip
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
~/PawPawBuilds
key: linux-x86_64-${{ env.PAWPAW_PACK_NAME }}-v${{ env.CACHE_VERSION_LINUX }}
- name: Build dependencies
run: |
./src/PawPaw/bootstrap-mod.sh linux-x86_64 && ./src/PawPaw/.cleanup.sh linux-x86_64
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make
- name: Validate plugins
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/plugin-builder/validate-plugins.sh
# FIXME dirty carla leaves temp folders around
rm -rf *.tmp
- name: Set sha8
run: |
echo "VERSION_TAG=$(echo ${{ github.event.pull_request.number || github.event.release.tag_name || github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
mkdir mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64
mv build mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64/mod-desktop
cp utils/linux/mod-desktop.* mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64/
tar chJf mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64.tar.xz mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64
- uses: actions/upload-artifact@v3
if: ${{ matrix.container == env.RELEASE_OS_LINUX }}
with:
name: mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64
path: |
*.tar.xz
- uses: softprops/action-gh-release@v1
if: ${{ matrix.container == env.RELEASE_OS_LINUX && startsWith(github.ref, 'refs/tags/') }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.tar.xz
# NOTE cannot use actions @v4, incompatible with ubuntu:18.04
# see https://github.com/actions/checkout/issues/1590
linux-x86_64-debug:
strategy:
matrix:
include:
- container: ubuntu:18.04
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
PAWPAW_DEBUG: 1
steps:
- name: Install git
run: |
apt-get update -qq && apt-get install -yqq --no-install-recommends ca-certificates git openssl
case "${{ matrix.container }}" in
"ubuntu:18.04")
apt-get install -yqq --no-install-recommends curl libpcre2-8-0
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git_2.34.1-1ubuntu1~bpo18.04.1~ppa1_amd64.deb
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo18.04.1~ppa1_all.deb
dpkg -i *.deb
rm *.deb
;;
"ubuntu:20.04")
apt-get install -yqq --no-install-recommends curl
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git_2.34.1-1ubuntu1~bpo20.04.1~ppa1_amd64.deb
curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo20.04.1~ppa1_all.deb
dpkg -i *.deb
rm *.deb
;;
esac
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up dependencies
run: |
./src/PawPaw/.github/workflows/bootstrap-deps.sh linux-x86_64
if [ "${{ matrix.container }}" = "ubuntu:18.04" ]; then
freetypepkgname="libfreetype6-dev"
else
freetypepkgname="libfreetype-dev"
fi
apt-get install -yqq ${freetypepkgname} p7zip-full unzip wget xdg-user-dirs zip
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
~/PawPawBuilds
key: linux-x86_64-${{ env.PAWPAW_PACK_NAME }}-v${{ env.CACHE_VERSION_LINUX }}-debug
- name: Build dependencies
run: |
./src/PawPaw/bootstrap-mod.sh linux-x86_64 && ./src/PawPaw/.cleanup.sh linux-x86_64
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make DEBUG=1
- name: Validate plugins
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/plugin-builder/validate-plugins.sh
# FIXME dirty carla leaves temp folders around
rm -rf *.tmp
- name: Set sha8
run: |
echo "VERSION_TAG=$(echo ${{ github.event.pull_request.number || github.event.release.tag_name || github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
mkdir mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug
mv build mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug/mod-desktop
cp utils/linux/mod-desktop.* mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug/
tar chJf mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug.tar.xz mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug
- uses: actions/upload-artifact@v3
if: ${{ matrix.container == env.RELEASE_OS_LINUX }}
with:
name: mod-desktop-${{ env.VERSION_TAG }}-linux-x86_64-debug
path: |
*.tar.xz
macos:
strategy:
matrix:
include:
- os: macos-11
target: macos-10.15
- os: macos-11
target: macos-universal-10.15
- os: macos-12
target: macos-10.15
- os: macos-12
target: macos-universal-10.15
- os: macos-13
target: macos-10.15
- os: macos-13
target: macos-universal-10.15
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
./src/PawPaw/.github/workflows/bootstrap-deps.sh ${{ matrix.target }}
brew install p7zip wget
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
key: macos-${{ env.PAWPAW_PACK_NAME }}-v${{ env.CACHE_VERSION_MACOS }}
- name: Build dependencies
run: |
./src/PawPaw/bootstrap-mod.sh ${{ matrix.target }} && ./src/PawPaw/.cleanup.sh ${{ matrix.target }}
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make PAWPAW_TARGET=${{ matrix.target }}
- name: Validate plugins
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/plugin-builder/validate-plugins.sh ${{ matrix.target }}
# FIXME dirty carla leaves temp folders around
rm -rf *.tmp
- name: Set sha8
run: |
echo "VERSION_TAG=$(echo ${{ github.event.pull_request.number || github.event.release.tag_name || github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/macos/macos-pkg.sh ${{ matrix.target }}
mv mod-desktop-*.pkg mod-desktop-${{ env.VERSION_TAG }}-macOS.pkg
- uses: actions/upload-artifact@v4
if: ${{ matrix.os == env.RELEASE_OS_MAC && matrix.target == 'macos-universal-10.15' }}
with:
name: mod-desktop-${{ env.VERSION_TAG }}-macOS
path: |
*.pkg
- uses: softprops/action-gh-release@v1
if: ${{ matrix.os == env.RELEASE_OS_MAC && startsWith(github.ref, 'refs/tags/') }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.pkg
win64:
strategy:
matrix:
include:
# FIXME enable and use debian:12 for releases
#- container: debian:12
- container: ubuntu:22.04
#- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Update git
run: |
apt-get update -qq && apt-get install -yqq git
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
run: |
./src/PawPaw/.github/workflows/bootstrap-deps.sh win64
apt-get install -yqq libfreetype-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libxrender-dev p7zip-full unzip wget xdg-user-dirs xvfb zip
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/PawPawBuilds
key: win64-${{ env.PAWPAW_PACK_NAME }}-v${{ env.CACHE_VERSION_WIN64 }}
- name: Build dependencies
run: |
./src/PawPaw/bootstrap-mod.sh win64 && ./src/PawPaw/.cleanup.sh win64
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make win64
- name: Validate plugins
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/plugin-builder/validate-plugins.sh
# FIXME dirty carla leaves temp folders around
rm -rf *.tmp
- name: Set sha8
run: |
echo "VERSION_TAG=$(echo ${{ github.event.pull_request.number || github.event.release.tag_name || github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
xvfb-run ./utils/win64/win64-installer.sh
mv mod-desktop-*.exe mod-desktop-${{ env.VERSION_TAG }}-win64.exe
rm -rf build/innosetup-*
mv build mod-desktop-${{ env.VERSION_TAG }}-win64
zip -r -9 mod-desktop-${{ env.VERSION_TAG }}-win64.zip mod-desktop-${{ env.VERSION_TAG }}-win64
- uses: actions/upload-artifact@v4
if: ${{ matrix.container == env.RELEASE_OS_WIN64 }}
with:
name: mod-desktop-${{ env.VERSION_TAG }}-win64
path: |
*.exe
*.zip
- uses: softprops/action-gh-release@v1
if: ${{ matrix.container == env.RELEASE_OS_WIN64 && startsWith(github.ref, 'refs/tags/') }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
*.exe