Moved coverage and benchmarks to only run post-merge.

This commit is contained in:
Sam 2021-04-17 18:49:11 -04:00
parent cadf315096
commit 48158a98c5
2 changed files with 16 additions and 2 deletions

View File

@ -13,7 +13,7 @@ unittests:
max: 2 max: 2
benchmarks: benchmarks:
extends: .recompile-branch extends: .post-merge
stage: build stage: build
tags: tags:
- veloren-benchmark - veloren-benchmark
@ -38,7 +38,7 @@ benchmarks:
# Coverage is needed on master for the README.md badge to work # 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 # tmp remove simd as it doesnt work with tarpaulin: https://github.com/rust-lang/rust/issues/77529
coverage: coverage:
extends: .recompile extends: .post-merge
stage: build stage: build
script: script:
- ln -s /dockercache/cache-tarpaulin target - ln -s /dockercache/cache-tarpaulin target

View File

@ -23,3 +23,17 @@
- "Cargo.lock" - "Cargo.lock"
- ".gitlab-ci.yml" - ".gitlab-ci.yml"
- "**/*.yml" - "**/*.yml"
# Template to only run these after a branch has merged to master
.post-merge:
stage: build
tags:
- veloren-docker
rules:
- if: $CI_COMMIT_REF_NAME =~ /^master$/
changes:
- "**/*.{glsl,rs,ron,toml,vox,png}"
- "rust-toolchain"
- "Cargo.lock"
- ".gitlab-ci.yml"
- "**/*.yml"