summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-12 10:12:42 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-12 10:12:42 +0100
commita600d69e45cce015bded9da5f61142da27cf3400 (patch)
tree69c4c8ee3396858f7979d906fa54df18f013f786
parent86ad561f71f12dbb54aca1eeaac06aca496502cf (diff)
CI: Install all dependencies with apt, meson -> meson setup
Ubuntu 22.10 contains libsigc++-3.0-dev.
-rw-r--r--.gitlab-ci.yml44
1 files changed, 4 insertions, 40 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cd96e55..45e686c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,8 @@
-# 2022-05-19: ubuntu:latest = 22.04, ubuntu:rolling = 22.04, ubuntu:devel = 22.10
+# 2023-01-09: ubuntu:latest = 22.04, ubuntu:rolling = 22.10, ubuntu:devel = 23.04
# See https://hub.docker.com/_/ubuntu
image: ubuntu:rolling
stages:
- - deps
- build
- deploy
@@ -16,59 +15,25 @@ variables:
python3-setuptools
libcairo2-dev
mm-common
+ libsigc++-3.0-dev
meson
ninja-build
GIT_SUBMODULE_STRATEGY: normal
-# In glibmm a cache is used for saving libsigc/ from the build_deps job.
-# That's not possible in cairomm.
-# It looks like a cache can be used only locally within a job.
-# Result in the build_sigc job:
-# No URL provided, cache will be not uploaded to shared cache server.
-# Cache will be stored only locally.
-# Result in subsequent jobs that try to download the cached files:
-# ninja: fatal: chdir to 'libsigc/_build' - No such file or directory
-
.build_default:
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt update && apt -y upgrade && apt -y install $DEPENDENCIES
-build_deps:
- extends: .build_default
- stage: deps
- variables:
- DEPENDENCIES: $MESON_GCC_DEPS docbook5-xml docbook-xsl
-
- script:
- # Build dependencies that can't be installed with apt.
- # Install to ./installdir, with the contents of the installed files
- # (notably .pc files) suited for installation to /usr.
- - export DESTDIR=`pwd`/installdir
- # Build libsigc++3
- - git clone --branch 3.2.0 --depth 1 https://github.com/libsigcplusplus/libsigcplusplus.git libsigc
- - cd libsigc
- - mkdir _build && cd _build
- - meson --prefix=/usr --libdir=lib -Dvalidation=false -Dbuild-examples=false -Dbuildtype=release
- - meson compile
- - meson install
- # Transfer the installed part of the built dependencies to later stages
- # as artifacts.
- artifacts:
- paths:
- - installdir/
- expire_in: 1 day
-
release_gcc_build:
extends: .build_default
stage: build
variables:
DEPENDENCIES: $MESON_GCC_DEPS
script:
- - cp -r installdir/usr /
- mkdir _build && cd _build
# -Ddebug=false + -Doptimization=3 correspond to -Dbuildtype=release
- - meson --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal -Dwarning_level=3 -Dwerror=true
+ - meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal -Dwarning_level=3 -Dwerror=true
- meson compile
- meson test
- meson install
@@ -83,10 +48,9 @@ release_clang_build:
variables:
DEPENDENCIES: $MESON_GCC_DEPS clang
script:
- - cp -r installdir/usr /
- 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 -Dwarning_level=3 -Dwerror=true
+ - CC=clang CXX=clang++ meson setup --prefix=/usr --libdir=lib -Ddebug=false -Doptimization=3 -Dwarnings=fatal -Dwarning_level=3 -Dwerror=true
- meson compile
- meson test
- meson install