mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
switch to new caching inside docker, described at: https://gitlab.com/veloren/veloren-docker-ci/merge_requests/8
we need to ln target to /dockercache/veloren/target in order for the cace to take affect, the old caching info is no longer needed inside .gitlab-ci.yml
This commit is contained in:
parent
fdeace1748
commit
b08f11cfa4
@ -18,11 +18,8 @@ before_script:
|
|||||||
- gcc -v
|
- gcc -v
|
||||||
- cargo --version
|
- cargo --version
|
||||||
- export DISABLE_GIT_LFS_CHECK=true
|
- export DISABLE_GIT_LFS_CHECK=true
|
||||||
- find assets | md5sum
|
- rm -r target || echo "target doesnt exist, which is fine"
|
||||||
- ls -la target/debug || echo "upsi"
|
- ln -s /dockercache/veloren/target target
|
||||||
- ls -la target/release || echo "upsi"
|
|
||||||
- ls -la target || echo "upsi"
|
|
||||||
- find target/debug/deps -type f | wc -l || echo "upsi"
|
|
||||||
- date
|
- date
|
||||||
|
|
||||||
# -- optional build
|
# -- optional build
|
||||||
@ -37,10 +34,6 @@ before_script:
|
|||||||
|
|
||||||
optional-debug:linux:
|
optional-debug:linux:
|
||||||
<<: *optional-debug
|
<<: *optional-debug
|
||||||
cache:
|
|
||||||
key: "cache-linux-debug-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
script:
|
script:
|
||||||
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
||||||
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
||||||
@ -58,10 +51,6 @@ optional-debug:linux:
|
|||||||
|
|
||||||
optional-debug:windows:
|
optional-debug:windows:
|
||||||
<<: *optional-debug
|
<<: *optional-debug
|
||||||
cache:
|
|
||||||
key: "cache-windows-debug-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
script:
|
script:
|
||||||
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu && cd ..
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu && cd ..
|
||||||
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu && cd ..
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu && cd ..
|
||||||
@ -85,10 +74,6 @@ optional-debug:windows:
|
|||||||
|
|
||||||
optional-release:linux:
|
optional-release:linux:
|
||||||
<<: *optional-release
|
<<: *optional-release
|
||||||
cache:
|
|
||||||
key: "cache-linux-release-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
script:
|
script:
|
||||||
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
||||||
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
||||||
@ -106,10 +91,6 @@ optional-release:linux:
|
|||||||
|
|
||||||
optional-release:windows:
|
optional-release:windows:
|
||||||
<<: *optional-release
|
<<: *optional-release
|
||||||
cache:
|
|
||||||
key: "cache-windows-release-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
script:
|
script:
|
||||||
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu --release && cd ..
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu --release && cd ..
|
||||||
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu --release && cd ..
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --target=x86_64-pc-windows-gnu --release && cd ..
|
||||||
@ -129,31 +110,18 @@ optional-release:windows:
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
stage: check-compile
|
stage: check-compile
|
||||||
cache:
|
|
||||||
key: "cache-linux-debug-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
|
||||||
- RUSTFLAGS="-D warnings" cargo check --verbose
|
- RUSTFLAGS="-D warnings" cargo check --verbose
|
||||||
- date
|
|
||||||
|
|
||||||
code-quality:
|
code-quality:
|
||||||
stage: check-compile
|
stage: check-compile
|
||||||
cache:
|
|
||||||
key: "cache-linux-debug-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
|
||||||
- cargo clippy -- --warn clippy::all
|
- cargo clippy -- --warn clippy::all
|
||||||
- date
|
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
- date
|
|
||||||
|
|
||||||
security:
|
security:
|
||||||
stage: check-compile
|
stage: check-compile
|
||||||
@ -161,11 +129,7 @@ security:
|
|||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
|
||||||
- cargo install cargo-audit
|
|
||||||
- date
|
|
||||||
- cargo audit
|
- cargo audit
|
||||||
- date
|
|
||||||
|
|
||||||
# --
|
# --
|
||||||
|
|
||||||
@ -173,41 +137,26 @@ security:
|
|||||||
|
|
||||||
unittests:
|
unittests:
|
||||||
stage: post
|
stage: post
|
||||||
cache:
|
|
||||||
key: "cache-linux-debug-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
when: delayed
|
when: delayed
|
||||||
start_in: 5 seconds
|
start_in: 5 seconds
|
||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
- echo "Workaround, cargo tests fails due some rust files are already deleted, so we just stack cargo test. if its the os error, it wont appear on them all, if its a real error, it will retry and then fail"
|
||||||
- cargo test
|
- cargo test || cargo test || cargo test || cargo test
|
||||||
- date
|
|
||||||
|
|
||||||
benchmarks:
|
benchmarks:
|
||||||
stage: post
|
stage: post
|
||||||
cache:
|
|
||||||
key: "cache-linux-release-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
when: delayed
|
when: delayed
|
||||||
start_in: 5 seconds
|
start_in: 5 seconds
|
||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
|
||||||
- cargo bench
|
- cargo bench
|
||||||
- date
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
stage: post
|
stage: post
|
||||||
cache:
|
|
||||||
key: "cache-linux-release-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
when: delayed
|
when: delayed
|
||||||
start_in: 5 seconds
|
start_in: 5 seconds
|
||||||
only:
|
only:
|
||||||
@ -218,19 +167,12 @@ linux:
|
|||||||
tags:
|
tags:
|
||||||
- veloren-docker
|
- veloren-docker
|
||||||
script:
|
script:
|
||||||
- date
|
|
||||||
- cd voxygen && VELOREN_ASSETS=assets cargo build --release && cd ..
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --release && cd ..
|
||||||
- date
|
|
||||||
- cd server-cli && VELOREN_ASSETS=assets cargo build --release && cd ..
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --release && cd ..
|
||||||
- date
|
|
||||||
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
||||||
- date
|
|
||||||
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
|
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
|
||||||
- date
|
|
||||||
- strip --strip-all veloren-server-cli
|
- strip --strip-all veloren-server-cli
|
||||||
- date
|
|
||||||
- strip --strip-all veloren-voxygen
|
- strip --strip-all veloren-voxygen
|
||||||
- date
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- veloren-server-cli
|
- veloren-server-cli
|
||||||
@ -241,10 +183,6 @@ linux:
|
|||||||
|
|
||||||
windows:
|
windows:
|
||||||
stage: post
|
stage: post
|
||||||
cache:
|
|
||||||
key: "cache-windows-release-v2"
|
|
||||||
paths:
|
|
||||||
- ./target
|
|
||||||
when: delayed
|
when: delayed
|
||||||
start_in: 5 seconds
|
start_in: 5 seconds
|
||||||
only:
|
only:
|
||||||
|
Loading…
Reference in New Issue
Block a user