summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJason Yavorska <jyavorska@protonmail.com>2020-05-14 10:24:53 +0200
committerSimon Steinbeiß <ochosi@xfce.org>2020-05-14 10:24:53 +0200
commit46f6042649d5b83da986f4680949bc5ada0b69e7 (patch)
tree0a01947664b628c21c097c96937a178eddb325b0 /ci
parentf9318560bf6d89eeab71cb58a6a99c3a4a1c0741 (diff)
downloadxfce4-dev-tools-46f6042649d5b83da986f4680949bc5ada0b69e7.tar.gz
Check BEFORE_SHA along with changes to .po files
Diffstat (limited to 'ci')
-rw-r--r--ci/build_project.yml57
1 files changed, 35 insertions, 22 deletions
diff --git a/ci/build_project.yml b/ci/build_project.yml
index 582e9e1..bfccb06 100644
--- a/ci/build_project.yml
+++ b/ci/build_project.yml
@@ -1,27 +1,53 @@
image: xfce/xfce-build:latest
-
+
+# Set overall pipeline rules to avoid duplicated pipelines
+# https://docs.gitlab.com/ee/ci/yaml/index.html#exclude-jobs-with-rules-from-certain-pipelines
+workflow:
+ rules:
+ - if: $CI_COMMIT_TAG
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ - if: $CI_MERGE_REQUEST_IID
+
stages:
- build
- distcheck
+translations:
+ extends: .translation
+ stage: build
+ script:
+ # Could validate translations, but for now just pass
+ - "true"
+
build:
+ extends: .make
stage: build
script:
- - ./autogen.sh
- make
+
+distcheck:
+ extends: .make
+ stage: distcheck
+ script:
+ - make distcheck
+
+.make:
+ before_script:
+ - ./autogen.sh
rules:
- # If there are changes to .po, never run
- - changes:
+ # If there are changes to .po, never run. We also check
+ # BEFORE_SHA to see if it is zeros, in which case we are
+ # running on a manual trigger or scheduled pipeline. In
+ # that case, changes resolves to true so we need to check
+ # both.
+ - if: '$CI_COMMIT_BEFORE_SHA != "0000000000000000000000000000000000000000"'
+ changes:
- "po/*.po"
when: never
# Otherwise, always run
- when: always
-translations:
- stage: build
- script:
- # Could validate translations, but for now just pass
- - "true"
+.translation:
rules:
# If there are changes to .po, run this job
- changes:
@@ -29,16 +55,3 @@ translations:
when: always
# Otherwise, never run
- when: never
-
-distcheck:
- stage: distcheck
- script:
- - ./autogen.sh
- - make distcheck
- rules:
- # If there are changes to .po, never run
- - changes:
- - "po/*.po"
- when: never
- # Otherwise, always run
- - when: always