stages: - build - build2 - publish default: before_script: # Our build agent are supposed to define these variables to enable # build parallelization using a number of cores appropriate for # the agent. However we have had cases where they were not # defined, slowing down the builds. This should help us debug # these situations. - echo "MAKEFLAGS='$MAKEFLAGS' NBPROC='$NBPROC'" - cat /sys/fs/cgroup/cpuset.cpus || cat /sys/fs/cgroup/cpuset/cpuset.cpus || true debian-stable-gcc: stage: build only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian:stable script: - autoreconf -vfi - ./configure --enable-max-accsets=256 --enable-pthread - make - make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-max-accsets=256 --enable-pthread' artifacts: when: always paths: - ./spot-*/_build/sub/tests/*/*.log - ./*.log - ./*.tar.gz # We build on Debian unstable because we want an up-to-date Automake. # (See issue #512.) We do not run distcheck here to speedup this build # that several other builds depend upon. Other builds will run distcheck. make-dist: stage: build only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - autoreconf -vfi - ./configure --disable-static --enable-doxygen - make - make dist - autoconf --trace='AC_INIT:$2' > VERSION artifacts: when: always paths: - spot-*/_build/sub/tests/*/*.log - ./*.log - ./*.tar.gz - VERSION debian-unstable-gcc-coverage: stage: build only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - autoreconf -vfi - ./configure CXX='g++ --coverage' --enable-devel --disable-static --enable-doxygen - make - make check - gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml --root $PWD -e 'bin/spot.cc' -e 'bin/spot-x.cc' -e 'spot/bricks/.*' -e 'spot/parse.*/scan.*.cc' -e 'spot/parse.*/parse.*.cc' -e 'utf8/.*' -e 'python/.*' -e 'buddy/.*' -e 'doc/org/tmp/.*' --html-details coverage.html --html-tab-size 8 coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: when: always paths: - tests/*/*.log - ./*.log - doc/spot.html/ - doc/userdoc/ - coverage*.html - coverage*.css - ./*.tar.gz reports: coverage_report: coverage_format: cobertura path: coverage.xml debian-unstable-gcc-pypy: stage: build2 needs: - job: make-dist artifacts: true variables: GIT_STRATEGY: none only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - VERSION=`cat VERSION` - tar xvf spot-$VERSION.tar.gz - cd spot-$VERSION - ./configure PYTHON=/usr/bin/pypy3 --disable-static - make - make check TESTS='$(TESTS_python) $(TESTS_ipython)' artifacts: when: always paths: - spot-*/tests/*/*.log - spot-*/*.log # With emacs now using gcc for on-the-fly compilation, # we cannot rebuild the documentation using gcc-snapshot. So we start # from the tarball instead. debian-gcc-snapshot: stage: build2 needs: - job: make-dist artifacts: true only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - export PATH="/usr/lib/gcc-snapshot/bin:$PATH" LD_LIBRARY_PATH="/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH" - VERSION=`cat VERSION` - tar xvf spot-$VERSION.tar.gz - cd spot-$VERSION - ./configure --with-included-ltdl CXX='g++' - make - make distcheck DISTCHECK_CONFIGURE_FLAGS='--with-included-ltdl' allow_failure: true artifacts: when: always paths: - spot-*/tests/*/*.log - spot-*/*.log alpine-gcc: stage: build only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/alpine script: - autoreconf -vfi - ./configure - make - make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-pthread' || { chmod -R u+w ./spot-*; false; } artifacts: when: always paths: - ./spot-*/_build/sub/tests/*/*.log - ./*.log - ./*.tar.gz arch-clang: stage: build only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/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: build2 needs: - job: make-dist artifacts: true variables: GIT_STRATEGY: none only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/arch script: - VERSION=`cat VERSION` - tar xvf spot-$VERSION.tar.gz - mkdir build-$VERSION - cd build-$VERSION - ../spot-$VERSION/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: - build-*/spot-*/_build/sub/tests/*/*.log - build-*/*.log mingw-shared: stage: build2 needs: # We start from the tarball generated from a non-cross-compiling # job, so that all generated files are included, especially those # built from the executables. - job: make-dist artifacts: true variables: GIT_STRATEGY: none only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - VERSION=`cat VERSION` - tar xvf spot-$VERSION.tar.gz - cd spot-$VERSION - ./configure CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++-posix --host i686-w64-mingw32 --disable-python - make artifacts: when: on_failure paths: - spot-*/tests/*/*.log - spot-*/*.log mingw-static: stage: build2 needs: # We start from the tarball generated from a non-cross-compiling # job, so that all generated files are included, especially those # built from the executables. - job: make-dist artifacts: true variables: GIT_STRATEGY: none only: - branches except: - /wip/ image: gitlab-registry.lre.epita.fr/spot/buildenv/debian script: - VERSION=`cat VERSION` - tar xvf spot-$VERSION.tar.gz - cd spot-$VERSION - mkdir install_dir - ./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 - cd install_dir - i686-w64-mingw32-strip usr/bin/* - tar cfvz ../spot-${VERSION}-${CI_COMMIT_REF_SLUG}-bin.tar.gz * artifacts: when: always paths: - spot-*/tests/*/*.log - spot-*/*.log - spot-*/*.tar.gz debpkg-stable: stage: build variables: GIT_STRATEGY: none only: - /-deb$/ - master - next - stable script: - docker pull gitlab-registry.lre.epita.fr/spot/buildenv/debian:stable - vol=spot-stable-$CI_COMMIT_SHA - docker volume create $vol - exitcode=0 - docker run -v $vol:/build/result --name helper-$vol gitlab-registry.lre.epita.fr/spot/buildenv/debian:stable ./build-spot.sh $CI_COMMIT_REF_NAME -j${NBPROC-1} || 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 expire_in: 1 week paths: - _build_stable/ debpkg-stable-i386: stage: build2 variables: GIT_STRATEGY: none only: - /-deb$/ - master - next - stable tags: ["x86"] needs: ["debpkg-stable"] script: - docker pull gitlab-registry.lre.epita.fr/spot/buildenv/debian-i386:stable - vol=spot-stable-$CI_COMMIT_SHA - docker volume create $vol - exitcode=0 - docker create -v $vol:/build/result --name helper-$vol gitlab-registry.lre.epita.fr/spot/buildenv/debian-i386:stable ./bin-spot.sh -j${NBPROC-1} || exitcode=$? - docker cp _build_stable/. helper-$vol:/build/result || exitcode=$? - rm -rf _build_stable - docker start -a helper-$vol || 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 expire_in: 1 week paths: - _build_stable/ debpkg-unstable: stage: build variables: GIT_STRATEGY: none only: - /-deb$/ - next script: - docker pull gitlab-registry.lre.epita.fr/spot/buildenv/debian - vol=spot-unstable-$CI_COMMIT_SHA - docker volume create $vol - exitcode=0 - docker run -v $vol:/build/result --name helper-$vol gitlab-registry.lre.epita.fr/spot/buildenv/debian ./build-spot.sh $CI_COMMIT_REF_NAME -j${NBPROC-1} || 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 expire_in: 1 week paths: - _build_unstable/ debpkg-unstable-i386: stage: build2 variables: GIT_STRATEGY: none only: - /-deb$/ - next tags: ["x86"] needs: ["debpkg-unstable"] script: - docker pull gitlab-registry.lre.epita.fr/spot/buildenv/debian-i386 - vol=spot-unstable-$CI_COMMIT_SHA - docker volume create $vol - exitcode=0 - docker create -v $vol:/build/result --name helper-$vol gitlab-registry.lre.epita.fr/spot/buildenv/debian-i386 ./bin-spot.sh -j${NBPROC-1} || exitcode=$? - docker cp _build_unstable/. helper-$vol:/build/result || exitcode=$? - rm -rf _build_unstable - docker start -a helper-$vol || 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 expire_in: 1 week paths: - _build_unstable/ rpm-pkg: stage: build only: - /-rpm$/ - master - next - stable image: gitlab-registry.lre.epita.fr/spot/buildenv/fedora 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 . allow_failure: true artifacts: when: always expire_in: 1 week paths: - ./*.rpm publish-rpm: stage: publish variables: GIT_STRATEGY: none 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 - rm -rf ./* publish-stable: only: - stable tags: - dput stage: publish variables: GIT_STRATEGY: none dependencies: - debpkg-stable-i386 - make-dist script: - cd _build_stable - ls -l - dput lrde `ls -t *.changes | head -1` - cd .. - ls -l - tgz=`ls spot-*.tar.* | head -n 1` - case $tgz in *[0-9].tar.*) scp $tgz doc@perso:/var/www/dload/spot/;; esac - rm -rf ./* - curl -X POST -F ref=master -F token=$TRIGGER_SPOT_WEB -F "variables[spot_branch]=stable" https://gitlab.lre.epita.fr/api/v4/projects/131/trigger/pipeline - curl -X POST "https://archive.softwareheritage.org/api/1/origin/save/git/url/https://gitlab.lre.epita.fr/spot/spot/" - curl "https://web.archive.org/save/https://www.lrde.epita.fr/dload/spot/$tgz" publish-unstable: only: - next tags: - dput stage: publish variables: GIT_STRATEGY: none dependencies: - debpkg-unstable-i386 script: - cd _build_unstable - ls -l - dput lrde `ls -t *.changes | head -1` - cd .. - rm -rf _build_unstable - curl -X POST -F ref=master -F token=$TRIGGER_SPOT_WEB -F "variables[spot_branch]=next" https://gitlab.lre.epita.fr/api/v4/projects/131/trigger/pipeline - curl -X POST -F ref=master -F token=$TRIGGER_SANDBOX https://gitlab.lre.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