-
Notifications
You must be signed in to change notification settings - Fork 112
181 lines (156 loc) · 6.16 KB
/
Copy pathmatrix-os.yaml
File metadata and controls
181 lines (156 loc) · 6.16 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
name: CI - Crossplatform
on:
push:
branches:
- "master"
- "feature/**"
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
pull_request:
jobs:
ci:
name: Build (${{ matrix.platform-name }})
runs-on: ${{ matrix.os }}
env: ${{ matrix.env || fromJSON('{}') }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2025
platform-name: Windows
cache-key: windows
qt-archives: qtbase qtsvg qttools
tools: tools_opensslv3_x64
- os: ubuntu-24.04
platform-name: Ubuntu
cache-key: ubuntu
qt-archives: icu qtbase qtsvg qttools
tools: ""
env: { CC: gcc-14, CXX: g++-14 }
- os: macos-15
platform-name: macOS
cache-key: macos
qt-archives: qtbase qtsvg qttools
tools: ""
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Set Python version
uses: actions/setup-python@v6
with:
python-version: "3.14"
# Install platform-specific package manager requirements
- name: Install Build System Dependencies (Windows)
if: matrix.platform-name == 'Windows'
run: choco install ninja -y
- name: Install Build System Dependencies (Ubuntu)
if: matrix.platform-name == 'Ubuntu'
run: |
sudo apt update
sudo apt install -y appstream ninja-build libfuse2
- name: Install Build System Dependencies (macOS)
if: matrix.platform-name == 'macOS'
run: brew install ninja
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.10.1"
archives: ${{ matrix.qt-archives }}
tools: ${{ matrix.tools }}
cache: true
- name: Initialize ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ccache-${{ matrix.cache-key }}-${{ github.ref_name }}
restore-keys: |
ccache-${{ matrix.cache-key }}-master-
ccache-${{ matrix.cache-key }}-
- name: Configure Developer Command Prompt (Windows)
if: matrix.platform-name == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
shell: bash
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTEST=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
${{ matrix.platform-name == 'macOS' && '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' || '' }}
- name: Build PokeFinder
run: cmake --build build
- name: Test PokeFinder
run: ctest --test-dir build -V
- name: Package PokeFinder (Windows)
if: matrix.platform-name == 'Windows'
run: |
mkdir PokeFinder
mkdir PokeFinder/platforms
mkdir PokeFinder/styles
mv build/PokeFinder.exe PokeFinder/
windeployqt --no-translations --no-plugins --no-opengl-sw --no-system-d3d-compiler PokeFinder/PokeFinder.exe
rm -Force PokeFinder/vc_redist*.exe
cp "${{env.QT_ROOT_DIR}}/plugins/platforms/qwindows.dll" PokeFinder/platforms/
cp "${{env.QT_ROOT_DIR}}/plugins/styles/qmodernwindowsstyle.dll" PokeFinder/styles/
cp "${{env.QT_ROOT_DIR}}/../../Tools/OpenSSLv3/Win_x64/bin/lib*.dll" PokeFinder/
7z a PokeFinder-win.zip PokeFinder
mkdir upload && mv PokeFinder upload
- name: Package PokeFinder (Ubuntu)
if: matrix.platform-name == 'Ubuntu'
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod a+x linuxdeploy-*.AppImage
export QMAKE=$QT_ROOT_DIR/bin/qmake
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt \
-e build/PokeFinder \
-d Form/io.github.admiral_fish.pokefinder.desktop \
-i Form/Images/Icon/pokefinder_16x16.png \
-i Form/Images/Icon/pokefinder_24x24.png \
-i Form/Images/Icon/pokefinder_32x32.png \
-i Form/Images/Icon/pokefinder_48x48.png \
-i Form/Images/Icon/pokefinder_256x256.png \
--icon-filename io.github.admiral_fish.pokefinder
mkdir -p AppDir/usr/share/metainfo
cp Form/io.github.admiral_fish.pokefinder.appdata.xml AppDir/usr/share/metainfo/
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
mv PokéFinder-x86_64.AppImage PokeFinder-x86_64.AppImage
tar czf PokeFinder-linux.tar.gz -C ./build/ PokeFinder
tar czf PokeFinder-linux-AppImage.tar.gz PokeFinder-x86_64.AppImage
- name: Package PokeFinder (macOS)
if: matrix.platform-name == 'macOS'
run: |
mv build/PokeFinder.app .
macdeployqt PokeFinder.app -verbose=3
tar czf PokeFinder-macOS.tar.gz PokeFinder.app
mkdir upload && mv PokeFinder.app upload
- name: Upload Artifact (Windows / macOS)
if: matrix.platform-name != 'Ubuntu'
uses: actions/upload-artifact@v6
with:
name: PokeFinder-${{ matrix.platform-name }}
path: upload
- name: Upload Artifact (Linux Binary)
if: matrix.platform-name == 'Ubuntu'
uses: actions/upload-artifact@v6
with:
name: PokeFinder-linux
path: ./build/PokeFinder
- name: Upload Artifact (Linux AppImage)
if: matrix.platform-name == 'Ubuntu'
uses: actions/upload-artifact@v6
with:
name: PokeFinder-linux-AppImage
path: PokeFinder-x86_64.AppImage
- name: Publish Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
PokeFinder-win.zip
PokeFinder-linux.tar.gz
PokeFinder-linux-AppImage.tar.gz
PokeFinder-macOS.tar.gz