diff --git a/.gitlab/CI/build.gitlab-ci.yml b/.gitlab/CI/build.gitlab-ci.yml index b922d1bf1f..3a34a10890 100644 --- a/.gitlab/CI/build.gitlab-ci.yml +++ b/.gitlab/CI/build.gitlab-ci.yml @@ -13,7 +13,7 @@ unittests: max: 2 benchmarks: - extends: .recompile-branch + extends: .post-merge stage: build tags: - veloren-benchmark @@ -38,7 +38,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: .recompile + extends: .post-merge stage: build script: - ln -s /dockercache/cache-tarpaulin target diff --git a/.gitlab/CI/recompile.yml b/.gitlab/CI/recompile.yml index 63b8e0ef7a..2f2bdecb82 100644 --- a/.gitlab/CI/recompile.yml +++ b/.gitlab/CI/recompile.yml @@ -23,3 +23,17 @@ - "Cargo.lock" - ".gitlab-ci.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"