-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
230 lines (208 loc) · 6.41 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
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
variables:
BUILDENV_NATIVE_IMAGE: gnutls/nettle-build-images:buildenv-native
BUILDENV_CLANG_IMAGE: gnutls/nettle-build-images:buildenv-clang
BUILDENV_CROSS_IMAGE: gnutls/nettle-build-images:buildenv-cross
GET_SOURCES_ATTEMPTS: "3"
# "Native" means x86-64; no jobs run on anything else.
.native-build:
image: $CI_REGISTRY/$BUILDENV_NATIVE_IMAGE
script:
- ./.bootstrap
- './configure $EXTRA_CONFIGURE_ARGS --disable-documentation'
- 'make -j$(nproc)'
- 'make -j$(nproc) check $EXTRA_CHECK_TARGET'
tags:
- saas-linux-small-amd64
except:
- tags
variables:
NETTLE_TEST_SEED: '0'
artifacts:
expire_in: 1 week
when: always
paths:
- "config.log"
native/fat:
extends: .native-build
variables:
EXTRA_CHECK: check-fat
native/no-fat:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-fat'
native/no-static:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-static'
native/no-shared:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-static'
native/32-bit:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--enable-mini-gmp'
CC: 'gcc -m32'
CXX: '/bin/false'
native/mini-gmp:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--enable-mini-gmp'
native/c89:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-assembler'
CC: '$CI_PROJECT_DIR/misc/c89'
native/extra-asserts:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--enable-extra-asserts'
native/ndebug:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: 'CPPFLAGS=-DNDEBUG --disable-assembler'
native/ubsan:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-assembler'
CFLAGS: '-fsanitize=undefined -fno-sanitize-recover -g -O2'
CXXFLAGS: '-fsanitize=undefined -fno-sanitize-recover -g -O2'
native/asan:
extends: .native-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-assembler'
CFLAGS: '-fsanitize=address -g -O2'
CXXFLAGS: '-fsanitize=address -g -O2'
build/static-analyzers:
image: $CI_REGISTRY/$BUILDENV_CLANG_IMAGE
script:
- ./.bootstrap
- scan-build ./configure --disable-documentation --disable-assembler
- scan-build --status-bugs -o scan-build-lib make -j$(nproc)
tags:
- saas-linux-small-amd64
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- scan-build-lib/*
build/gnutls:
image: $CI_REGISTRY/$BUILDENV_NATIVE_IMAGE
script:
- ./.bootstrap &&
./configure --disable-documentation --prefix="$(pwd)/local" --libdir="$(pwd)/local/lib" &&
make -j4 && make install
- git clone --depth 1 --branch master https://gitlab.com/gnutls/gnutls.git gnutls-git
- cd gnutls-git && git submodule update --init && ./bootstrap &&
./configure PKG_CONFIG_PATH="$(pwd)/../local/lib/pkgconfig" CPPFLAGS="-I$(pwd)/../local/include"
LDFLAGS="-L$(pwd)/../local/lib -Wl,-rpath,$(pwd)/../local/lib"
--disable-cxx --disable-guile --without-p11-kit --disable-doc &&
make -j$(nproc) && make -j $(nproc) check
tags:
- saas-linux-small-amd64
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- gnutls-git/guile/tests/*.log
- gnutls-git/tests/*.log
- gnutls-git/*.log
- gnutls-git/tests/*/*.log
- gnutls-git/tests/suite/*/*.log
remote/s390x:
image: $CI_REGISTRY/$BUILDENV_NATIVE_IMAGE
before_script:
# File created as world-readable by gitlab ci machinery.
- chmod 0600 $SSH_PRIVATE_KEY
- ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"mkdir -p ci-work/$CI_PIPELINE_IID"
script:
- echo $CI_PIPELINE_IID
- ./.bootstrap &&
./configure && make PACKAGE_VERSION=snapshot dist &&
ls -l *.tar.gz
- cat nettle-snapshot.tar.gz |
ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"cd ci-work/$CI_PIPELINE_IID && tar xzf -"
- ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"cd ci-work/$CI_PIPELINE_IID/nettle-snapshot && ./configure --disable-documentation --enable-s390x-msa"
- ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"cd ci-work/$CI_PIPELINE_IID/nettle-snapshot && make"
- ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"cd ci-work/$CI_PIPELINE_IID/nettle-snapshot && NETTLE_TEST_SEED=0 make check"
after_script:
- ssh -o 'StrictHostKeyChecking no' -i "$SSH_PRIVATE_KEY" "$S390X_ACCOUNT"
"rm -rf ci-work/$CI_PIPELINE_IID"
only:
variables:
- $SSH_PRIVATE_KEY != ""
- $S390X_ACCOUNT != ""
tags:
- saas-linux-small-amd64
except:
- tags
.cross-build:
image: $CI_REGISTRY/$BUILDENV_CROSS_IMAGE
script:
- build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
- host="${CI_JOB_NAME#cross/}"
# Not setting CC_FOR_BUILD paired with qemu-user/binfmt somehow causes
# config.guess to detect the target as the build platform and not activate
# cross-compile mode, even though --build is given.
- export CC_FOR_BUILD="gcc"
- export CC="$host-gcc"
# Disable C++, to not depend on cross g++.
- export CXX=/bin/false
- ./.bootstrap
- ./configure --disable-documentation $EXTRA_CONFIGURE_ARGS --build=$build --host=$host
- make -j$(nproc)
- make EMULATOR=${EMULATOR} -j$(nproc) check
- make EMULATOR=${EMULATOR} -j$(nproc) check-fat
tags:
- saas-linux-small-amd64
except:
- tags
variables:
NETTLE_TEST_SEED: '0'
artifacts:
expire_in: 1 week
when: always
paths:
- "config.log"
cross/arm-linux-gnueabihf:
extends: .cross-build
variables:
EMULATOR: qemu-arm
cross/aarch64-linux-gnu:
extends: .cross-build
variables:
EMULATOR: qemu-aarch64
# Setting QEMU_LD_PREFIX works around the error "qemu-ppc64: Could not
# open '/lib64/ld64.so.1".
cross/powerpc64-linux-gnu:
extends: .cross-build
variables:
EXTRA_CONFIGURE_ARGS: '--enable-mini-gmp'
QEMU_LD_PREFIX: /usr/powerpc64-linux-gnu
EMULATOR: qemu-ppc64
cross/powerpc64le-linux-gnu:
extends: .cross-build
variables:
EMULATOR: qemu-ppc64le
# Disable assembly files, because current qemu doesn't support all
# needed instructions.
cross/s390x-linux-gnu:
extends: .cross-build
variables:
EXTRA_CONFIGURE_ARGS: '--disable-assembler'
EMULATOR: qemu-s390x
cross/sparc64-linux-gnu:
extends: .cross-build
variables:
EXTRA_CONFIGURE_ARGS: '--enable-mini-gmp'
QEMU_LD_PREFIX: /usr/sparc64-linux-gnu
EMULATOR: qemu-sparc64