diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-06 15:19:02 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-04-07 08:31:56 +0200 |
commit | 4188fa7f9d03438a38e51e3da44c1ffddc9afd67 (patch) | |
tree | fff1d6196ac7b034cab68f00d1c2703740504cc3 | |
parent | 3a322f17ff456d11e7eac132853f9024d9fd810b (diff) | |
download | gnutls_3_5_x-backport-smaller-gitlabci.tar.gz |
.gitlab-ci.yml: backported and simplified CI setupgnutls_3_5_x-backport-smaller-gitlabci
This makes builds independent by reducing interactions between
artifacts of builds.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | .gitlab-ci.yml | 254 |
1 files changed, 109 insertions, 145 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31955c3ab2..2438507316 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ stages: - initialization - stage1-testing - - stage2-testing # we utilize the images generated by the build-images project, to # speed up CI runs. @@ -22,80 +21,28 @@ init/Fedora/x86_64: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - make autoreconf - tags: - - shared - artifacts: - untracked: true - expire_in: 1 day - - -######################################## -# Stage 1, syntax and simple build+check -######################################## - -# Main build (used in stage2) - compile with C99 -ABI-check/Fedora/x86_64: - stage: stage1-testing - image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD - script: - - CFLAGS="-std=c99 -O2 -g" ./configure --prefix=/usr --libdir=/usr/lib64 --disable-cxx --enable-code-coverage --disable-non-suiteb-curves --disable-maintainer-mode --disable-doc - && make -j$(nproc) - - make abi-check - - make pic-check - tags: - - shared - except: - - tags - dependencies: - - init/Fedora/x86_64 - artifacts: - untracked: true - expire_in: 4 days - -syntax-check/Fedora/x86_64: - stage: stage1-testing - image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD - script: - - ./configure --prefix=/usr --libdir=/usr/lib64 --disable-cxx --disable-non-suiteb-curves --disable-maintainer-mode --disable-guile - - make syntax-check - tags: - - shared - dependencies: - - init/Fedora/x86_64 - except: - - tags - -cppcheck/Fedora/x86_64: - stage: stage1-testing - image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD - script: - ./configure --prefix=/usr --libdir=/usr/lib64 --disable-cxx --disable-non-suiteb-curves --disable-maintainer-mode --disable-guile - - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring - - cppcheck --force -q -Ilib/include -Igl/ -Ilibdane/ -I. --error-exitcode=1 libdane/ + - make syntax-check + - make distclean tags: - shared - except: - - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure paths: - ./*.log - - tests/*.log - - tests/*/*.log ################################################## -# Stage 2, documentation, and advanced checks +# Stage 1, documentation, and advanced checks ################################################## -dist/Fedora: - stage: stage2-testing +doc-dist/Fedora: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - git submodule update --init + - git submodule update --init --no-fetch + - make autoreconf - CFLAGS="-std=c99 -O2 -g" ./configure --prefix=/usr --libdir=/usr/lib64 --disable-cxx --disable-non-suiteb-curves --enable-gtk-doc --disable-maintainer-mode && make -C doc stamp-vti && make -C doc stamp-1 && make -j$(nproc) - make -C doc gnutls.html @@ -104,29 +51,46 @@ dist/Fedora: - make dist tags: - shared - dependencies: - - init/Fedora/x86_64 except: - tags -coverage/Fedora: - stage: stage2-testing +# ABI check + coverage +abi-coverage/Fedora: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - git submodule update --init --no-fetch + - make autoreconf + - CFLAGS="-std=c99 -O2 -g" ./configure --prefix=/usr --libdir=/usr/lib64 --disable-cxx --enable-code-coverage --disable-non-suiteb-curves --disable-maintainer-mode --disable-doc + && make -j$(nproc) + - make abi-check + - make pic-check - make -j$(nproc) check - make local-code-coverage-output || true tags: - shared - dependencies: - - ABI-check/Fedora/x86_64 except: - tags - + artifacts: + expire_in: 1 week + when: on_failure + paths: + - ./guile/tests/*.log + - ./tests/*.log + - ./*.log + - ./tests/*/*.log + - ./tests/suite/*/*.log minimal/Fedora/x86_64: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - echo "No tools build" + - make autoreconf + - ./configure --disable-full-test-suite --disable-doc --disable-guile --disable-tools --enable-tests + - make -j$(nproc) + - make -j$(nproc) check + - echo "Minimal build" - dnf remove -y libunistring-devel libtasn1-devel libidn-devel && ./configure --with-included-libtasn1 --enable-valgrind-tests --disable-doc --disable-dtls-srtp-support --disable-alpn-support --disable-rsa-export @@ -135,26 +99,23 @@ minimal/Fedora/x86_64: --disable-ocsp --disable-session-tickets --disable-non-suiteb-curves --with-included-unistring --disable-nls --disable-crywrap --disable-libdane --without-p11-kit --without-tpm --disable-ssl3-support --disable-ssl2-support --without-zlib --disable-doc --disable-tests --enable-openssl-compatibility && make -j$(nproc) - dependencies: - - init/Fedora/x86_64 tags: - shared except: - tags no-SSL-3.0/Fedora/x86_64: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - make autoreconf - mkdir -p build && cd build && - ../configure --disable-ssl3-support --disable-ssl2-support --disable-non-suiteb-curves --enable-seccomp-tests --disable-doc --disable-guile && + ../configure --disable-ssl3-support --disable-ssl2-support --disable-full-test-suite --enable-seccomp-tests --disable-doc --disable-guile && make -j$(nproc) && make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure @@ -163,82 +124,82 @@ no-SSL-3.0/Fedora/x86_64: - build/tests/*.log - build/*.log - build/tests/*/*.log + - build/tests/suite/*/*.log -clang/Fedora/x86_64: - stage: stage2-testing +FIPS140-2/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - CC=clang ./configure --disable-non-suiteb-curves --enable-seccomp-tests --disable-doc --disable-guile && - make -j$(nproc) && make check -C tests -j$(nproc) + - make autoreconf + - mkdir -p build && cd build && + ../configure --disable-non-suiteb-curves --enable-fips140-mode --disable-doc --disable-full-test-suite --disable-guile + - make -j$(nproc) + - GNUTLS_SKIP_FIPS_INTEGRITY_CHECKS=1 GNUTLS_FORCE_FIPS_MODE=1 make check -j$(nproc) + - make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: - expire_in: 1 week when: on_failure paths: - - ./*.log - - guile/tests/*.log - - tests/*.log - - tests/*/*.log + - build/guile/tests/*.log + - build/tests/*.log + - build/tests/*/*.log -FIPS140-2/Fedora/x86_64: - stage: stage2-testing +IDNA2003/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - make autoreconf - mkdir -p build && cd build && - ../configure --disable-non-suiteb-curves --enable-fips140-mode --disable-doc --disable-full-test-suite --disable-guile - - make -j$(nproc) - - GNUTLS_SKIP_FIPS_INTEGRITY_CHECKS=1 GNUTLS_FORCE_FIPS_MODE=1 make check -j$(nproc) - - make check -j$(nproc) + ../configure --without-libidn2 --disable-doc --disable-guile --disable-full-test-suite && + make -j$(nproc) && make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: when: on_failure paths: - - guile/tests/*.log + - build/guile/tests/*.log - build/tests/*.log - build/tests/*/*.log -IDNA2003/Fedora/x86_64: - stage: stage2-testing +no-openpgp/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - make autoreconf - mkdir -p build && cd build && - ../configure --without-libidn2 --disable-doc --disable-guile --disable-full-test-suite && - make -j$(nproc) && make check -j$(nproc) + ../configure --disable-openpgp-authentication --disable-doc --disable-guile --disable-full-test-suite + - make -j$(nproc) + - make abi-check + - make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: when: on_failure paths: - - guile/tests/*.log + - build/guile/tests/*.log - build/tests/*.log - build/tests/*/*.log + - build/compat_reports/* valgrind/Fedora/x86_64: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - ./configure - --disable-non-suiteb-curves --disable-doc --disable-guile --disable-full-test-suite --enable-valgrind-tests && make -j$(nproc) && make check -j$(nproc) + - make autoreconf + - ./configure --disable-doc --disable-guile --disable-full-test-suite --enable-valgrind-tests + - make -j$(nproc) + - make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure @@ -247,18 +208,20 @@ valgrind/Fedora/x86_64: - tests/*.log - tests/*/*.log -no-tools/Fedora/x86_64: - stage: stage2-testing +asan/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - ./configure - --disable-non-suiteb-curves --disable-doc --disable-guile --disable-tools --enable-tests && make -j$(nproc) && make -j$(nproc) check + - git submodule update --init --no-fetch + - make autoreconf + - CFLAGS="-fsanitize=address -g -O2" LDFLAGS="-static-libasan" + ./configure --disable-doc --disable-non-suiteb-curves --disable-guile + - make -j$(nproc) + - make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure @@ -266,35 +229,35 @@ no-tools/Fedora/x86_64: - ./*.log - tests/*.log - tests/*/*.log + - tests/suite/*/*.log -asan/Fedora/x86_64: - stage: stage2-testing +static-analyzers/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - CFLAGS="-fsanitize=address -g -O2" LDFLAGS="-static-libasan" - ./configure --disable-doc --disable-non-suiteb-curves --disable-guile && - make -j$(nproc) && make check -j$(nproc) + - make autoreconf + - ./configure --disable-doc --disable-guile --enable-fips140-mode + - cppcheck --force -q -Ilib/include -Igl/ -Ilib/ -I. --error-exitcode=1 lib/ -i lib/unistring + - cppcheck --force -q -Ilib/include -Igl/ -Ilibdane/ -I. --error-exitcode=1 libdane/ tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure paths: - - ./*.log - - tests/*.log - - tests/*/*.log + - scan-build-lib/* + - scan-build-libdane/* MinGW32/DLLs: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc && echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register && rm -f tests/suite/mini-eagain2.c + - make autoreconf - mingw32-configure --with-included-libtasn1 --disable-nls --disable-guile --with-included-unistring --enable-local-libopts --disable-non-suiteb-curves --disable-doc && mingw32-make -j$(nproc) && mingw32-make -C tests check -j$(nproc) # Combine generated apps and DLLs. @@ -315,8 +278,6 @@ MinGW32/DLLs: cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libffi-*.dll win32-build/bin && cp lib/.libs/*.a lib/*.def lib/gnutls.pc win32-build/lib && cp lib/includes/gnutls/*.h win32-build/lib/includes - dependencies: - - init/Fedora/x86_64 tags: - shared - docker @@ -327,12 +288,13 @@ MinGW32/DLLs: - win32-build/ MinGW64/DLLs: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc && echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register && rm -f tests/suite/mini-eagain2.c + - make autoreconf - mingw64-configure --with-included-libtasn1 --disable-guile --disable-nls --with-included-unistring --enable-local-libopts --disable-non-suiteb-curves --disable-doc && mingw64-make -j$(nproc) && mingw64-make -C tests check -j$(nproc) # Combine generated apps and DLLs. @@ -358,16 +320,15 @@ MinGW64/DLLs: - docker only: - tags - dependencies: - - init/Fedora/x86_64 artifacts: paths: - win64-build/ MinGW64: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - make autoreconf - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc && echo ':DOSWin:M::MZ::/usr/bin/wine64:' > /proc/sys/fs/binfmt_misc/register && rm -f tests/suite/mini-eagain2.c && mkdir -p build && cd build && @@ -378,8 +339,6 @@ MinGW64: - docker except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure @@ -389,9 +348,10 @@ MinGW64: - build/tests/*/*.log MinGW32: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - make autoreconf - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc && echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register && rm -f tests/suite/mini-eagain2.c && mkdir -p build && cd build && @@ -402,8 +362,6 @@ MinGW32: - docker except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: expire_in: 1 week when: on_failure @@ -415,7 +373,7 @@ MinGW32: # That is a specific runner that we cannot enable universally. # We restrict it to builds under the $BUILD_IMAGES_PROJECT project. FreeBSD10/x86_64: - stage: stage2-testing + stage: stage1-testing image: before_script: - /usr/bin/true @@ -438,9 +396,10 @@ FreeBSD10/x86_64: # We need a clean 32-bit fedora for testing Fedora/x86: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_X86_BUILD script: + - git submodule update --init --no-fetch - make autoreconf && mkdir -p build && cd build && ../configure --build=i686-redhat-linux --target=i686-redhat-linux --disable-cxx --enable-local-libopts --disable-non-suiteb-curves --enable-seccomp-tests --disable-doc --disable-guile && make -j$(nproc) && make check -j$(nproc) && make pic-check @@ -448,7 +407,6 @@ Fedora/x86: - shared except: - tags - dependencies: [] artifacts: expire_in: 1 week when: on_failure @@ -456,20 +414,24 @@ Fedora/x86: - build/*.log - build/tests/*.log - build/tests/*/*.log + - build/tests/suite/*/*.log -# Check with undefined sanitizer + obtain coverage output -ubsan/Fedora/x86_64: - stage: stage2-testing +ubsan-Werror/Fedora/x86_64: + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: + - git submodule update --init --no-fetch + - make autoreconf - CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" LDFLAGS="-static-libubsan" ./configure --disable-non-suiteb-curves --disable-guile --disable-doc - && make -j$(nproc) && make check -j$(nproc) + - make -j$(nproc) -C gl + - make -j$(nproc) -C lib CFLAGS="-Werror -O2 -g" + - make -j$(nproc) -C libdane CFLAGS="-Werror -O2 -g" + - make -j$(nproc) + - make check -j$(nproc) tags: - shared except: - tags - dependencies: - - init/Fedora/x86_64 artifacts: when: on_failure paths: @@ -477,11 +439,13 @@ ubsan/Fedora/x86_64: - ./*.log - tests/*.log - tests/*/*.log + - tests/suite/*/*.log build/Debian/x86_64: - stage: stage2-testing + stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD script: + - git submodule update --init --no-fetch - make autoreconf && mkdir -p build && cd build && ../configure --disable-doc --disable-guile && make -j$(nproc) && make check -j$(nproc) @@ -489,7 +453,6 @@ build/Debian/x86_64: - shared except: - tags - dependencies: [] artifacts: when: on_failure paths: @@ -497,3 +460,4 @@ build/Debian/x86_64: - build/*.log - build/tests/*.log - build/tests/*/*.log + - build/tests/suite/*/*.log |