forked from KDE/kstars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
147 lines (138 loc) · 4.28 KB
/
.gitlab-ci.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
# This YAML recipe builds KStars with INDI support, then runs all tests
# This is from packaging/linux/debian/control build-depends - fix that first if there is an issue in the CI build
.install_build_dependencies: &install_build_dependencies
- apt update && apt -y install --no-install-recommends software-properties-common
- apt update && add-apt-repository ppa:mutlaqja/ppa
- >
apt update && apt -y install --no-install-recommends
gcc-multilib
g++-multilib
make
gettext
coreutils
cmake
extra-cmake-modules
qtbase5-dev
qtdeclarative5-dev
qtmultimedia5-dev
qtpositioning5-dev
libqt5websockets5-dev
libqt5svg5-dev
libqt5sql5-sqlite
kdoctools-dev
libkf5config-dev
libkf5guiaddons-dev
libkf5i18n-dev
libkf5newstuff-dev
libkf5notifications-dev
libkf5xmlgui-dev
libkf5plotting-dev
libkf5crash-dev
libkf5notifyconfig-dev
libeigen3-dev
zlib1g-dev
libcfitsio-dev
libnova-dev
libindi-dev
indi-bin
wcslib-dev
libraw-dev
libgsl-dev
phonon4qt5-backend-vlc
qt5keychain-dev
libsecret-1-dev
# This is from packaging/linux/debian/control recommends/depends - fix that first if there is an issue in the CI build
.install_test_dependencies: &install_test_dependencies
- apt update && apt -y install --no-install-recommends software-properties-common
- apt update && add-apt-repository ppa:mutlaqja/ppa && add-apt-repository ppa:pch/phd2
- >
apt update &&
apt -y --no-install-recommends install
make
cmake
extra-cmake-modules
xplanet
xplanet-images
astrometry.net
kded5
kinit
libindi1
indi-bin
breeze-icon-theme
libqt5sql5-sqlite
qml-module-qtquick-controls
phd2
xvfb
#image: ubuntu:latest
# Run the full validation in one step
# The artifacts take far too much time to propagate from one step to the other
# The cache is unreliable, and only works on the same runner if there is no shared cache - use it for ccache instead
# Consolidate runner with build packages and build
build-and-test:
stage: test
interruptible: true
image: tallfurryman/kstars-ci
# before_script:
# - *install_build_dependencies
# - *install_test_dependencies
script:
- mkdir -p kstars-build
- cd kstars-build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) clean all install
- rm -rf Testing
- xvfb-run make test QT_TEST_TIMEOUT_FUNCTION=600000 QT_QPA_PLATFORM=eglfs ARGS='-T test -V --output-on-failure --no-compress-output' || true
- apt install -y --no-install-recommends libsaxon-java openjdk-11-jre-headless
- saxon-xslt -u $(find ./Testing -name Test.xml) https://raw.githubusercontent.com/rpavlik/jenkins-ctest-plugin/master/ctest-to-junit.xsl > ./junit_result.xml
artifacts:
reports:
junit:
kstars-build/junit_result.xml
# This part kept for reference, does not work on our gitlab instance
# Mainly because of the propagation of artifact from stage build to stage test
# Probably because the upload uses a webdav REST API, and there are many large files in the list
# In the meantime, following up on the many gitlab issues reporting that problem
# We build and test
#stages:
# - build
# - test
# We cache the build folder per job and per branch
# cache:
# key: "$CI_COMMIT_REF_SLUG"
# paths:
# - kstars-build/
# Consolidate runner with build packages and build
#build-kstars:
# stage: build
# interruptible: true
# before_script:
# - *install_build_dependencies
# script:
# - mkdir -p kstars-build
# - cd kstars-build
# - cmake -DCMAKE_BUILD_TYPE=Release ..
# - make -j$(nproc) clean all
# artifacts:
# expire_in: 3600 sec
# paths:
# - kstars-build/
# exclude:
# - kstars-build/**/*.o
# Consolidate runner with test packages and test
#test-kstars:
# stage: test
# interruptible: true
# needs:
# - build-kstars
# dependencies:
# - build-kstars
# before_script:
# - *install_test_dependencies
# script:
# - cd kstars-build
# - rm -rf Testing
# - xvfb-run -a make test QT_TEST_TIMEOUT_FUNCTION=600000 ARGS='-T test --no-compress-output'
# artifacts:
# reports:
# junit:
# kstars-build/Testing/**.xml