From 7b42055a20fead98a8c851fc33ade44d46621875 Mon Sep 17 00:00:00 2001 From: Chris Lee <@klee93> Date: Mon, 28 Jun 2021 01:25:46 +0200 Subject: [PATCH] add ci pipeline --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5a6e6af --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +stages: + - build + - test + - release + +variables: + DEBIAN_FRONTEND: 'noninteractive' + +job-build: + stage: build + image: ubuntu:rolling + script: + - sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list + - apt-get update + - apt-get build-dep -y tint2 + - apt-get install -y libgtk-3-dev git + - git clone https://gitlab.com/o9000/tint2.git src + - cd src; git reset --hard $CI_COMMIT_SHA + - cmake src + - make -j + +job-release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG =~ /^v.*/ + script: + - echo 'running release_job' + release: + name: 'Release $CI_COMMIT_TAG' + description: 'Release $CI_COMMIT_TAG / $CI_COMMIT_SHA' + tag_name: '$CI_COMMIT_TAG' + ref: '$CI_COMMIT_SHA'