Merge branch 'xMAC94x/fix_test_not_running_in_merge_train' into 'master'

xMAC94x/fix test not running in merge train

See merge request veloren/veloren!2524
This commit is contained in:
Marcel 2021-07-09 18:15:19 +00:00
commit 6d63461222
5 changed files with 12 additions and 27 deletions

View File

@ -46,6 +46,7 @@ workflow:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $GITLAB_USER_ID != "8866215"
- if: $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ && $GITLAB_USER_ID != "8866215"
include:
- local: .gitlab/CI/recompile.yml

View File

@ -15,7 +15,7 @@ unittests:
max: 2
benchmarks:
extends: .post-merge
extends: .release
stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/bench:${CACHE_IMAGE_TAG}
tags:
@ -43,7 +43,7 @@ benchmarks:
# Coverage is needed on master for the README.md badge to work
# tmp remove simd as it doesnt work with tarpaulin: https://github.com/rust-lang/rust/issues/77529
coverage:
extends: .post-merge
extends: .release
stage: build
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/tarpaulin:${CACHE_IMAGE_TAG}
script:

View File

@ -10,7 +10,7 @@
.publish-nightly:
stage: publish
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
when: always
- when: never

View File

@ -1,36 +1,20 @@
# Template to only run if actual changes has been made to the code and not just documentation
.recompile-branch:
rules:
- if: $CI_COMMIT_REF_NAME !~ /^master$/
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# No '-' here is *very* important: https://docs.gitlab.com/ee/ci/yaml/#complex-rule-clauses
changes:
- "**/*.{glsl,rs,ron,toml,vox,png}"
- "**/*.{glsl,png,rs,ron,toml,vox,yml,wav}"
- "rust-toolchain"
- "Cargo.lock"
- ".gitlab-ci.yml"
- "**/*.yml"
# TODO: appears unused
# like .recompile-branch but will run on master too
.recompile:
rules:
- changes:
- "**/*.{glsl,rs,ron,toml,vox,png,wav}"
- "**/*.{glsl,png,rs,ron,toml,vox,yml,wav}"
- "rust-toolchain"
- "Cargo.lock"
- ".gitlab-ci.yml"
- "**/*.yml"
# Template to only run these after a branch has merged to master
.post-merge:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_REF_NAME =~ /^master$/
changes:
- "**/*.{glsl,rs,ron,toml,vox,png}"
- "rust-toolchain"
- "Cargo.lock"
- ".gitlab-ci.yml"
- "**/*.yml"
- ".gitlab-ci.yml"

View File

@ -2,16 +2,16 @@
.optional-release:
stage: check
rules:
- if: $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ || $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE != "merge_request_event" || $CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/
when: never
- when: manual
allow_failure: true
# Template to only run if pushes to master or a tag happened
# Template to only run if pushes to master, a version tag, or release branch happened
.release:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE != "schedule" && ($CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
- if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_PIPELINE_SOURCE != "schedule" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
when: always
- when: never
@ -19,6 +19,6 @@
.release-nightly-tmp-fix-airshipper:
stage: build-nightly
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
- if: $CI_PIPELINE_SOURCE == "schedule" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
when: always
- when: never