-
Notifications
You must be signed in to change notification settings - Fork 159
/
.cirrus.yml
576 lines (562 loc) · 23.7 KB
/
.cirrus.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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# Global defaults
skip: "changesIncludeOnly('**.md', '**.txt', '.gitignore', '.gitattributes')"
env:
CIRRUS_CLONE_DEPTH: 1
build_windows_task:
windows_container:
dockerfile: ci/windows/Dockerfile
os_version: 2019
env:
AGS_LIBOGG_LIB: C:\Lib\Xiph\x86
AGS_LIBTHEORA_LIB: C:\Lib\Xiph\x86
AGS_LIBVORBIS_LIB: C:\Lib\Xiph\x86
AGS_SDL_INCLUDE: C:\Lib\SDL2\include
AGS_SDL_SOUND_INCLUDE: C:\Lib\SDL_sound\src
AGS_SDL_LIB: C:\Lib\SDL2\lib\x86
AGS_SDL_SOUND_LIB: C:\Lib\SDL_sound\lib\x86
build_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform=Win32 /maxcpucount /nologo
build_tools_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform=x86 /maxcpucount /nologo
build_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
build_tools_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Tools.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x86 /maxcpucount /nologo
engine_pdb_artifacts:
path: Solutions/.build/*/acwin.pdb
delete_engine_pdb_script: >
cd Solutions/.build &&
del /s *.pdb *.map *.ilk *.iobj *.ipdb
binaries_artifacts:
path: Solutions/.build/*/*
delete_engine_build_script: >
cd Solutions/ &&
rd /s /q .build
build_x64_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Engine.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
engine_x64_pdb_artifacts:
path: Solutions/.build/*/acwin.pdb
delete_x64_engine_pdb_script: >
cd Solutions/.build &&
del /s *.pdb *.map *.ilk *.iobj *.ipdb
binaries_x64_artifacts:
path: Solutions/.build/*/*
build_linux_cmake_task:
skip: "!changesInclude('CMake/**')"
only_if: $CIRRUS_RELEASE == ''
container:
dockerfile: ci/linux/Dockerfile
docker_arguments:
matrix:
- FROM_PLATFORM: linux/i386
- FROM_PLATFORM: linux/amd64
FROM_DEBIAN: debian/eol:jessie
setup_destdir_script: |
arch=$(dpkg --print-architecture)
mkdir destdir_debug
ln -s destdir_debug/bin bin_debug_$arch
mkdir destdir_release
ln -s destdir_release/bin bin_release_$arch
build_debug_script: |
arch=$(dpkg --print-architecture)
mkdir build_debug_$arch && cd build_debug_$arch
cmake .. \
-DAGS_USE_LOCAL_ALL_LIBRARIES=1 \
-DAGS_USE_LOCAL_SDL2_SOUND=0 \
-DCMAKE_BUILD_TYPE=Debug \
-DAGS_BUILD_TOOLS=1 \
-DAGS_TESTS=1 \
-DCMAKE_INSTALL_PREFIX="$(cd ../destdir_debug && pwd)"
make -j2 install
test_linux_debug_script: |
arch=$(dpkg --print-architecture)
cd build_debug_$arch
ctest --output-on-failure
build_release_script: |
arch=$(dpkg --print-architecture)
mkdir build_release_$arch && cd build_release_$arch
cmake .. \
-DAGS_USE_LOCAL_ALL_LIBRARIES=1 \
-DAGS_USE_LOCAL_SDL2_SOUND=0 \
-DCMAKE_BUILD_TYPE=Release \
-DAGS_BUILD_TOOLS=1 \
-DAGS_TESTS=1 \
-DCMAKE_INSTALL_PREFIX="$(cd ../destdir_release && pwd)"
make -j2 install
test_linux_release_script: |
arch=$(dpkg --print-architecture)
cd build_release_$arch
ctest --output-on-failure
binaries_artifacts:
path: bin_*/*
build_linux_debian_task:
container:
dockerfile: ci/linux/Dockerfile
docker_arguments:
matrix:
- FROM_PLATFORM: linux/i386
- FROM_PLATFORM: linux/amd64
FROM_DEBIAN: debian/eol:jessie
env:
matrix:
- RPATH_PREFIX: lib
- RPATH_PREFIX:
build_script: |
arch=$(dpkg --print-architecture)
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
sed -i -s "s/ags \(.*\)(.*)/ags \($version\)\1/" debian/changelog
if [ -n "$RPATH_PREFIX" ]; then
case $arch in
amd64)
bit=64
;;
i386)
bit=32
;;
*)
echo "Unknown architecture"
exit 1
;;
esac
DEB_BUILD_OPTIONS="rpath=$RPATH_PREFIX$bit" DEB_LDFLAGS_MAINT_APPEND=-Wl,--disable-new-dtags fakeroot debian/rules binary
sed -E "/^BI(NDMOUNT|T)=/d" debian/ags+libraries/hooks/B00_copy_libs.sh | BIT=$bit BINDMOUNT=$(pwd) sh
ar -p ../ags_${version}_$arch.deb data.tar.xz | unxz | tar -f - -xvC data --transform "s/.*ags/ags$bit/" ./usr/bin/ags
cd data && \
(cd lib$bit && find . \
\( \
-name "libogg.so.*" -o \
-name "libtheora.so.*" -o \
-name "libvorbisfile.so.*" -o \
-name "libvorbis.so.*" \
\) \
-exec cp -L -v "/opt/lib/{}" "{}" \;) && \
tar -cvzf ../data_$arch.tar.gz *
else
fakeroot debian/rules binary
mv ../ags_${version}_$arch.deb .
fi
debian_packages_artifacts:
path: ags_*.deb
data_files_artifacts:
path: data_*.tar.gz
build_linux_make_task:
only_if: $CIRRUS_RELEASE == ''
container:
dockerfile: ci/linux/Dockerfile
docker_arguments:
matrix:
- FROM_PLATFORM: linux/amd64
FROM_DEBIAN: debian/eol:jessie
setup_destdir_script: |
mkdir destdir
arch=$(dpkg --print-architecture)
ln -s destdir/usr/local/bin bin_$arch
build_script: |
make -j2 PREFIX="$(cd destdir && pwd)/usr/local" --directory=Engine install
build_compiler_script: |
make -j2 PREFIX="$(cd destdir && pwd)/usr/local" --directory=Compiler install
build_tools_script: |
find Tools -name Makefile -execdir make -j2 PREFIX="$(cd destdir && pwd)/usr/local" install \;
binaries_artifacts:
path: bin_*/*
build_macos_task:
skip: "!changesInclude('OSX/**')"
only_if: $CIRRUS_RELEASE == ''
macos_instance:
image: ghcr.io/cirruslabs/macos-runner:sonoma # newest release of current version
env:
CMAKE_VERSION: 3.22.3
NINJA_VERSION: 1.11.1
CCACHE_VERSION: 4.8.2
CCACHE_MAXSIZE: "180M"
CCACHE_DIR: "/tmp/ccache_dir"
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
macos_dependencies_cache:
folder: dep_cache
fingerprint_script: echo "$CMAKE_VERSION $NINJA_VERSION $CCACHE_VERSION"
populate_script: |
mkdir dep_cache && cd dep_cache && mkdir bin && mkdir app
url="https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-mac.zip"
echo "Downloading Ninja from $url"
curl -fLSs "$url" --output "ninja-mac.zip" && unzip -d bin ninja-mac.zip && rm ninja-mac.zip
url="https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-macos-universal.tar.gz"
echo "Downloading CMake from $url"
curl -fLSs "$url" | bsdtar -f - -xvzC app --strip-components 1
url="https://github.com/ccache/ccache/releases/download/v$CCACHE_VERSION/ccache-$CCACHE_VERSION-darwin.tar.gz"
echo "Downloading CCache from $url"
curl -fLSs "$url" | bsdtar -f - -xvzC bin --strip-components 1
install_dependencies_script: |
sudo chown $USER /usr/local
mkdir -p /usr/local/bin
sudo chown $USER /usr/local/bin
cd dep_cache
pushd app && cp -R CMake.app /Applications/CMake.app && popd
pushd bin && cp ninja /usr/local/bin/ninja && cp ccache /usr/local/bin/ccache && popd
chmod +x /usr/local/bin/ccache
ccache_cache:
folder: "/tmp/ccache_dir"
reupload_on_changes: true
setup_destdir_script: |
mkdir destdir_debug
mkdir destdir_release
xcodebuild -version > xcodeversion
xcode=$(awk '{ print $2; exit }' xcodeversion)
echo ${xcode}
ln -s destdir_debug/bin bin_debug
ln -s destdir_release/bin bin_release
build_debug_script: |
mkdir build_debug && cd build_debug
/Applications/CMake.app/Contents/bin/cmake -S .. -B . -G "Ninja" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DAGS_BUILD_TOOLS=1 \
-DAGS_TESTS=1 \
-DCMAKE_INSTALL_PREFIX="$(cd ../destdir_debug && pwd)"
ninja install
test_macos_debug_script: |
cd build_debug
ctest --output-on-failure
build_release_script: |
mkdir build_release && cd build_release
/Applications/CMake.app/Contents/bin/cmake -S .. -B . -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DAGS_BUILD_TOOLS=1 \
-DAGS_TESTS=1 \
-DCMAKE_INSTALL_PREFIX="$(cd ../destdir_release && pwd)"
ninja install
test_macos_release_script: |
cd build_release
ctest --output-on-failure
binaries_artifacts:
path: bin_*/*
build_android_task:
container:
dockerfile: ci/android/Dockerfile
cpu: 4
memory: 8G
greedy: true
git_submodules_script: git submodule update --init --recursive
gradle_cache:
folder: ~/.gradle/caches
fingerprint_script:
- echo $CIRRUS_OS
- cat **/*.gradle* **/gradle-wrapper.properties || true
populate_script:
- mkdir -p ~/.gradle/caches
build_prepare_script: |
cd Android && ./and-build.sh prepare
build_debug_library_and_runtime_script: |
cd Android && ./and-build.sh build_debug
build_release_library_and_runtime_script: |
cd Android && ./and-build.sh build_release
rename_apks_script: |
cd Android && ./and-build.sh archive_apks
apks_artifacts:
path: AGS-*.apk
create_proj_archive_script: |
cd Android && ./and-build.sh archive_project
proj_artifacts:
path: AGS-*-android-proj-*.zip
# FIXME: adjust the cleanup so Cirrus CI doesn't re-upload the cache every time.
cleanup_gradle_script: |
rm -rf ~/.gradle/daemon/
rm -rf ~/.gradle/caches/transforms-1
rm -rf ~/.gradle/caches/journal-1
build_emscripten_task:
container:
dockerfile: ci/emscripten/Dockerfile
build_emscripten_script: |
cd Emscripten && ./build.sh
package_emscripten_build_script: |
tmp=/tmp/bundle$$
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
pushd Emscripten && mkdir -p $tmp && cp my_game_files.js $tmp && pushd build-release && mv ags.js ags.wasm ags.html $tmp && popd && popd
mv $tmp/ags.html $tmp/index.html
bsdtar -f ags_${version}_web.tar.gz -cvzC $tmp index.html ags.js ags.wasm my_game_files.js
binaries_artifacts:
path: ags_*.tar.gz
build_editor_task:
windows_container:
dockerfile: ci/windows/Dockerfile
os_version: 2019
env:
AGS_SDL_INCLUDE: C:\Lib\SDL2\include
AGS_SDL_LIB: C:\Lib\SDL2\lib\x86
nuget_packages_cache:
folder: Solutions\packages
fingerprint_script:
- type Editor\AGS.Editor\packages.config
- type Editor\AGS.Editor.Tests\packages.config
populate_script: nuget restore Solutions\AGS.Editor.Full.sln
build_debug_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
set "UseEnv=true" &&
copy C:\Lib\irrKlang\x86\*.dll Editor\References\ &&
cd Solutions &&
cmd /v:on /c "set "LIB=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86;!LIB!" &&
set "PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;!PATH!" &&
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v140 /p:Configuration=Debug /p:Platform="Win32" /maxcpucount /nologo"
test_debug_script: |
curl -fLOJ https://github.com/nunit/nunit-transforms/raw/master/nunit3-junit/nunit3-junit.xslt
pushd Solutions\packages\NUnit.ConsoleRunner.3.*
set RUNNER="%CD%\tools\nunit3-console.exe"
popd
cmd /v:on /c "!RUNNER! Editor\AGS.Editor.Tests\bin\Debug\AGS.Editor.Tests.dll --result=TestResult-junit.xml;transform=nunit3-junit.xslt"
build_release_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
set "UseEnv=true" &&
copy C:\Lib\irrKlang\x86\*.dll Editor\References\ &&
cd Solutions &&
cmd /v:on /c "set "LIB=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86;!LIB!" &&
set "PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;!PATH!" &&
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform="Win32" /maxcpucount /nologo"
test_release_script: |
curl -fLOJ https://github.com/nunit/nunit-transforms/raw/master/nunit3-junit/nunit3-junit.xslt
pushd Solutions\packages\NUnit.ConsoleRunner.3.*
set RUNNER="%CD%\tools\nunit3-console.exe"
popd
cmd /v:on /c "!RUNNER! Editor\AGS.Editor.Tests\bin\Release\AGS.Editor.Tests.dll --result=TestResult-junit.xml;transform=nunit3-junit.xslt"
always:
test_result_artifacts:
path: TestResult-junit.xml
type: text/xml
format: junit
ags_editor_pdb_artifacts:
path: Solutions/.build/*/*.pdb
ags_native_pdb_artifacts:
path: Editor/AGS.Native/*/AGS.Native.pdb
delete_editor_pdb_and_xml_script: >
cd Solutions/.build &&
del /s *.pdb *.xml
binaries_artifacts:
path: Solutions/.build/*/*
linux_packaging_task:
depends_on:
- build_linux_debian
container:
image: alpine:3.10
install_packages_script: apk add --no-cache curl libarchive-tools
package_script: |
tmp=/tmp/bundle$$
mkdir -p $tmp/data
for arch in i386 amd64; do
echo Downloading files for $arch
url="https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/build_linux_debian/data_files/data_$arch.tar.gz"
curl -fLsS "$url" | bsdtar -f - -xvzC $tmp/data
done
cp -v debian/copyright $tmp/data/licenses/ags-copyright
cp -v debian/ags+libraries/startgame $tmp/
awk 'BEGIN { RS="" } !/make_ags/ { if (NR>1) print RS; print }' debian/ags+libraries/README > $tmp/README
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
bsdtar -f ags_${version}_linux.tar.gz -cvzC $tmp data startgame README
binaries_artifacts:
path: ags_*.tar.gz
windows_packaging_task:
depends_on:
- build_editor
- build_windows
- linux_packaging
- build_emscripten
- build_android
windows_container:
dockerfile: ci/windows/Dockerfile
os_version: 2019
env:
TEMPLATES_REPOSITORY: adventuregamestudio/ags-templates
AGS_SDL_LIB: C:\Lib\SDL2\lib\x86
get_vcredist_script: >
mkdir Windows\Installer\Source\Redist &&
copy %SYSTEMDRIVE%\Redist\vc_redist.x86.exe Windows\Installer\Source\Redist\
get_editor_script: >
mkdir Windows\Installer\Source\Editor &&
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_editor/binaries.zip" --output "%TEMP%\binaries.zip" &&
tar -f "%TEMP%\binaries.zip" -xvzC Windows\Installer\Source\Editor --strip-components 3 Solutions/.build/Release
get_windows_engine_script: >
mkdir Windows\Installer\Source\Engine &&
curl -fLSso Windows\Installer\Source\Engine\acwin.exe
"https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_windows/binaries/Solutions/.build/Release/acwin.exe"
get_sdl2_dll_script: >
copy %AGS_SDL_LIB%\SDL2.dll Windows\Installer\Source\Engine
get_manual_script: >
mkdir Windows\Installer\Source\Docs &&
cd Windows\Installer\Source\Docs &&
curl -fLOJ https://github.com/adventuregamestudio/ags-manual/releases/latest/download/ags-help.chm
get_templates_script: >
mkdir Windows\Installer\Source\Templates &&
curl -fLSs https://github.com/%TEMPLATES_REPOSITORY%/tarball/master |
tar -f - -xvzC Windows\Installer\Source\Templates --strip-components 2
get_linux_bundle_script: >
mkdir Windows\Installer\Source\Linux &&
call Script\setvar.cmd ACI_VERSION_STR &&
cmd /v:on /c "curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/linux_packaging/binaries/ags_!ACI_VERSION_STR!_linux.tar.gz" |
tar -f - -xvC Windows\Installer\Source\Linux --strip-components 1"
get_emscripten_bundle_script: >
mkdir Windows\Installer\Source\Web &&
call Script\setvar.cmd ACI_VERSION_STR &&
cmd /v:on /c "curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_emscripten/binaries/ags_!ACI_VERSION_STR!_web.tar.gz" |
tar -f - -xvC Windows\Installer\Source\Web"
get_android_bundle_script: >
mkdir Windows\Installer\Source\Android &&
call Script\setvar.cmd ACI_VERSION_STR &&
cmd /v:on /c "curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_android/proj/AGS-!ACI_VERSION_STR!-android-proj-release.zip" --output "%TEMP%\Android.zip" &&
tar -f "%TEMP%\Android.zip" -xvzC Windows\Installer\Source\Android"
make_installer_script: >
powershell Windows\Installer\build.ps1 -IsccPath 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe'
installer_artifacts:
path: Windows\Installer\Output\*.exe
make_archive_script: >
move Windows\Installer\Source\Docs\* Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Engine\* Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Licenses Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Linux Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Web Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Android Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\Templates Windows\Installer\Source\Editor\ &&
move Windows\Installer\Source\URLs Windows\Installer\Source\Editor\ &&
for %%f in (Windows\Installer\Output\*.exe) do
tar -f %%~nf.zip -acv --strip-components 4 Windows\Installer\Source\Editor
archive_artifacts:
path: AGS-*.zip
make_windevdependencies_script: >
pushd "C:\Lib\SDL_sound" &&
del /Q /S build_x86\* &&
rd /Q /S build_x86 &&
del /Q /S build_x64\* &&
rd /Q /S build_x64 &&
popd &&
tar -f WinDevDependenciesVS.zip -acv --strip-components 2 C:\Lib
windevdependenciesvs_artifacts:
path: WinDevDependenciesVS.zip
pdb_packaging_task:
depends_on:
- build_editor
- build_windows
container:
image: alpine:3.10
install_packages_script: apk add --no-cache curl libarchive-tools
download_pdb_files_script: |
mkdir /tmp/pdb &&
for download in "build_windows/engine_pdb.zip" \
"build_editor/ags_editor_pdb.zip" \
"build_editor/ags_native_pdb.zip"
do
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/$download" --output /tmp/tmp_pdb.zip
bsdtar -f /tmp/tmp_pdb.zip -xvzC /tmp/pdb -s "!.*/Debug/.*!!p" -s "!.*/!!p"
rm /tmp/tmp_pdb.zip
done
make_pdb_archive_script: |
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
bsdtar -f AGS-${version}-pdb.zip -acv --strip-components 3 /tmp/pdb
archive_artifacts:
path: AGS-*-pdb.zip
ags_windows_tests_task:
windows_container:
dockerfile: ci/windows/Dockerfile
os_version: 2019
env:
BUILD_CONFIG: Release
get_submodule_script: git submodule update --init Common/libsrc/googletest
build_compiler_test_runner_x86_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
run_compiler_tests_script: Solutions\.test\Release\Compiler.Lib.Test.exe
build_ags_test_runner_x86_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo
run_common_tests_x86_script: Solutions\.test\Release\Common.Lib.Test.exe
run_engine_tests_x86_script: Solutions\.test\Release\Engine.App.Test.exe
cleanup_script: >
cd Solutions/ &&
rd /s /q .test
build_compiler_test_runner_x64_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Compiler.Lib.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
run_compiler_tests_x64_script: Solutions\.test\Release\Compiler.Lib.Test.exe
build_ags_test_runner_x64_script: >
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 &&
cd Solutions &&
msbuild Tests.sln /m /property:MultiProcessorCompilation=true /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=x64 /maxcpucount /nologo
run_common_tests_x64_script: Solutions\.test\Release\Common.Lib.Test.exe
run_engine_tests_x64_script: Solutions\.test\Release\Engine.App.Test.exe
make_release_task:
depends_on:
- ags_windows_tests
- build_android
- build_linux_debian
- windows_packaging
- linux_packaging
- build_emscripten
- pdb_packaging
container:
image: alpine:3.10
env:
GITHUB_TOKEN: ENCRYPTED[f94b2c269006d530d3e6f5f2be0962ba3eeb0d5f43630ad8172b9ef9c405611e54ae5a2b6efc7c53db68176168f0c83d]
install_packages_script: apk add --no-cache curl git libarchive-tools outils-sha256
git_submodules_script: git submodule update --init --recursive
create_source_archives_script: |
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
mkdir -p /tmp/github_release && \
for ext in tar.bz2 tar.gz tar.xz zip; do
echo Writing $ext archive...
bsdtar -f /tmp/github_release/ags_${version}_source.$ext \
-acs "!\./\(.*\)!ags_${version}_source/\1!" \
--exclude ".git*" \
--exclude .cirrus.yml \
.;
done
download_release_files_script: |
version=$(awk -F'[ "]+' '$1=="#define" && $2=="ACI_VERSION_STR" { print $3; exit }' Common/core/def_version.h)
baseurl="https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID"
mkdir -p /tmp/github_release && \
cd /tmp/github_release && \
curl -fLSs "$baseurl/windows_packaging/installer.zip" -o /tmp/github_release/installer.zip && \
bsdtar -f /tmp/github_release/installer.zip -xv --strip-components 3 && \
rm /tmp/github_release/installer.zip && \
for download in "windows_packaging/archive/$(basename AGS-*.exe .exe).zip" \
"windows_packaging/windevdependenciesvs/WinDevDependenciesVS.zip" \
"linux_packaging/binaries/ags_${version}_linux.tar.gz" \
"build_emscripten/binaries/ags_${version}_web.tar.gz" \
"pdb_packaging/archive/AGS-${version}-pdb.zip" \
"build_linux_debian/debian_packages/ags_${version}_i386.deb" \
"build_linux_debian/debian_packages/ags_${version}_amd64.deb" \
"build_android/apks/AGS-${version}-debug.apk" \
"build_android/apks/AGS-${version}-release.apk" \
"build_android/proj/AGS-${version}-android-proj-debug.zip" \
"build_android/proj/AGS-${version}-android-proj-release.zip"
do
url="$baseurl/$download"
echo "Downloading $url"
curl -fLOJ "$url"
done
create_checksums_script: >
cd /tmp/github_release &&
sha256 -r * | sed -E "s/[[:blank:]]+/ /" | tee /tmp/checksums.sha256 &&
mv /tmp/checksums.sha256 .
upload_release_script: |
if [ -z "$CIRRUS_RELEASE" ]; then
echo "This is not a release."
exit 0
fi
for fpath in $(find /tmp/github_release -type f); do
echo "Uploading $fpath"
curl -X POST \
--data-binary @$fpath \
--header "Authorization: token $GITHUB_TOKEN" \
--header "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$CIRRUS_RELEASE/assets?name=${fpath##*/}"
done