forked from Stellarium/stellarium
-
Notifications
You must be signed in to change notification settings - Fork 0
351 lines (307 loc) · 15 KB
/
ci.yml
File metadata and controls
351 lines (307 loc) · 15 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
#
# Implementation of Continuous Integration process for linux and macOS by Github actions (with extra additionals...)
# See https://github.com/actions/runner-images
#
name: "CI"
on:
push:
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
jobs:
# # CI on Linux (Qt5)
# ci-linux-qt5:
# name: "Linux (amd64; qt5)"
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# steps:
# - name: Install dependencies
# run: |
# sudo apt remove php* -y
# sudo apt update
# # using force-overwrite due to
# # https://github.com/actions/virtual-environments/issues/2703
# #sudo ACCEPT_EULA=Y apt upgrade -o Dpkg::Options::="--force-overwrite" --yes
# sudo apt install -y qtbase5-private-dev qtscript5-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev libqt5opengl5-dev qtmultimedia5-dev \
# libqt5multimedia5-plugins libqt5serialport5 libqt5serialport5-dev qtpositioning5-dev libgps-dev libqt5positioning5 \
# libqt5positioning5-plugins qtwebengine5-dev libqt5charts5-dev zlib1g-dev libgl1-mesa-dev libdrm-dev cmake libexiv2-dev \
# libnlopt-cxx-dev libmd4c-dev libmd4c-html0-dev
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# mkdir -p build
# cd build
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On "${{ github.workspace }}"
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on Linux (Qt6)
# ci-linux-qt6:
# name: "Linux (amd64; qt6)"
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# steps:
# - name: Install dependencies
# run: |
# sudo apt remove php* -y
# sudo apt update
# # using force-overwrite due to
# # https://github.com/actions/virtual-environments/issues/2703
# #sudo ACCEPT_EULA=Y apt upgrade -o Dpkg::Options::="--force-overwrite" --yes
# sudo apt install -y qt6-base-private-dev qt6-multimedia-dev qt6-positioning-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools \
# qt6-qpa-plugins qt6-image-formats-plugins qt6-l10n-tools qt6-webengine-dev qt6-webengine-dev-tools libqt6charts6-dev \
# libqt6charts6 libqt6opengl6-dev libqt6positioning6-plugins libqt6serialport6-dev qt6-base-dev libqt6webenginecore6-bin \
# libqt6webengine6-data libexiv2-dev libnlopt-cxx-dev zlib1g-dev libgl1-mesa-dev libdrm-dev libglx-dev libxkbcommon-x11-dev \
# libgps-dev libmd4c-dev libmd4c-html0-dev cmake gettext libgettextpo-dev libtidy-dev
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# mkdir -p build
# cd build
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On "${{ github.workspace }}"
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on Linux (Qt6)
# ci-linux-qt6-pch:
# name: "Linux (amd64; qt6; core)"
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# steps:
# - name: Install dependencies
# run: |
# sudo apt remove php* -y
# sudo apt update
# # using force-overwrite due to
# # https://github.com/actions/virtual-environments/issues/2703
# #sudo ACCEPT_EULA=Y apt upgrade -o Dpkg::Options::="--force-overwrite" --yes
# sudo apt install -y qt6-base-private-dev qt6-multimedia-dev qt6-positioning-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools qt6-qpa-plugins \
# qt6-image-formats-plugins qt6-l10n-tools qt6-webengine-dev qt6-webengine-dev-tools libqt6charts6-dev libqt6charts6 libqt6opengl6-dev \
# libqt6positioning6-plugins libqt6serialport6-dev qt6-base-dev libqt6webenginecore6-bin libqt6webengine6-data libexiv2-dev libnlopt-cxx-dev \
# zlib1g-dev libgl1-mesa-dev libdrm-dev libglx-dev libxkbcommon-x11-dev libgps-dev libmd4c-dev libmd4c-html0-dev
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# mkdir -p build
# cd build
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On -DENABLE_PCH=Off -DENABLE_NLS=Off -DENABLE_SHOWMYSKY=Off \
# -DENABLE_GPS=Off -DENABLE_LIBGPS=Off -DENABLE_MEDIA=Off -DENABLE_XLSX=Off -DENABLE_SCRIPTING=Off -DENABLE_QTWEBENGINE=Off -DUSE_PLUGIN_ANGLEMEASURE=Off \
# -DUSE_PLUGIN_ARCHAEOLINES=Off -DUSE_PLUGIN_CALENDARS=Off -DUSE_PLUGIN_EQUATIONOFTIME=Off -DUSE_PLUGIN_EXOPLANETS=Off -DUSE_PLUGIN_METEORSHOWERS=Off \
# -DUSE_PLUGIN_LENSDISTORTIONESTIMATOR=Off -DUSE_PLUGIN_NEBULATEXTURES=Off -DUSE_PLUGIN_NAVSTARS=Off -DUSE_PLUGIN_NOVAE=Off -DUSE_PLUGIN_OBSERVABILITY=Off \
# -DUSE_PLUGIN_OCULARS=Off -DUSE_PLUGIN_ONLINEQUERIES=Off -DUSE_PLUGIN_POINTERCOORDINATES=Off -DUSE_PLUGIN_PULSARS=Off -DUSE_PLUGIN_QUASARS=Off \
# -DUSE_PLUGIN_REMOTECONTROL=Off -DUSE_PLUGIN_REMOTESYNC=Off -DUSE_PLUGIN_SATELLITES=Off -DUSE_PLUGIN_SCENERY3D=Off -DUSE_PLUGIN_SOLARSYSTEMEDITOR=Off \
# -DUSE_PLUGIN_SUPERNOVAE=Off -DUSE_PLUGIN_TELESCOPECONTROL=Off -DUSE_PLUGIN_TEXTUSERINTERFACE=Off -DUSE_PLUGIN_SKYCULTUREMAKER=Off \
# "${{ github.workspace }}"
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on macOS (Qt5)
# ci-macos-qt5:
# name: "macOS (x86_64; qt5)"
# runs-on: macos-13
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# # @TODO Enable gpsd on macOS instance for CI testing
# # @BODY At the moment after installing gpsd (brew install gpsd) library can be found by cmake, but not headers! Apparently we should add some magic for environment variables or something else on macOS Catalina to make headers available for cmake/make
# steps:
# - name: Install dependencies
# env:
# HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
# HOMEBREW_NO_AUTO_UPDATE: 1
# run: |
# # brew update
# # brew upgrade
# brew install qt@5 nlopt exiv2
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# export PATH="/opt/homebrew/opt/qt@5/bin:/usr/local/opt/qt@5/bin:$PATH"
# mkdir -p build
# cd build
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On ${{ github.workspace }}
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on macOS (Qt6)
# ci-macos-intel-qt6:
# name: "macOS (x86_64; qt6)"
# runs-on: macos-13
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# # @TODO Enable gpsd on macOS instance for CI testing
# # @BODY At the moment after installing gpsd (brew install gpsd) library can be found by cmake, but not headers! Apparently we should add some magic for environment variables or something else on macOS Catalina to make headers available for cmake/make
# steps:
# - name: Install dependencies
# env:
# HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
# HOMEBREW_NO_AUTO_UPDATE: 1
# run: |
# # brew update
# # brew upgrade
# brew install qt@6 nlopt exiv2 tidy-html5
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# export PATH="/usr/local/opt/qt@6/bin:$PATH"
# mkdir -p build
# cd build
# cmake -DCMAKE_PREFIX_PATH="/usr/local/opt/qt@6;/usr/local/opt/tidy-html5" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On ${{ github.workspace }}
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on macOS (Qt6)
# ci-macos-silicon-qt6:
# name: "macOS (arm64; qt6)"
# runs-on: macos-14
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# # @TODO Enable gpsd on macOS instance for CI testing
# # @BODY At the moment after installing gpsd (brew install gpsd) library can be found by cmake, but not headers! Apparently we should add some magic for environment variables or something else on macOS Catalina to make headers available for cmake/make
# steps:
# - name: Install dependencies
# env:
# HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
# HOMEBREW_NO_ANALYTICS: 1
# HOMEBREW_NO_AUTO_UPDATE: 1
# HOMEBREW_NO_INSTALL_CLEANUP: 1
# PYTHONSTRICTEXTENSIONBUILD: 1
# run: |
# # brew update
# # brew upgrade
# brew install qt@6 nlopt exiv2 tidy-html5
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Configure CMake
# shell: bash
# run: |
# export PATH="/usr/local/opt/qt@6/bin:$PATH"
# mkdir -p build
# cd build
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On ${{ github.workspace }}
# - name: Compile
# working-directory: build
# run: make -j3
# - name: Run unit tests
# uses: coactions/setup-xvfb@v1
# with:
# working-directory: build
# run: ctest --output-on-failure
# # CI on FreeBSD (Qt5)
# ci-freebsd-qt5:
# name: "FreeBSD (x86_64; qt5)"
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Build and run unit tests in FreeBSD
# uses: vmactions/freebsd-vm@v1
# id: freebsd-qt5
# with:
# release: "14.2"
# # Use sh shell
# usesh: true
# # When using rsync, you can define copyback: false to not copy files back from the VM in to the host.
# copyback: false
# prepare: |
# pkg install -y cmake git eigen glm exiv2 nlopt fast_float md4c qxlsx perl5 xorg-vfbserver gettext qt5
# run: |
# set -e -x
# export DISPLAY=:0
# mkdir builds
# cd builds
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On "${{ github.workspace }}"
# make -j3
# Xvfb :0 -ac -screen 0 1024x768x24+32 >/dev/null 2>&1 &
# sleep 3
# ctest --output-on-failure
# sleep 1
# pkill Xvfb
# CI on FreeBSD (Qt6)
ci-freebsd-qt6:
name: "FreeBSD (x86_64; qt6)"
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and run unit tests in FreeBSD
uses: vmactions/freebsd-vm@v1
id: freebsd-qt6
with:
release: "14.2"
# Use sh shell
usesh: true
# When using rsync, you can define copyback: false to not copy files back from the VM in to the host.
copyback: false
prepare: |
pkg install -y cmake git eigen glm exiv2 nlopt fast_float md4c qxlsx-qt6 perl5 xorg-vfbserver gettext qt6 tidy-html5
echo "=== tidy-html5 package info ==="
pkg_info -L tidy-html5
echo "=== tidy-html5 installed files ==="
pkg info -l tidy-html5
echo "=== Searching for tidy headers ==="
find /usr/local -name "*tidy*" -type f 2>/dev/null || true
echo "=== Searching for tidy libraries ==="
find /usr/local -name "*tidy*" -type f -name "*.so*" -o -name "*.a" 2>/dev/null || true
echo "=== PKG_CONFIG_PATH and pkg-config info ==="
echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH"
pkg-config --list-all | grep -i tidy || echo "No tidy found in pkg-config"
echo "=== /usr/local/lib contents (tidy related) ==="
ls -la /usr/local/lib/ | grep -i tidy || echo "No tidy libs found in /usr/local/lib"
echo "=== /usr/local/include contents (tidy related) ==="
find /usr/local/include -name "*tidy*" -type f 2>/dev/null || echo "No tidy headers found in /usr/local/include"
run: |
set -e -x
export DISPLAY=:0
echo "=== Environment variables before build ==="
echo "CMAKE_PREFIX_PATH: $CMAKE_PREFIX_PATH"
echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
mkdir builds
cd builds
echo "=== Running CMake with verbose output ==="
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On -DCMAKE_VERBOSE_MAKEFILE=ON --debug-output "${{ github.workspace }}"
echo "=== CMake cache contents (tidy related) ==="
grep -i tidy CMakeCache.txt || echo "No tidy entries found in CMakeCache.txt"
echo "=== CMake configuration summary ==="
cmake -LA . | grep -i tidy || echo "No tidy configuration found"
echo "=== Starting build ==="
make -j3
Xvfb :0 -ac -screen 0 1024x768x24+32 >/dev/null 2>&1 &
sleep 3
ctest --output-on-failure
sleep 1
pkill Xvfb