# Currently we track two versions of gcc: gcc-10 and gcc-11. image: debian:testing stages: - deps - build - deploy variables: MESON_DEPS: g++ gettext git yelp-tools gtk-doc-tools python3-pygments python3-setuptools libglib2.0-dev mm-common libxml-libxml-perl meson ninja-build glib-networking GIO_EXTRA_MODULES: "/usr/lib/x86_64-linux-gnu/gio/modules" GIT_SUBMODULE_STRATEGY: normal .build_default: before_script: - export DEBIAN_FRONTEND=noninteractive - apt update && apt -y upgrade && apt -y install $DEPENDENCIES # Clear the cache manually. clear_cache: stage: deps when: manual script: - echo Clearing the build-deps cache cache: key: build-deps paths: - libsigc/ policy: push build_deps: extends: .build_default stage: deps variables: DEPENDENCIES: $MESON_DEPS script: # Build and cache dependencies that can't be installed with apt. # Build libsigc++3 - if test ! -d libsigc; then - git clone --branch 3.0.7 --depth 1 https://github.com/libsigcplusplus/libsigcplusplus.git libsigc - cd libsigc - mkdir _build && cd _build - meson --prefix=/usr --libdir=lib -Dwarnings=fatal -Dbuild-examples=false -Dbuildtype=release - meson compile - cd ../.. - fi cache: key: build-deps paths: - libsigc/ policy: pull-push autotools_build: extends: .build_default stage: build variables: DEPENDENCIES: $MESON_DEPS make autoconf script: - ninja -C libsigc/_build install - ./autogen.sh --enable-warnings=fatal --prefix=/usr - make - make check - make install cache: key: build-deps paths: - libsigc/ policy: pull allow_failure: true debug_build: extends: .build_default stage: build variables: DEPENDENCIES: $MESON_DEPS script: - ninja -C libsigc/_build install - mkdir _build && cd _build # -Ddebug=true + -Doptimization=0 correspond to -Dbuildtype=debug - meson --prefix=/usr --libdir=lib -Ddebug=true -Doptimization=0 -Dwarnings=fatal - meson compile - meson test - meson install cache: key: build-deps paths: - libsigc/ policy: pull artifacts: when: on_failure paths: - _build/meson-logs/testlog.txt - _build/meson-logs/meson-log.txt expire_in: 1 week release_gcc_10_build: extends: .build_default stage: build variables: DEPENDENCIES: $MESON_DEPS g++-10 script: - ninja -C libsigc/_build install - mkdir _build && cd _build # -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release - CC=gcc-10 CXX=g++-10 meson --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal - meson compile - meson test - meson install cache: key: build-deps paths: - libsigc/ policy: pull artifacts: when: always paths: - _build/docs/reference release_gcc_11_build: extends: .build_default stage: build variables: DEPENDENCIES: $MESON_DEPS g++-11 script: - ninja -C libsigc/_build install - mkdir _build && cd _build # -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release - CC=gcc-11 CXX=g++-11 meson --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal - meson compile - meson test - meson install allow_failure: true cache: key: build-deps paths: - libsigc/ policy: pull artifacts: when: on_failure paths: - _build/meson-logs/testlog.txt - _build/meson-logs/meson-log.txt expire_in: 1 week release_clang_build: extends: .build_default stage: build variables: DEPENDENCIES: $MESON_DEPS clang script: - ninja -C libsigc/_build install - mkdir _build && cd _build # -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release - CC=clang CXX=clang++ meson --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal - meson compile - meson test - meson install allow_failure: true cache: key: build-deps paths: - libsigc/ policy: pull artifacts: when: on_failure paths: - _build/meson-logs/testlog.txt - _build/meson-logs/meson-log.txt expire_in: 1 week # Publish reference documentation at gnome.pages.gitlab.gnome.org/glibmm pages: stage: deploy needs: [release_gcc_10_build] script: - mkdir public - mv _build/docs/reference/html/* public artifacts: paths: - public only: refs: - master