spot/.gitlab-ci.yml
Alexandre Duret-Lutz 4f23097619 build in C++17 mode by default
* configure.ac: Activate C++17, and replace --enable-c++17 by
--enable-c++20.
* NEWS: Mention the news.
* .gitlab-ci.yml: Use C++20 for the former C++17 builds.
* HACKING, README, doc/org/compile.org, doc/org/concepts.org,
doc/org/index.org, doc/org/install.org, doc/org/tut.org,
doc/org/upgrade2.org, spot/misc/escape.hh: Adjust mentions
of C++14.
2020-07-16 12:12:21 +02:00

306 lines
7.9 KiB
YAML

stages:
- build
- publish
debian-stable-gcc:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-debuild:stable
script:
- autoreconf -vfi
- ./configure --enable-max-accsets=256
- make
- make distcheck
artifacts:
when: always
paths:
- ./spot-*/_build/sub/tests/*/*.log
- ./*.log
- ./*.tar.gz
debian-unstable-gcc-coverage:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-debuild
script:
- autoreconf -vfi
- ./configure CXX='g++ --coverage' --enable-devel --disable-static --enable-doxygen
- make
- make check
- lcov --capture --directory . --no-external --output spot.info
- lcov --remove spot.info '*/bin/spot.cc' '*/bin/spot-x.cc' '*/spot/parse*/scan*.cc' '*/spot/parse*/parse*.cc' '*/utf8/*' '*/python/*' '*/buddy/*' '*/doc/org/tmp/*' --output spot2.info
- lcov --summary spot2.info
- genhtml --legend --demangle-cpp --output-directory coverage spot2.info
artifacts:
when: always
paths:
- tests/*/*.log
- ./*.log
- doc/spot.html/
- doc/userdoc/
- coverage/
- ./*.tar.gz
- spot2.info
debian-gcc-snapshot:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-debuild
script:
- export PATH="/usr/lib/gcc-snapshot/bin:$PATH" LD_LIBRARY_PATH="/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH"
- autoreconf -vfi
- ./configure --with-included-ltdl CXX='g++'
- make
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--with-included-ltdl'
allow_failure: true
artifacts:
when: always
paths:
- ./spot-*/_build/sub/tests/*/*.log
- ./*.log
- doc/spot.html/
- doc/userdoc/
- ./*.tar.gz
alpine-gcc:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-alpine
script:
- autoreconf -vfi
- ./configure
- make
- make check
- make distcheck || { chmod -R u+w ./spot-*; false; }
artifacts:
when: always
paths:
- tests/*/*.log
- ./*.log
arch-clang:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-arch
script:
- autoreconf -vfi
- ./configure --prefix ~/install_dir CC='clang -Qunused-arguments' CXX='clang++ -Qunused-arguments' --enable-devel --enable-c++20 --enable-doxygen
- make
- make distcheck
artifacts:
when: on_failure
paths:
- ./spot-*/_build/sub/tests/*/*.log
- ./*.log
arch-gcc-glibcxxdebug:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-arch
script:
- autoreconf -vfi
- ./configure --enable-devel --enable-c++20 --enable-glibcxx-debug
- make
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-devel --enable-c++20 --enable-glibcxx-debug'
artifacts:
when: on_failure
paths:
- ./spot-*/_build/sub/tests/*/*.log
- ./*.log
mingw-shared:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-debuild
script:
- autoreconf -vfi
- ./configure CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++-posix --host i686-w64-mingw32 --disable-python
- touch doc/org-stamp
- make
artifacts:
when: on_failure
paths:
- tests/*/*.log
- ./*.log
mingw-static:
stage: build
only:
- branches
except:
- /wip/
image: registry.lrde.epita.fr/spot-debuild
script:
- mkdir install_dir
- autoreconf -vfi
- ./configure CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++-posix --host i686-w64-mingw32 --disable-python --disable-shared --enable-optimizations --disable-devel LDFLAGS='-static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -Wl,-lwinpthread -Wl,--no-whole-archive' --prefix=/usr
- touch doc/org-stamp
- make
- make install-exec DESTDIR=$PWD/install_dir
- VERSION=`autoconf --trace='AC_INIT:$2'`
- cd install_dir
- i686-w64-mingw32-strip usr/bin/*
- tar cfvz ../spot-${VERSION}-${CI_COMMIT_REF_SLUG}-bin.tar.gz *
artifacts:
when: always
paths:
- tests/*/*.log
- ./*.log
- ./*.tar.gz
debpkg-stable:
stage: build
only:
- /-deb$/
- master
- next
- stable
script:
- docker pull registry.lrde.epita.fr/spot-debuild:stable
- docker pull registry.lrde.epita.fr/spot-debuild-i386:stable
- vol=spot-stable-$CI_COMMIT_SHA
- docker volume create $vol
- exitcode=0
- docker run --rm=true -v $vol:/build/result registry.lrde.epita.fr/spot-debuild:stable ./build-spot.sh $CI_COMMIT_REF_NAME -j${NBPROC-1} || exitcode=$?
- docker run --rm=true -v $vol:/build/result registry.lrde.epita.fr/spot-debuild-i386:stable ./bin-spot.sh -j${NBPROC-1} || exitcode=$?
- docker run -v $vol:/build/result --name helper-$vol registry.lrde.epita.fr/spot-debuild:stable true || exitcode=$?
- docker cp helper-$vol:/build/result _build_stable || exitcode=$?
- docker rm helper-$vol || exitcode=$?
- docker volume rm $vol || exitcode=$?
- ls -l _build_stable
- exit $exitcode
artifacts:
when: always
paths:
- _build_stable/
debpkg-unstable:
stage: build
only:
- /-deb$/
- next
script:
- docker pull registry.lrde.epita.fr/spot-debuild
- docker pull registry.lrde.epita.fr/spot-debuild-i386
- vol=spot-unstable-$CI_COMMIT_SHA
- docker volume create $vol
- exitcode=0
- docker run --rm=true -v $vol:/build/result registry.lrde.epita.fr/spot-debuild ./build-spot.sh $CI_COMMIT_REF_NAME -j${NBPROC-1} || exitcode=$?
- docker run --rm=true -v $vol:/build/result registry.lrde.epita.fr/spot-debuild-i386 ./bin-spot.sh -j${NBPROC-1} || exitcode=$?
- docker run -v $vol:/build/result --name helper-$vol registry.lrde.epita.fr/spot-debuild true || exitcode=$?
- docker cp helper-$vol:/build/result _build_unstable || exitcode=$?
- docker rm helper-$vol || exitcode=$?
- docker volume rm $vol || exitcode=$?
- ls -l _build_unstable
- exit $exitcode
artifacts:
when: always
paths:
- _build_unstable/
rpm-pkg:
stage: build
only:
- /-rpm$/
- master
- next
- stable
image: registry.lrde.epita.fr/spot-rpm
script:
- autoreconf -vfi
- ./configure
- make
- make dist
- cp spot-*.tar.gz ~/rpmbuild/SOURCES/
- cp spot.spec ~/rpmbuild/SPECS/
- rpmbuild -bb ~/rpmbuild/SPECS/spot.spec
- mv ~/rpmbuild/RPMS/x86_64/*.rpm .
artifacts:
when: always
paths:
- ./*.rpm
publish-rpm:
stage: publish
only:
- /-rpm$/
- next
- stable
tags:
- dput
dependencies:
- rpm-pkg
script:
- case $CI_COMMIT_REF_NAME in stable) rput fedora stable *.rpm;; next) rput fedora unstable *.rpm;; esac
publish-stable:
only:
- stable
tags:
- dput
stage: publish
dependencies:
- debpkg-stable
script:
- cd _build_stable
- ls -l
- dput lrde *.changes
- tgz=`ls spot-*.tar.* | head -n 1`
- case $tgz in *[0-9].tar.*) scp $tgz doc@perso:/var/www/dload/spot/;; esac
- curl -X POST -F ref=master -F token=$TRIGGER_SPOT_WEB -F "variables[spot_branch]=stable" https://gitlab.lrde.epita.fr/api/v4/projects/131/trigger/pipeline
publish-unstable:
only:
- next
tags:
- dput
stage: publish
dependencies:
- debpkg-unstable
script:
- cd _build_unstable
- ls -l
- dput lrde *.changes
- curl -X POST -F ref=master -F token=$TRIGGER_SPOT_WEB -F "variables[spot_branch]=next" https://gitlab.lrde.epita.fr/api/v4/projects/131/trigger/pipeline
- curl -X POST -F ref=master -F token=$TRIGGER_SANDBOX https://gitlab.lrde.epita.fr/api/v4/projects/181/trigger/pipeline
raspbian:
stage: build
only:
- branches
except:
- /wip/
tags:
- armv7
script:
- autoreconf -vfi
- ./configure
- make
- make distcheck || { chmod -R u+w ./spot-*; false; }
artifacts:
when: always
paths:
- ./spot-*/_build/sub/tests/*/*.log
- ./*.log
- ./*.tar.gz