diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1b65316..5df6530e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,101 +1,103 @@ image: registry.gitlab.com/libadg/adg:stretch stages: - build - coverage build-autotools-gtk2: stage: build script: - ./autogen.sh + # Using a VPATH build - mkdir build - cd build - ../configure --disable-gtk-doc --disable-introspection --disable-pango --with-gtk=gtk2 --disable-test-framework - make - make check build-autotools: stage: build script: - ./autogen.sh - - mkdir build - - cd build - - ../configure --enable-gcov - --enable-gtk-doc - --enable-introspection - --enable-pango - --with-gtk=gtk3 - --enable-test-framework + # `make distcheck` does not work on VPATH builds because + # it expects NEWS (and possibly other files) in srcdir while + # I am autogenerating them in builddir + - ./configure --enable-gcov + --enable-gtk-doc + --enable-introspection + --enable-pango + --with-gtk=gtk3 + --enable-test-framework - make - make check - make distcheck - - mkdir ../autotools-dist - - for f in *.bz2; do sha256sum -b $f > ../autotools-dist/$f.sha256sum && mv $f ../autotools-dist/; done + - mkdir autotools-dist + - for f in *.bz2; do sha256sum -b $f > autotools-dist/$f.sha256sum && mv $f autotools-dist/; done artifacts: expire_in: 1 day paths: - autotools-dist/ build-meson-gtk2: stage: build script: - meson -D gtk=gtk2 -D gtk-doc=disabled -D introspection=disabled -D pango=disabled -D tests=disabled build - cd build - ninja - ninja test build-meson: stage: build script: - meson -D gtk=gtk3 -D gtk-doc=enabled -D introspection=enabled -D pango=enabled -D tests=enabled build - cd build - ninja - ninja test - ninja dist - mv meson-dist .. artifacts: expire_in: 1 day paths: - meson-dist/ coverage-meson: stage: coverage needs: - build-meson script: # Build from the tarball to validate it - mkdir dist - cd meson-dist - sha256sum -c *.sha256sum - tar xf *.xz --directory ../dist/ --strip-components=1 - cd ../dist - meson -D b_coverage=true -D gtk=gtk3 -D gtk-doc=disabled -D introspection=disabled -D pango=enabled -D tests=enabled build - cd build - ninja test - gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml --root .. coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: expire_in: 1 day name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} reports: cobertura: dist/build/coverage.xml