From 88cdc850af658094f9e895c25e7977095ae39b1b Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Sun, 5 Jan 2020 14:21:51 +0100 Subject: [PATCH] Add CI --- .gitignore | 2 + .gitlab-ci.yml | 129 ++++++++++++++++++++++++++++++++++++++++ meson.build | 2 +- subprojects/girara.wrap | 4 ++ 4 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100644 subprojects/girara.wrap diff --git a/.gitignore b/.gitignore index fbdc92c..5a2e88c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.pc *.sw[a-z] *.pyc +tags # generated files resources.* @@ -24,6 +25,7 @@ zathura-*.tar.gz .tx build/ gcov/ +subprojects/girara # development files .clang_complete diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..232d76a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,129 @@ +stages: + - build + - test + +# Cache +cache: + key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + paths: + - subprojects/girara + +# Archlinux +build:archlinux: + tags: + - pwmt + stage: build + image: registry.pwmt.org/pwmt/gitlab-runner-images/archlinux:latest + script: + - mkdir -p build && cd build + - meson .. + - ninja + artifacts: + expire_in: 1 day + paths: + - build + except: + - tags + +test:archlinux: + tags: + - pwmt + stage: test + image: registry.pwmt.org/pwmt/gitlab-runner-images/archlinux:latest + script: + - cd build + - ninja test + dependencies: + - build:archlinux + except: + - tags + +# Debian 10 (Buster) +build:debian-buster: + tags: + - pwmt + stage: build + image: registry.pwmt.org/pwmt/gitlab-runner-images/debian:buster + script: + - mkdir -p build && cd build + - meson .. + - ninja + artifacts: + expire_in: 1 day + paths: + - build + except: + - tags + +test:debian-buster: + tags: + - pwmt + stage: test + image: registry.pwmt.org/pwmt/gitlab-runner-images/debian:buster + script: + - cd build + - ninja test + dependencies: + - build:debian-buster + except: + - tags + +# Ubuntu 18.04 LTS (Bionic Beaver) +build:ubuntu-bionic: + tags: + - pwmt + stage: build + image: registry.pwmt.org/pwmt/gitlab-runner-images/ubuntu:bionic + script: + - mkdir -p build && cd build + - meson .. + - ninja + artifacts: + expire_in: 1 day + paths: + - build + except: + - tags + +test:ubuntu-bionic: + tags: + - pwmt + stage: test + image: registry.pwmt.org/pwmt/gitlab-runner-images/ubuntu:bionic + script: + - cd build + - ninja test + dependencies: + - build:ubuntu-bionic + except: + - tags + +# Ubuntu 19.10 (Eoan Ermine) +build:ubuntu-eoan: + tags: + - pwmt + stage: build + image: registry.pwmt.org/pwmt/gitlab-runner-images/ubuntu:eoan + script: + - mkdir -p build && cd build + - meson .. + - ninja + artifacts: + expire_in: 1 day + paths: + - build + except: + - tags + +test:ubuntu-eoan: + tags: + - pwmt + stage: test + image: registry.pwmt.org/pwmt/gitlab-runner-images/ubuntu:eoan + script: + - cd build + - ninja test + dependencies: + - build:ubuntu-eoan + except: + - tags diff --git a/meson.build b/meson.build index 63a0496..203a596 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ plugindir = join_paths(get_option('libdir'), 'zathura') # required dependencies libm = cc.find_library('m', required: false) -girara = dependency('girara-gtk3', version: '>=0.3.3') +girara = dependency('girara-gtk3', version: '>=0.3.3', fallback: ['girara', 'girara_dependency']) glib = dependency('glib-2.0', version: '>=2.50') gio = dependency('gio-unix-2.0', required: host_machine.system() != 'windows') gthread = dependency('gthread-2.0', version: '>=2.50') diff --git a/subprojects/girara.wrap b/subprojects/girara.wrap new file mode 100644 index 0000000..ebed93a --- /dev/null +++ b/subprojects/girara.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=girara +url=https://git.pwmt.org/pwmt/girara.git +revision=develop