Different Jobs now have different target directorys, as cargo seems to have some weird behavior, see more in MR25 of veloren-docker-ci:

https://gitlab.com/veloren/veloren-docker-ci/-/merge_requests/25
This commit is contained in:
Marcel Märtens 2020-05-29 14:13:12 +02:00
parent 6d1ec73b47
commit dcea5776c1
4 changed files with 13 additions and 2 deletions

View File

@ -33,8 +33,6 @@ before_script:
- export DISABLE_GIT_LFS_CHECK=true
- export VELOREN_ASSETS="$(pwd)/assets"
- echo "VELOREN_ASSETS=$VELOREN_ASSETS"
- rm -r target || echo "target doesnt exist, which is fine"
- ln -s /dockercache/veloren/target target
workflow:
rules:

View File

@ -7,6 +7,7 @@
unittests:
<<: *tests
script:
- ln -s /dockercache/cache-all target
- cargo test
retry:
max: 2
@ -15,6 +16,7 @@ coverage:
<<: *tests
allow_failure: true
script:
- ln -s /dockercache/cache-tarpaulin target
- cargo tarpaulin -v
retry:
max: 2
@ -23,6 +25,7 @@ benchmarks:
<<: *tests
script:
- unset DISABLE_GIT_LFS_CHECK
- ln -s /dockercache/cache-all target
- cargo bench
retry:
max: 2
@ -33,6 +36,7 @@ localization-status:
GIT_DEPTH: 0
allow_failure: true
script:
- ln -s /dockercache/cache-all target
- cargo test -q test_all_localizations -- --nocapture --ignored
# Artifacts
@ -45,6 +49,7 @@ localization-status:
linux:
<<: *artifact
script:
- ln -s /dockercache/cache-release-linux target
- cargo build --release
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
@ -61,6 +66,7 @@ linux:
windows:
<<: *artifact
script:
- ln -s /dockercache/cache-release-windows target
- 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-voxygen.exe $CI_PROJECT_DIR
@ -75,6 +81,7 @@ windows:
macos:
<<: *artifact
script:
- ln -s /dockercache/cache-release-macos target
- 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
- 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

View File

@ -4,6 +4,7 @@ check:
tags:
- veloren-docker
script:
- ln -s /dockercache/cache-all target
- RUSTFLAGS="-D warnings" cargo check --locked
code-quality:
@ -12,6 +13,7 @@ code-quality:
tags:
- veloren-docker
script:
- ln -s /dockercache/cache-all target
- cargo clippy -- --warn clippy::all
- cargo fmt --all -- --check
@ -22,4 +24,5 @@ security:
tags:
- veloren-docker
script:
- ln -s /dockercache/cache-all target
- cargo audit

View File

@ -9,6 +9,7 @@
optional-release:linux:
<<: *optional-release
script:
- ln -s /dockercache/cache-release-linux target
- cargo build --verbose --release
- cp target/release/veloren-server-cli $CI_PROJECT_DIR
- cp target/release/veloren-voxygen $CI_PROJECT_DIR
@ -25,6 +26,7 @@ optional-release:linux:
optional-release:windows:
<<: *optional-release
script:
- ln -s /dockercache/cache-release-windows target
- cargo build --verbose --target=x86_64-pc-windows-gnu --release
- cp target/x86_64-pc-windows-gnu/release/veloren-server-cli.exe $CI_PROJECT_DIR
- cp target/x86_64-pc-windows-gnu/release/veloren-voxygen.exe $CI_PROJECT_DIR
@ -39,6 +41,7 @@ optional-release:windows:
optional-release:macos:
<<: *optional-release
script:
- ln -s /dockercache/cache-release-macos target
- 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
- 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