summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-05-22 20:24:49 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2023-04-18 16:00:02 +0200
commit357549fdb6d72329aa7a23a580ec1b9313a36963 (patch)
treef5de5497ddf1b68a2a1f43f2ddfa0f866a0bc780
parent6bc040e6532c02a66ae5652f29fec8e71e733c05 (diff)
downloadvala-357549fdb6d72329aa7a23a580ec1b9313a36963.tar.gz
ci: Add .gitlab-ci.yml
Perform build tests for fedora-gcc-x86_64 and ubuntu-clang-x86_64 and deploy coverage reports and API documentation for master branch.
-rw-r--r--.gitlab-ci.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..f32274d6b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,59 @@
+stages:
+ - build
+ - deploy
+
+fedora-gcc-x86_64:
+ stage: build
+ image: fedora:latest
+ except:
+ - tags
+ before_script:
+ - dnf update -y
+ - dnf install -y autoconf autoconf-archive automake bison dbus-x11 diffutils flex gcc git glib2-devel graphviz-devel lcov libxslt make vala
+ script:
+ - git fetch --tags
+ - ./autogen.sh --prefix=$HOME/vala-installed --enable-coverage
+ - make -j4
+ - make install
+ - make -j4 coverage-report VERBOSE=1
+ - make -C doc internal-api-docs
+ coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
+ artifacts:
+ name: "vala-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ paths:
+ - "coverage"
+ - "doc/internal-apis"
+ expire_in: 2 days
+
+ubuntu-clang-x86_64:
+ stage: build
+ image: ubuntu:devel
+ except:
+ - tags
+ variables:
+ CC: clang
+ DEBIAN_FRONTEND: noninteractive
+ before_script:
+ - apt update
+ - apt install -y automake autoconf-archive libtool bison dbus flex clang git libglib2.0-dev libgraphviz-dev libgirepository1.0-dev lcov xsltproc make valac
+ script:
+ - git fetch --tags
+ - ./autogen.sh
+ - make -j4
+ - make -j4 bootstrap
+ - make -j4 check VERBOSE=1
+
+pages:
+ stage: deploy
+ only:
+ - master
+ script:
+ - mkdir public
+ - mv coverage public/.
+ - mv doc/internal-apis public/docs
+ - echo "<html><body><h1>Vala</h1><ul><li><a href="docs/index.html">Documentation</a></li><li><a href="coverage/index.html">Coverage</a></li></ul></body></html>" > public/index.html
+ artifacts:
+ name: "vala-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ paths:
+ - public
+ expire_in: 2 days