Commit 32fd413c authored by Philip Withnall's avatar Philip Withnall

ci: Add GitLab CI support

Including building, testing, code coverage reporting and documentation
uploads to GitLab pages. The documentation and code coverage reports
will appear at:

https://pwithnall.pages.gitlab.gnome.org/libglib-testing/docs/
https://pwithnall.pages.gitlab.gnome.org/libglib-testing/coverage/Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent 94f46452
Pipeline #11852 passed with stages
in 5 minutes and 22 seconds
image: debian:unstable
before_script:
- apt update -qq
- apt install -y -qq build-essential meson pkg-config gtk-doc-tools
libxml2-utils gobject-introspection dbus
libgirepository1.0-dev libglib2.0-dev
lcov
- export LANG=C.UTF-8
stages:
- build
- test
- deploy
build-job:
stage: build
script:
- meson --prefix /usr --libdir /usr/lib64 --buildtype debug --werror _build .
- ninja -C _build
except:
- tags
artifacts:
when: on_failure
name: "libglib-testing-_${CI_COMMIT_REF_NAME}"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
test:
stage: test
script:
- meson _build . -Db_coverage=true
- ninja -C _build test
- ninja -C _build coverage
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
# FIXME: Run gtkdoc-check when we can. See:
# https://github.com/mesonbuild/meson/issues/3580
dist-job:
stage: build
only:
- tags
script:
- meson --prefix /usr --libdir /usr/lib64 --buildtype release _build .
- ninja -C _build dist
artifacts:
paths:
- "${CI_PROJECT_DIR}/_build/meson-dist/libglib-testing-*.tar.xz"
pages:
stage: deploy
only:
- master
script:
- meson -Db_coverage=true -Ddocumentation=true _build .
- ninja -C _build test libglib-testing-doc
- ninja -C _build coverage
- mkdir -p public/
- mv _build/libglib-testing/docs/html/ public/docs/
- mv _build/meson-logs/coveragereport/ public/coverage/
artifacts:
paths:
- public
\ No newline at end of file
......@@ -19,6 +19,14 @@ Dependencies
• glib-2.0 ≥ 2.54
• gobject-2.0 ≥ 2.54
Development
===========
Development documentation and code coverage reports are available here:
https://pwithnall.pages.gitlab.gnome.org/libglib-testing/docs/
https://pwithnall.pages.gitlab.gnome.org/libglib-testing/coverage/
Licensing
=========
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment