-
-
Notifications
You must be signed in to change notification settings - Fork 69
620 lines (585 loc) · 23.7 KB
/
Copy pathci.yml
File metadata and controls
620 lines (585 loc) · 23.7 KB
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
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
name: CI
on:
workflow_dispatch:
push:
branches:
- 'develop'
pull_request:
branches:
- 'develop'
concurrency:
# Cancel in-progress jobs for the same pull request
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: windows_vs2022_x64
os: windows-2022
build_type: Release
env_cc: ''
env_cxx: ''
compiler: msvc
cppflags: ''
ldflags: ''
vs_arch: x64
vs_version: 2022
qt_version: 6.11.1
qt_arch_aqt: win64_msvc2022_64
qt_arch_dir: msvc2022_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: ''
conan_profile: scwx-windows_vs2022_x64
appimage_arch: ''
artifact_suffix: windows-vs2022-x64
- name: windows_vs2026_x64
os: windows-2025-vs2026
build_type: Release
env_cc: ''
env_cxx: ''
compiler: msvc
cppflags: ''
ldflags: ''
vs_arch: x64
vs_version: 18
qt_version: 6.11.1
qt_arch_aqt: win64_msvc2022_64
qt_arch_dir: msvc2022_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: ''
conan_profile: scwx-windows_vs2026_x64
appimage_arch: ''
artifact_suffix: windows-vs2026-x64
- name: linux_gcc-11_x64
os: ubuntu-22.04
build_type: Release
env_cc: gcc-11
env_cxx: g++-11
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-11
appimage_arch: x86_64
artifact_suffix: linux-gcc-11-x64
compiler_packages: g++-11
- name: linux_gcc-13_x64
os: ubuntu-24.04
build_type: Release
env_cc: gcc-13
env_cxx: g++-13
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-13
appimage_arch: x86_64
artifact_suffix: linux-gcc-13-x64
compiler_packages: g++-13
- name: linux_gcc-14_x64
os: ubuntu-24.04
build_type: Release
env_cc: gcc-14
env_cxx: g++-14
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-14
appimage_arch: x86_64
artifact_suffix: linux-gcc-14-x64
compiler_packages: g++-14
- name: linux_gcc-15_x64
os: ubuntu-26.04
build_type: Release
env_cc: gcc-15
env_cxx: g++-15
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-15
appimage_arch: x86_64
artifact_suffix: linux-gcc-15-x64
compiler_packages: g++-15
- name: linux_gcc-16_x64
os: ubuntu-26.04
build_type: Release
env_cc: gcc-16
env_cxx: g++-16
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-16
appimage_arch: x86_64
artifact_suffix: linux-gcc-16-x64
compiler_packages: g++-16
- name: linux_clang-18_x64
os: ubuntu-24.04
build_type: Release
env_cc: clang-18
env_cxx: clang++-18
compiler: clang
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_clang-18
appimage_arch: x86_64
artifact_suffix: linux-clang-18-x64
compiler_packages: clang-18
- name: linux_clang-19_x64
os: ubuntu-24.04
build_type: Release
env_cc: clang-19
env_cxx: clang++-19
compiler: clang
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_clang-19
appimage_arch: x86_64
artifact_suffix: linux-clang-19-x64
compiler_packages: clang-19
- name: linux_clang-20_x64
os: ubuntu-24.04
build_type: Release
env_cc: clang-20
env_cxx: clang++-20
compiler: clang
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_clang-20
appimage_arch: x86_64
artifact_suffix: linux-clang-20-x64
compiler_packages: clang-20
- name: linux_clang-21_x64
os: ubuntu-26.04
build_type: Release
env_cc: clang-21
env_cxx: clang++-21
compiler: clang
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_clang-21
appimage_arch: x86_64
artifact_suffix: linux-clang-21-x64
compiler_packages: clang-21
- name: linux_clang-22_x64
os: ubuntu-26.04
build_type: Release
env_cc: clang-22
env_cxx: clang++-22
compiler: clang
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_64
qt_arch_dir: gcc_64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_clang-22
appimage_arch: x86_64
artifact_suffix: linux-clang-22-x64
compiler_packages: clang-22
- name: linux_gcc-13_arm64
os: ubuntu-24.04-arm
build_type: Release
env_cc: gcc-13
env_cxx: g++-13
compiler: gcc
cppflags: ''
ldflags: ''
qt_version: 6.11.1
qt_arch_aqt: linux_gcc_arm64
qt_arch_dir: gcc_arm64
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
conan_profile: scwx-linux_gcc-13_armv8
appimage_arch: aarch64
artifact_suffix: linux-gcc-13-arm64
compiler_packages: g++-13
- name: macos_clang-18_x64
os: macos-15-intel
build_type: Release
env_cc: clang
env_cxx: clang++
compiler: clang
qt_version: 6.11.1
qt_arch_aqt: clang_64
qt_arch_dir: macos
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: ''
conan_profile: scwx-macos_clang-18
appimage_arch: ''
artifact_suffix: macos-x64
- name: macos_clang-18_arm64
os: macos-14
build_type: Release
env_cc: clang
env_cxx: clang++
compiler: clang
qt_version: 6.11.1
qt_arch_aqt: clang_64
qt_arch_dir: macos
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
qt_tools: ''
conan_package_manager: ''
conan_profile: scwx-macos_clang-18_armv8
appimage_arch: ''
artifact_suffix: macos-arm64
name: ${{ matrix.name }}
env:
CC: ${{ matrix.env_cc }}
CXX: ${{ matrix.env_cxx }}
SCWX_VERSION: v0.6.1
runs-on: ${{ matrix.os }}
steps:
- name: Setup
run: git config --global core.longpaths true
- name: Checkout
uses: actions/checkout@v7
with:
path: source
submodules: recursive
- name: Install Qt
uses: jdpurcell/install-qt-action@v5
env:
AQT_CONFIG: ${{ github.workspace }}/source/tools/aqt-settings.ini
with:
version: ${{ matrix.qt_version }}
arch: ${{ matrix.qt_arch_aqt }}
modules: ${{ matrix.qt_modules }}
tools: ${{ matrix.qt_tools }}
aqtsource: git+https://github.com/miurahr/aqtinstall.git@073e34d7c2ab4ae6961ed7cca690b3abd5ba5a7e
- name: Setup MSVC
if: matrix.compiler == 'msvc'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
if (-not $vsPath) { throw "Visual Studio with C++ tools not found" }
$vsDevCmd = Join-Path $vsPath "Common7\Tools\VsDevCmd.bat"
if (-not (Test-Path $vsDevCmd)) { throw "VsDevCmd not found at $vsDevCmd" }
$arch = if ("${{ matrix.vs_arch }}" -eq "x64") { "amd64" } else { "${{ matrix.vs_arch }}" }
cmd.exe /d /s /c """$vsDevCmd"" -arch=$arch -host_arch=$arch && set" |
ForEach-Object {
if ($_ -match "^(.*?)=(.*)$") {
"$($matches[1])=$($matches[2])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
}
- name: Setup Ubuntu Environment
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash
run: |
sudo apt-get install doxygen \
libfuse2 \
ninja-build \
wayland-protocols \
libwayland-dev \
libwayland-egl-backend-dev \
flatpak \
flatpak-builder \
${{ matrix.compiler_packages }}
# Remove unneeded items to free disk space
sudo apt-get clean
sudo rm -rf /home/runner/.rustup \
/usr/local/.ghcup \
/usr/local/lib/android \
/usr/share/dotnet \
/usr/share/swift
df -h
- name: Setup macOS Environment
if: ${{ startsWith(matrix.os, 'macos') }}
shell: bash
run: |
brew install llvm@18
LLVM_PATH=$(brew --prefix llvm@18)
echo "CC=${LLVM_PATH}/bin/clang" >> $GITHUB_ENV
echo "CXX=${LLVM_PATH}/bin/clang++" >> $GITHUB_ENV
echo "CPPFLAGS=-I${LLVM_PATH}/include" >> $GITHUB_ENV
echo "LDFLAGS=-L${LLVM_PATH}/lib -L${LLVM_PATH}/lib/c++" >> $GITHUB_ENV
- name: Setup Python Environment
shell: pwsh
run: |
pip install geopandas `
GitPython `
conan
- name: Restore Conan Packages
id: cache-conan
uses: actions/cache/restore@v6
with:
path: ~/.conan2
key: build-v2-${{ matrix.conan_profile }}-${{ hashFiles('./source/conanfile.py', './source/tools/conan/profiles/*') }}
- name: Install Conan Packages
id: conan-install
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
conan config install `
./source/tools/conan/profiles/${{ matrix.conan_profile }} `
-tf profiles
mkdir build
cd build
mkdir conan
conan install ../source/ `
--remote conancenter `
--build missing `
--profile:all ${{ matrix.conan_profile }} `
--settings:all build_type=${{ matrix.build_type }} `
--output-folder ./conan/ `
${{ matrix.conan_package_manager }}
conan cache clean
- name: Save Conan Packages
if: steps.conan-install.outcome == 'success' && steps.cache-conan.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
path: ~/.conan2
key: ${{ steps.cache-conan.outputs.cache-primary-key }}
- name: Build Supercell Wx
shell: pwsh
run: |
cd build
cmake ../source/ `
-G Ninja `
-DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" `
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${{ github.workspace }}/source/external/cmake-conan/conan_provider.cmake" `
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/supercell-wx" `
-DCONAN_HOST_PROFILE="${{ matrix.conan_profile }}" `
-DCONAN_BUILD_PROFILE="${{ matrix.conan_profile }}"
ninja supercell-wx wxtest
- name: Separate Debug Symbols (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash
run: |
cd build/
cd Release/
cd bin/
objcopy --only-keep-debug supercell-wx supercell-wx.debug
objcopy --strip-debug --strip-unneeded supercell-wx
cd ..
cd lib/
objcopy --only-keep-debug libQMapLibre.so libQMapLibre.so.debug
objcopy --strip-debug --strip-unneeded libQMapLibre.so
- name: Install Supercell Wx
shell: pwsh
run: |
cd build
cmake --install . --component supercell-wx
- name: Collect Artifacts
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash
run: |
pushd supercell-wx/
cd lib/
ln -s libssl.so.3 libssl.so
rm -f libGLX.so*
rm -f libOpenGL.so*
cp -p ${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/lib/libQt6WaylandClient.so* .
cd ..
mkdir -p plugins/
cd plugins/
mkdir -p sqldrivers/
cp -p "${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/plugins/sqldrivers/libqsqlite.so" sqldrivers/
mkdir -p platforms/
cp -p "${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/plugins/platforms/libqwayland.so" platforms/
cp -rp "${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/plugins/wayland-decoration-client" .
cp -rp "${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/plugins/wayland-graphics-integration-client" .
cp -rp "${RUNNER_WORKSPACE}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch_dir }}/plugins/wayland-shell-integration" .
cd ..
popd
tar -czf supercell-wx-${{ matrix.artifact_suffix }}.tar.gz supercell-wx/
- name: Upload Artifacts (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/supercell-wx/
- name: Upload Debug Artifacts (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-debug-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/build/Release/bin/*.pdb
- name: Upload Artifacts (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/supercell-wx-${{ matrix.artifact_suffix }}.tar.gz
- name: Upload Debug Artifacts (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-debug-${{ matrix.artifact_suffix }}
path: |
${{ github.workspace }}/build/Release/bin/*.debug
${{ github.workspace }}/build/Release/lib/*.debug
- name: Build Installer (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
shell: pwsh
run: |
cd build
cpack
- name: Upload Installer (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-installer-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/build/supercell-wx-*.msi*
- name: Build AppImage (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
env:
INSTALL_DIR: ${{ github.workspace }}/supercell-wx/
APPIMAGE_DIR: ${{ github.workspace }}/supercell-wx-appimage/
LDAI_UPDATE_INFORMATION: gh-releases-zsync|dpaulat|supercell-wx|latest|*${{ matrix.appimage_arch }}.AppImage.zsync
LDAI_OUTPUT: supercell-wx-${{ env.SCWX_VERSION }}-${{ matrix.appimage_arch }}.AppImage
LINUXDEPLOY_OUTPUT_APP_NAME: supercell-wx
LINUXDEPLOY_OUTPUT_VERSION: ${{ env.SCWX_VERSION }}
shell: bash
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{ matrix.appimage_arch }}.AppImage
chmod +x linuxdeploy-${{ matrix.appimage_arch }}.AppImage
cp "${{ github.workspace }}/source/scwx-qt/res/icons/scwx-256.png" supercell-wx.png
cp "${{ github.workspace }}/source/scwx-qt/res/linux/supercell-wx.desktop" .
cp -r "${{ env.INSTALL_DIR }}" "${{ env.APPIMAGE_DIR }}"
pushd "${{ env.APPIMAGE_DIR }}"
mkdir -p usr/
mv bin/ usr/
mv lib/ usr/
mv plugins/ usr/
popd
./linuxdeploy-${{ matrix.appimage_arch }}.AppImage --appdir ${{ env.APPIMAGE_DIR }} -i supercell-wx.png -d supercell-wx.desktop
./linuxdeploy-${{ matrix.appimage_arch }}.AppImage --appdir ${{ env.APPIMAGE_DIR }} --output appimage
rm -f linuxdeploy-${{ matrix.appimage_arch }}.AppImage
- name: Upload AppImage (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-appimage-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/*-${{ matrix.appimage_arch }}.AppImage*
- name: Build FlatPak (Linux)
# Ubuntu 22.04 ships flatpak-builder < 1.4, which still runs appstream-compose
# inside the SDK. Freedesktop 25.08 removed that tool; 24.04+ builder uses
# host appstreamcli compose instead. Publish only consumes gcc-13 artifacts.
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.os != 'ubuntu-22.04' }}
env:
INSTALL_DIR: ${{ github.workspace }}/supercell-wx/
FLATPAK_DIR: ${{ github.workspace }}/supercell-wx-flatpak/
# CI always builds the nightly branch. Stable is assigned later by the
# Flatpak repo publish job when a GitHub Release is published (tags
# are often created after this workflow has already finished).
FLATPAK_DEFAULT_BRANCH: nightly
shell: bash
run: |
cp -r ${{ env.INSTALL_DIR }} ${{ env.FLATPAK_DIR }}
# Stage generated AppStream metainfo into the Flatpak source dir
cp "${{ github.workspace }}/build/scwx-qt/res/linux/net.supercellwx.app.metainfo.xml" \
"${{ env.FLATPAK_DIR }}/"
# Copy krb5 libraries to flatpak
cp -a /usr/lib/*/libkrb5.so* \
/usr/lib/*/libkrb5support.so* \
/usr/lib/*/libgssapi_krb5.so* \
/usr/lib/*/libk5crypto.so* \
/usr/lib/*/libkeyutils.so* \
${{ env.FLATPAK_DIR }}/lib
# Copy GLU library to flatpak
cp -a /usr/lib/*/libGLU.so* \
${{ env.FLATPAK_DIR }}/lib
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak-builder --force-clean \
--user \
--install-deps-from=flathub \
--default-branch="${FLATPAK_DEFAULT_BRANCH}" \
--repo=flatpak-repo \
--install flatpak-build \
${{ github.workspace }}/source/tools/net.supercellwx.app.yml
flatpak build-bundle flatpak-repo supercell-wx.flatpak \
net.supercellwx.app "${FLATPAK_DEFAULT_BRANCH}"
- name: Upload FlatPak (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.os != 'ubuntu-22.04' }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-flatpak-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/supercell-wx.flatpak
- name: Build Disk Image (macOS)
if: ${{ startsWith(matrix.os, 'macos') }}
shell: pwsh
run: |
cd build
cpack
- name: Upload Disk Image (macOS)
if: ${{ startsWith(matrix.os, 'macos') }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-${{ matrix.artifact_suffix }}
path: ${{ github.workspace }}/build/supercell-wx-*.dmg*
- name: Test Supercell Wx
working-directory: ${{ github.workspace }}/build
env:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
MAPTILER_API_KEY: ${{ secrets.MAPTILER_API_KEY }}
run: ctest -C ${{ matrix.build_type }} --exclude-regex "test_mln.*|NtpClient.*|UpdateManager.*"
- name: Upload Test Logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: supercell-wx-test-logs-${{ matrix.name }}
path: ${{ github.workspace }}/build/Testing/