[vala/wip/ci: 11/17] ci: Add .gitlab-ci.yml



commit 71291d3a745bb32250d508f63457d2f241e2bb89
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue May 22 20:24:49 2018 +0200

    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.

 .gitlab-ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..0956cf84e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,58 @@
+stages:
+  - build
+  - deploy
+
+fedora-gcc-x86_64:
+  stage: build
+  image: fedora:latest
+  except:
+    - tags
+  before_script:
+    - 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
+    - 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
+
+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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]