mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use new multi image cache scheme in the CI and consolidate runner tag specification so that it is easier to modify
This commit is contained in:
parent
23eca4c3f6
commit
1db0e2a15c
@ -13,9 +13,9 @@ variables:
|
|||||||
# ttps://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
|
# ttps://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
|
||||||
GIT_DEPTH: 3
|
GIT_DEPTH: 3
|
||||||
GIT_CLEAN_FLAGS: -f
|
GIT_CLEAN_FLAGS: -f
|
||||||
|
CACHE_IMAGE_TAG: 7ea40612
|
||||||
|
|
||||||
default:
|
default:
|
||||||
image: registry.gitlab.com/veloren/veloren-docker-ci/cache:e134e812
|
|
||||||
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines
|
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines
|
||||||
interruptible: true
|
interruptible: true
|
||||||
# Retry automatically incase the runner times out or there's a runner failure
|
# Retry automatically incase the runner times out or there's a runner failure
|
||||||
@ -24,6 +24,8 @@ default:
|
|||||||
when:
|
when:
|
||||||
- runner_system_failure
|
- runner_system_failure
|
||||||
- stuck_or_timeout_failure
|
- stuck_or_timeout_failure
|
||||||
|
tags:
|
||||||
|
- veloren-wgpu-docker
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- source $HOME/.cargo/env
|
- source $HOME/.cargo/env
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
unittests:
|
unittests:
|
||||||
extends: .recompile-branch
|
extends: .recompile-branch
|
||||||
stage: build
|
stage: build
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
||||||
variables:
|
variables:
|
||||||
GIT_DEPTH: 9999999999999
|
GIT_DEPTH: 9999999999999
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-all target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored
|
- cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored
|
||||||
- rm -r target/debug/incremental* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/debug/incremental* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
@ -15,11 +16,12 @@ unittests:
|
|||||||
benchmarks:
|
benchmarks:
|
||||||
extends: .post-merge
|
extends: .post-merge
|
||||||
stage: build
|
stage: build
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/bench:${CACHE_IMAGE_TAG}
|
||||||
tags:
|
tags:
|
||||||
- veloren-benchmark
|
- veloren-benchmark
|
||||||
script:
|
script:
|
||||||
- unset DISABLE_GIT_LFS_CHECK
|
- unset DISABLE_GIT_LFS_CHECK
|
||||||
- ln -s /dockercache/cache-all target
|
- ln -s /dockercache/target target
|
||||||
- ls -la target/*
|
- ls -la target/*
|
||||||
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
@ -40,8 +42,9 @@ benchmarks:
|
|||||||
coverage:
|
coverage:
|
||||||
extends: .post-merge
|
extends: .post-merge
|
||||||
stage: build
|
stage: build
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/tarpaulin:${CACHE_IMAGE_TAG}
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-tarpaulin target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- find ./* -name "Cargo.toml" -exec sed -i 's/, "simd"]/]/g' {} \;
|
- find ./* -name "Cargo.toml" -exec sed -i 's/, "simd"]/]/g' {} \;
|
||||||
- find ./* -name "Cargo.toml" -exec sed -i 's/"simd"]/]/g' {} \;
|
- find ./* -name "Cargo.toml" -exec sed -i 's/"simd"]/]/g' {} \;
|
||||||
@ -52,8 +55,9 @@ coverage:
|
|||||||
|
|
||||||
#linux, windows, macos builds here as template
|
#linux, windows, macos builds here as template
|
||||||
.tlinux:
|
.tlinux:
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-linux:${CACHE_IMAGE_TAG}
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-release-linux target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- VELOREN_USERDATA_STRATEGY=executable cargo build --release
|
- VELOREN_USERDATA_STRATEGY=executable cargo build --release
|
||||||
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
||||||
@ -67,8 +71,9 @@ coverage:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
.twindows:
|
.twindows:
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-windows:${CACHE_IMAGE_TAG}
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-release-windows target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- VELOREN_USERDATA_STRATEGY=executable cargo build --target=x86_64-pc-windows-gnu --release
|
- VELOREN_USERDATA_STRATEGY=executable cargo build --target=x86_64-pc-windows-gnu --release
|
||||||
- cp -r target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe $CI_PROJECT_DIR
|
- cp -r target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe $CI_PROJECT_DIR
|
||||||
@ -82,10 +87,11 @@ coverage:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
.tmacos:
|
.tmacos:
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-macos:${CACHE_IMAGE_TAG}
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-release-macos target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- VELOREN_USERDATA_STRATEGY=executable WINIT_LINK_COLORSYNC=true PATH="/dockercache/osxcross/target/bin:$PATH" COREAUDIO_SDK_PATH=/dockercache/osxcross/target/SDK/MacOSX10.13.sdk CC=o64-clang CXX=o64-clang++ cargo build --target x86_64-apple-darwin --release
|
- VELOREN_USERDATA_STRATEGY=executable WINIT_LINK_COLORSYNC=true PATH="/osxcross/target/bin:$PATH" COREAUDIO_SDK_PATH=/osxcross/target/SDK/MacOSX10.13.sdk CC=o64-clang CXX=o64-clang++ cargo build --target x86_64-apple-darwin --release
|
||||||
- cp -r target/x86_64-apple-darwin/release/veloren-server-cli $CI_PROJECT_DIR
|
- cp -r target/x86_64-apple-darwin/release/veloren-server-cli $CI_PROJECT_DIR
|
||||||
- cp -r target/x86_64-apple-darwin/release/veloren-voxygen $CI_PROJECT_DIR
|
- cp -r target/x86_64-apple-darwin/release/veloren-voxygen $CI_PROJECT_DIR
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
code-quality:
|
code-quality:
|
||||||
extends: .recompile-branch
|
extends: .recompile-branch
|
||||||
stage: check
|
stage: check
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-all target
|
- ln -s /dockercache/target target
|
||||||
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||||
- cargo clippy --all-targets --locked -- -D warnings
|
- cargo clippy --all-targets --locked -- -D warnings
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
@ -11,7 +12,8 @@ code-quality:
|
|||||||
security:
|
security:
|
||||||
extends: .recompile-branch
|
extends: .recompile-branch
|
||||||
stage: check
|
stage: check
|
||||||
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-all target
|
- ln -s /dockercache/target target
|
||||||
- cargo audit
|
- cargo audit
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
# https://gitlab.com/veloren/veloren/container_registry
|
# https://gitlab.com/veloren/veloren/container_registry
|
||||||
.publish:
|
.publish:
|
||||||
stage: publish
|
stage: publish
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
|
||||||
when: always
|
when: always
|
||||||
@ -11,8 +9,6 @@
|
|||||||
|
|
||||||
.publish-nightly:
|
.publish-nightly:
|
||||||
stage: publish
|
stage: publish
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
when: always
|
when: always
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# Template to only run if actual changes has been made to the code and not just documentation
|
# Template to only run if actual changes has been made to the code and not just documentation
|
||||||
.recompile-branch:
|
.recompile-branch:
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME !~ /^master$/
|
- if: $CI_COMMIT_REF_NAME !~ /^master$/
|
||||||
# No '-' here is *very* important: https://docs.gitlab.com/ee/ci/yaml/#complex-rule-clauses
|
# No '-' here is *very* important: https://docs.gitlab.com/ee/ci/yaml/#complex-rule-clauses
|
||||||
@ -14,8 +12,6 @@
|
|||||||
|
|
||||||
# like .recompile-branch but will run on master too
|
# like .recompile-branch but will run on master too
|
||||||
.recompile:
|
.recompile:
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- "**/*.{glsl,rs,ron,toml,vox,png,wav}"
|
- "**/*.{glsl,rs,ron,toml,vox,png,wav}"
|
||||||
@ -27,8 +23,6 @@
|
|||||||
# Template to only run these after a branch has merged to master
|
# Template to only run these after a branch has merged to master
|
||||||
.post-merge:
|
.post-merge:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^master$/
|
- if: $CI_COMMIT_REF_NAME =~ /^master$/
|
||||||
changes:
|
changes:
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
# allow_failure: true makes these pipelines manual and "non-blocking" which changed with except -> rule syntax
|
# allow_failure: true makes these pipelines manual and "non-blocking" which changed with except -> rule syntax
|
||||||
.optional-release:
|
.optional-release:
|
||||||
stage: check
|
stage: check
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
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_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"
|
||||||
when: never
|
when: never
|
||||||
@ -12,8 +10,6 @@
|
|||||||
# Template to only run if pushes to master or a tag happened
|
# Template to only run if pushes to master or a tag happened
|
||||||
.release:
|
.release:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
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]+/
|
- 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]+/
|
||||||
when: always
|
when: always
|
||||||
@ -22,8 +18,6 @@
|
|||||||
# Template to only run if pushes to master or a tag happened
|
# Template to only run if pushes to master or a tag happened
|
||||||
.release-nightly-tmp-fix-airshipper:
|
.release-nightly-tmp-fix-airshipper:
|
||||||
stage: build-nightly
|
stage: build-nightly
|
||||||
tags:
|
|
||||||
- veloren-docker
|
|
||||||
rules:
|
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_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
|
||||||
when: always
|
when: always
|
||||||
|
Loading…
Reference in New Issue
Block a user