summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@src.gnome.org>2018-06-09 08:14:21 +0200
committerDaiki Ueno <ueno@unixuser.org>2018-06-14 15:59:21 +0000
commitba681e194322f3abf6ca64b944f84912dd1fefd1 (patch)
treee00174f5b07d084e1a30404dfc54dad44cf2f32b /.gitlab-ci.yml
parentfed327a47b4cb04e4ecd0f05891683bc205ba9fc (diff)
downloadgcr-ba681e194322f3abf6ca64b944f84912dd1fefd1.tar.gz
build: Enable gitlab-ciwip/dueno/gitlab-ci
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml90
1 files changed, 90 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..2945464
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,90 @@
+stages:
+ - build
+ - deploy
+
+variables:
+ DEPENDENCIES: dbus-x11 gcc gtk-doc make openssh python redhat-rpm-config
+
+fedora:Werror:
+ image: fedora:rawhide
+ stage: build
+ before_script:
+ - dnf install -y 'dnf-command(builddep)'
+ - dnf builddep -y gcr
+ - dnf install -y $DEPENDENCIES
+ - dbus-uuidgen --ensure
+ script:
+ - ./autogen.sh --disable-dependency-tracking --enable-gtk-doc --enable-strict CFLAGS="-Wno-error=deprecated-declarations"
+ - make -j$(nproc) V=1
+ - eval `dbus-launch --sh-syntax`
+ - make -j$(nproc) V=1 distcheck
+ artifacts:
+ when: on_failure
+ paths:
+ - test-suite.log
+ - gcr-*/_build/sub/test-suite.log
+
+fedora:asan:
+ image: fedora:rawhide
+ stage: build
+ before_script:
+ - dnf install -y 'dnf-command(builddep)'
+ - dnf builddep -y gcr
+ - dnf install -y $DEPENDENCIES libasan
+ - dbus-uuidgen --ensure
+ script:
+ - ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lasan -ldl -lpthread'
+ - make -j$(nproc) V=1
+ - eval `dbus-launch --sh-syntax`
+ - make -j$(nproc) V=1 DISABLE_HARD_ERRORS=1 XFAIL_TESTS="\$(JS_TESTS) \$(PY_TESTS)" check
+ artifacts:
+ when: on_failure
+ paths:
+ - test-suite.log
+
+fedora:ubsan:
+ image: fedora:rawhide
+ stage: build
+ before_script:
+ - dnf install -y 'dnf-command(builddep)'
+ - dnf builddep -y gcr
+ - dnf install -y $DEPENDENCIES libubsan
+ - dbus-uuidgen --ensure
+ script:
+ - ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lubsan -ldl -lpthread'
+ - make -j$(nproc) V=1
+ - eval `dbus-launch --sh-syntax`
+ - make -j$(nproc) V=1 check
+ artifacts:
+ when: on_failure
+ paths:
+ - test-suite.log
+
+fedora:coverage:
+ image: fedora:rawhide
+ stage: build
+ before_script:
+ - dnf install -y 'dnf-command(builddep)'
+ - dnf builddep -y gcr
+ - dnf install -y $DEPENDENCIES lcov
+ - dbus-uuidgen --ensure
+ script:
+ - ./autogen.sh --disable-dependency-tracking --enable-coverage
+ - make -j$(nproc) V=1
+ - eval `dbus-launch --sh-syntax`
+ - make -j$(nproc) V=1 check
+ - make coverage
+ coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
+ artifacts:
+ name: "gcr-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ paths:
+ - build/coverage/
+
+pages:
+ stage: deploy
+ script:
+ - mkdir -p public
+ - mv build/coverage public/coverage
+ artifacts:
+ paths:
+ - public