1 Star 1 Fork 0

Jun Peng / wget2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.gitlab-ci.yml 16.24 KB
一键复制 编辑 原始数据 按行查看 历史
Tim Rühsen 提交于 2020-10-31 11:00 . Test for bashisms in Debian Testing
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
# we utilize the images generated by the build-images project, to
# speed up CI runs. We also use ccache and store config.cache
# to speed up compilation. We include a version number in cache
# name to allow expiration of old caches.
stages:
- stage1-testing
- stage2-tarball
cache:
key: "$CI_JOB_NAME-ver4"
paths:
- cache/
before_script:
# CCache Config
- mkdir -p cache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/cache
- echo $CCACHE_DIR
- export CC="ccache gcc"
after_script:
# somehow after_script looses environment
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/cache
- if which ccache >/dev/null; then ccache -s; fi
variables:
BUILD_IMAGES_PROJECT: gnuwget/build-images
DEBIAN_BUILD: buildenv-debian-stretch
DEBIAN_TESTING_BUILD: buildenv-debian-testing
DEBIAN_STABLEi386_BUILD: buildenv-debian-stable-i386
DEBIAN_UNSTABLE_BUILD: buildenv-debian-unstable
DEBIAN_HTTP2_BUILD: buildenv-mhd-http2
FEDORA_BUILD: buildenv-fedora
CENTOS7_BUILD: buildenv-centos7
MINGW_BUILD: buildenv-mingw
ALPINE_BUILD: buildenv-alpine
ARCH_BUILD: buildenv-arch
BASIC_BUILD: buildenv-basic
GET_SOURCES_ATTEMPTS: "3"
GIT_DEPTH: "5"
CONFIGURE_BASE_FLAGS: --enable-assert --cache-file cache/config.cache
CFLAGS_DEFAULT: -O1 -g -ggdb3
# We organize the CI runners as thus:
# 1. Debian Stretch Build:
# * ASan and UBSan builds
# * make syntax-check
# * make distcheck
#
# 2. Fedora Build
# * LLVM/Clang Build
# * Valgrind Tests
#
# 3. CentOS7 Build
# * Build with musl / newlib
# * Minimal Build (All features disabled)
#
# This way we split most of the different build options across different
# platforms as well. Other builds we would like to have:
#
# 1. Windows
# 2. OSX
# 3. Documentation Generation and Gitlab pages
# 4. Code coverage stats
Full+VPATH/Debian:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
script:
- contrib/spell-checker
- export CFLAGS="$CFLAGS_DEFAULT"
- sed -i 's/dist-lzip//g' configure.ac
- ./bootstrap --skip-po && touch .manywarnings
- mkdir vpath && cd vpath
- ../configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache
- make -j$(nproc)
- make -j$(nproc) distcheck
- mv wget2-*.gz ..
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- wget2-*.gz
# Debian Testing
# - Testing dash to detects bashims in configure.ac
Debian/Testing:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_TESTING_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- CONFIG_SHELL=/bin/dash dash ./configure $CONFIGURE_BASE_FLAGS -q 2>&1 >/dev/null |
grep -v "libhsts was not found" | grep . && exit 1
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
# Debian Unstable
Debian/Unstable:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_UNSTABLE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Debian/WolfSSL:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_UNSTABLE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS --with-ssl=wolfssl
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Debian/OpenSSL:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_UNSTABLE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS --with-ssl=openssl
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
# In this build we combine
# * gcc
# * check, syntax-check
Minimal/Debian:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- sed -i 's/dist-lzip//g' configure.ac
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS --disable-doc
--disable-xattr --without-gnutls --without-libpsl --without-libnghttp2 --without-bzip2
--without-gpgme --without-zlib --without-lzma --without-brotlidec --without-libidn2
--without-libidn --without-libpcre2 --without-libpcre --without-plugin-support
- make -j$(nproc) -C lib
- make -j$(nproc) check CFLAGS="$CFLAGS_DEFAULT -Werror"
tags:
- shared
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
# In this build we combine
# * clang
# * ASan, UBSan
# * check, syntax-check
Sanitizers/Debian:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_UNSTABLE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- export CC="ccache clang"
- export UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1
- export LSAN_OPTIONS=suppressions="$PWD/tests/clang-asan-suppressions"
- export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
- ./configure $CONFIGURE_BASE_FLAGS --enable-fsanitize-asan --enable-fsanitize-ubsan
- make -j$(nproc) -C lib
- make -j$(nproc) check CFLAGS="$CFLAGS_DEFAULT -Werror"
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Scan-Build/Debian:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_UNSTABLE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- CC=clang ./configure $CONFIGURE_BASE_FLAGS
- make -C lib -j$(nproc)
- scan-build -v --use-cc=clang -enable-checker valist,nullability --status-bugs -o scan-build make -j$(nproc)
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- scan-build/*
Valgrind/Debian:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po
- ./configure $CONFIGURE_BASE_FLAGS --enable-valgrind-tests
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Valgrind/i386:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_STABLEi386_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po
- ./configure $CONFIGURE_BASE_FLAGS --enable-valgrind-tests --without-gpgme
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Simple/Fedora:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS
- make -j$(nproc) -C lib
- make -j$(nproc) check CFLAGS="$CFLAGS_DEFAULT -Werror"
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Alpine:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$ALPINE_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ln -s /usr/bin/python3 /usr/bin/python
- ./bootstrap --skip-po
- ./configure $CONFIGURE_BASE_FLAGS
- make -j$(nproc) check
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
#Centos7 build:
# stage: stage1-testing
# image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD
# script:
# - sed -i 's/AM_GNU_GETTEXT_VERSION(0.19.3)/AM_GNU_GETTEXT_VERSION(0.18.2)/g' configure.ac
# - ./bootstrap && ./configure --enable-gcc-warnings --disable-doc && make -j$(nproc) check
# tags:
# - shared
# artifacts:
# expire_in: 2 weeks
# when: on_failure
# paths:
# - tests/*.log
# - compat_reports/
pages:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_BUILD
script:
- mkdir -p public
- ./bootstrap --skip-po
- export CFLAGS="$CFLAGS_DEFAULT"
- ./configure $CONFIGURE_BASE_FLAGS
- make -j$(nproc) check-coverage
# Tarball
- make dist
- mv wget2-*.gz public/wget2-latest.tar.gz
# Test suite coverage report
- coverage=$(grep -m 1 'headerCovTableEntry[a-zA-Z].*[0-9]*' lcov/index.html|sed 's/^.*>\([0-9]\+\.[0-9]\+\).*/\1/');
- coverage=$(printf %.2f $coverage)
- inum=$(echo $coverage|cut -d'.' -f1)
- if [ -z "$inum" ]; then inum="0"; fi
- contrib/make-coverage-badge "coverage" "$coverage%"
- mv badge.svg public/coverage.svg
- rm -rf public/coverage
- mv lcov public/coverage
# Online Documentation
- rm -rf public/reference
- mv docs/html public/reference
# Coverage report for all our fuzz corpora
- make -j$(nproc) fuzz-coverage
- coverage=$(grep -m 1 'headerCovTableEntry[a-zA-Z].*[0-9]*' lcov/index.html|sed 's/^.*>\([0-9]\+\.[0-9]\+\).*/\1/');
- coverage=$(printf %.2f $coverage)
- inum=$(echo $coverage|cut -d'.' -f1)
- if [ -z "$inum" ]; then inum="0"; fi
- contrib/make-coverage-badge "fuzz-coverage" "$coverage%"
- mv badge.svg public/fuzz-coverage.svg
- rm -rf public/fuzz-coverage
- mv lcov public/fuzz-coverage
tags:
- shared
- linux
artifacts:
when: on_success
paths:
- public
only:
- master
MinGW64:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
script:
- ./bootstrap --skip-po
- cp pthread_sigmask.c.mingw lib/pthread_sigmask.c
- export CC="ccache $PREFIX-gcc"
- export GCCLIB=$(dirname $(find /usr/lib/gcc/$PREFIX -name libgcc_s_seh-1.dll|grep posix))
- export WINEPATH="$WINEPATH;/usr/$PREFIX/bin;/usr/$PREFIX/lib;$PWD/libwget/.libs;$GCCLIB"
- echo "WINEPATH=$WINEPATH"
- ./configure $CONFIGURE_BASE_FLAGS --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared
- make -j$(nproc)
- make check -j$(nproc) LOG_COMPILER=wine
tags:
- shared
- linux
except:
- tags
- coverity-scan@gnuwget/wget2
allow_failure: true
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./config.h
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
Arch:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$ARCH_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- sed -i 's/dist-lzip//g' configure.ac
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS
- make -j$(nproc)
- make check -j$(nproc)
tags:
- shared
- linux
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
# Test building from tarball in a non-dev environment
Tarball:
stage: stage2-tarball
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$BASIC_BUILD
variables:
GIT_STRATEGY: none
script:
# remove all files from git repo
- mv wget2-*.gz /tmp
- rm -rf * .git* .travis*
- mv /tmp/wget2-*.gz .
# unpack and build from tarball
- tar xvf wget2-*.gz
- cd wget2-*
- unset CC
- ./configure $CONFIGURE_BASE_FLAGS --disable-manywarnings
- make -j$(nproc)
- make -j$(nproc) check
# check if essential files are accidentally cleaned
- make clean
- make -j$(nproc)
tags:
- shared
- linux
dependencies:
- Full+VPATH/Debian
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- wget2-*/*.log
- wget2-*/tests/*.log
- wget2-*/unit-tests/*.log
- wget2-*/fuzz/*.log
CommitCheck:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$BASIC_BUILD
before_script:
- /bin/true
script:
- ./contrib/commit-check
after_script:
- /bin/true
allow_failure: true
cache:
paths:
policy: push
Debian/HTTP2:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_HTTP2_BUILD
script:
- export CFLAGS="$CFLAGS_DEFAULT"
- ./bootstrap --skip-po && touch .manywarnings
- ./configure $CONFIGURE_BASE_FLAGS --enable-code-coverage
- make -j$(nproc)
- make check -j$(nproc)
- make code-coverage-capture
tags:
- shared
- linux
allow_failure: true
except:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 2 weeks
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- unit-tests/*.log
- tests/*.log
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- wget2-*-coverage
# That is a specific runner that we cannot enable universally.
# We restrict it to builds under the $BUILD_IMAGES_PROJECT project.
FreeBSD.x86_64:
stage: stage1-testing
image:
script:
- export CC="ccache clang"
- sed -i.bak 's/dist-lzip//g' configure.ac
- sed -i.bak '/^python/d' bootstrap.conf
- sed -i.bak '/^lzip/d' bootstrap.conf
- sed -i.bak '/^makeinfo/d' bootstrap.conf
- ./bootstrap --skip-po && touch .manywarnings
- LIBS="-L/usr/local/lib" ./configure --cache-file cache/config.cache --disable-doc
- gmake -j$(sysctl hw.ncpu | awk '{print $2}')
- gmake check -j$(sysctl hw.ncpu | awk '{print $2}')
tags:
- freebsd
only:
- branches@gnuwget/wget2
except:
- tags
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- fuzz/*.log
- tests/*.log
- unit-tests/*.log
coverity:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
- tar xfz /tmp/coverity_tool.tgz
- ./bootstrap --skip-po
- CFLAGS="-g -Og" ./configure --cache-file cache/config.cache --disable-doc
- cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j$(nproc)
- tar cfz cov-int.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN --form email=tim.ruehsen@gmx.de
--form file=@cov-int.tar.gz --form version="`git describe --tags`"
--form description="CI build"
tags:
- shared
- linux
only:
- coverity-scan@gnuwget/wget2
artifacts:
expire_in: 1 week
when: on_failure
paths:
- cov-int/*.txt
C
1
https://gitee.com/penjun71/wget2.git
git@gitee.com:penjun71/wget2.git
penjun71
wget2
wget2
master

搜索帮助