[gtkmm] CI: Add .gitlab-ci.yml
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] CI: Add .gitlab-ci.yml
- Date: Sun, 29 Aug 2021 09:12:27 +0000 (UTC)
commit adeb50c3c8902d7e9cb9ae576cfd564242672b0e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sun Aug 29 11:07:44 2021 +0200
CI: Add .gitlab-ci.yml
Fixes #101
.gitlab-ci.yml | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 183 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..7de0949c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,183 @@
+image: ubuntu:devel
+
+stages:
+ - deps
+ - build
+ - deploy
+
+variables:
+ MESON_GCC_DEPS: g++
+ gettext
+ git
+ yelp-tools
+ gtk-doc-tools
+ python3-pygments
+ python3-setuptools
+ libglib2.0-dev
+ libcairo2-dev
+ libpango1.0-dev
+ libgtk-4-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/
+ - glibmm/
+ - cairomm/
+ - pangomm/
+ policy: push
+
+build_deps:
+ extends: .build_default
+ stage: deps
+ variables:
+ DEPENDENCIES: $MESON_GCC_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
+ - meson install
+ - cd ../..
+ - fi
+ # Build glibmm-2.68
+ - if test ! -d glibmm; then
+ - git clone --branch 2.68.1 --depth 1 https://gitlab.gnome.org/GNOME/glibmm.git glibmm
+ - cd glibmm
+ - mkdir _build && cd _build
+ - meson --prefix=/usr --libdir=lib -Dwarnings=fatal -Dbuild-examples=false -Dbuildtype=release
+ - meson compile
+ - meson install
+ - cd ../..
+ - fi
+ # Build cairomm-1.16
+ - if test ! -d cairomm; then
+ - git clone --branch 1.16.1 --depth 1 https://gitlab.freedesktop.org/cairo/cairomm.git cairomm
+ - cd cairomm
+ - mkdir _build && cd _build
+ - meson --prefix=/usr --libdir=lib -Dwarnings=fatal -Dbuild-examples=false -Dbuild-tests=false
-Dbuildtype=release
+ - meson compile
+ - meson install
+ - cd ../..
+ - fi
+ # Build pangomm-2.48
+ - if test ! -d pangomm; then
+ - git clone --branch 2.49.1 --depth 1 https://gitlab.gnome.org/GNOME/pangomm.git pangomm
+ - cd pangomm
+ - mkdir _build && cd _build
+ - meson --prefix=/usr --libdir=lib -Dwarnings=fatal -Dbuildtype=release
+ - meson compile
+ - cd ../..
+ - fi
+ cache:
+ key: build-deps
+ paths:
+ - libsigc/
+ - glibmm/
+ - cairomm/
+ - pangomm/
+ policy: pull-push
+
+release_gcc_build:
+ extends: .build_default
+ stage: build
+ variables:
+ DEPENDENCIES: $MESON_GCC_DEPS
+ script:
+ - ninja -C libsigc/_build install
+ - ninja -C glibmm/_build install
+ - ninja -C cairomm/_build install
+ - ninja -C pangomm/_build install
+ - mkdir _build && cd _build
+ # -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release
+ - meson --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal
+ - meson compile
+ # Some tests fail with
+ # Unable to init Broadway server: Could not connect: No such file or directory
+ # Gtk-WARNING **: 14:38:45.180: cannot open display:
+ # Skip tests. Most test cases are not executed anyway, only built by 'meson compile'.
+ # - meson test
+ - meson install
+ cache:
+ key: build-deps
+ paths:
+ - libsigc/
+ - glibmm/
+ - cairomm/
+ - pangomm/
+ policy: pull
+ artifacts:
+ when: always
+ paths:
+ - _build/docs/reference
+ - _build/meson-logs/testlog.txt
+ - _build/meson-logs/meson-log.txt
+
+release_clang_build:
+ extends: .build_default
+ stage: build
+ variables:
+ DEPENDENCIES: $MESON_GCC_DEPS clang
+ script:
+ - ninja -C libsigc/_build install
+ - ninja -C glibmm/_build install
+ - ninja -C cairomm/_build install
+ - ninja -C pangomm/_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
+ # See comment in the release_gcc_build job.
+ # - meson test
+ - meson install
+ allow_failure: true
+ cache:
+ key: build-deps
+ paths:
+ - libsigc/
+ - glibmm/
+ - cairomm/
+ - pangomm/
+ 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/gtkmm
+pages:
+ stage: deploy
+ needs: [release_gcc_build]
+ script:
+ - mkdir public
+ - mv _build/docs/reference/html/* public
+ artifacts:
+ paths:
+ - public
+ only:
+ refs:
+ - master
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]