-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
.gitlab-ci.yml
123 lines (109 loc) · 3.03 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
variables:
QBS_BASE_PROFILE: "x86_64-linux-gnu-gcc-12"
QBS_PROFILE: "qt-6-5-3"
QBS_CONFIG: "debug"
QT_DEBUG_PLUGINS: 0
XDG_RUNTIME_DIR: "/tmp/runtime-kdeci/"
DISPLAY: ":90"
UBUNTU_IMAGE: "cutehmi/qt:ubuntu-23.04-qt-6.5.3"
stages:
- build
- test
# Build stage.
.build:
timeout: 360m
stage: build
only:
- master
- /^\d+$/
- merge_requests
except:
- "1"
artifacts:
expire_in: 48h
paths:
- build/$QBS_CONFIG/install-root
script:
- echo "Qbs base profile:" $QBS_BASE_PROFILE
- echo "Qbs profile:" $QBS_PROFILE
- echo "Qbs config:" $QBS_CONFIG
- qbs build -f CuteHMI.qbs -d build profile:$QBS_PROFILE config:$QBS_CONFIG
.build ubuntu:
extends: .build
image: $UBUNTU_IMAGE
before_script:
- uname -a
- mkdir -pm 0700 $XDG_RUNTIME_DIR
- qbs --version
- qmake --version
- qbs setup-toolchains --detect
- qbs setup-qt --detect
- qbs config --list profiles
- qbs config profiles.$QBS_PROFILE.baseProfile $QBS_BASE_PROFILE
- sudo apt-get update
- sudo apt-get install libgpiod-dev --yes
build gcc ubuntu debug:
extends: .build ubuntu
variables:
QBS_BASE_PROFILE: "x86_64-linux-gnu-gcc-12"
QBS_CONFIG: "debug"
build clang ubuntu debug:
extends: .build ubuntu
variables:
QBS_BASE_PROFILE: "clang-15"
QBS_CONFIG: "debug"
build gcc ubuntu release:
extends: .build ubuntu
variables:
QBS_BASE_PROFILE: "x86_64-linux-gnu-gcc-12"
QBS_CONFIG: "release"
build clang ubuntu release:
extends: .build ubuntu
variables:
QBS_BASE_PROFILE: "clang-15"
QBS_CONFIG: "release"
# Test stage.
.test:
stage: test
allow_failure: true
only:
- master
- /^\d+$/
- merge_requests
except:
- "1"
artifacts:
expire_in: 24h
paths:
- build_tests/$QBS_CONFIG/install-root
reports:
junit:
- build_tests/$QBS_CONFIG/install-root/usr/local/cutehmi/app/*.xunit.xml
script:
- qbs build -f TestCuteHMI.qbs -d build_tests -p autotest-runner profile:$QBS_PROFILE config:$QBS_CONFIG
- qbs resolve -f TestCuteHMI.qbs -d build_tests modules.autotest.arguments:'["-txt"]' modules.autotest.allowFailure:false profile:$QBS_PROFILE config:$QBS_CONFIG
- qbs build -f TestCuteHMI.qbs -d build_tests -k -p autotest-runner --jobs 1 modules.autotest.arguments:'["-txt"]' modules.autotest.allowFailure:false profile:$QBS_PROFILE config:$QBS_CONFIG
.test ubuntu:
extends: .test
image: $UBUNTU_IMAGE
before_script:
- uname -a
- mkdir -pm 0700 $XDG_RUNTIME_DIR
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
- sleep 1
- qbs --version
- qmake --version
- qbs setup-toolchains --detect
- qbs setup-qt --detect
- qbs config --list profiles
- qbs config profiles.$QBS_PROFILE.baseProfile $QBS_BASE_PROFILE
- sudo apt-get update
- sudo apt-get install libgpiod-dev --yes
test gcc ubuntu debug:
extends: .test ubuntu
variables:
QBS_CONFIG: "debug"
test gcc ubuntu release:
extends: .test ubuntu
variables:
QBS_CONFIG: "release"