2020-05-14 16:27:35 +00:00
|
|
|
# Template to only run if actual changes has been made to the code and not just documentation
|
|
|
|
.tests: &tests
|
2020-05-15 13:34:52 +00:00
|
|
|
extends: .recompile
|
2020-05-14 16:12:22 +00:00
|
|
|
stage: build-post
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
2020-05-14 16:27:35 +00:00
|
|
|
|
|
|
|
unittests:
|
|
|
|
<<: *tests
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
|
|
|
- cargo test
|
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
coverage:
|
2020-05-14 16:27:35 +00:00
|
|
|
<<: *tests
|
2020-05-14 16:12:22 +00:00
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- cargo tarpaulin -v
|
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
benchmarks:
|
2020-05-14 16:27:35 +00:00
|
|
|
<<: *tests
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
|
|
|
- unset DISABLE_GIT_LFS_CHECK
|
|
|
|
- cargo bench
|
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
localization-status:
|
2020-05-14 16:27:35 +00:00
|
|
|
<<: *tests
|
2020-05-14 16:12:22 +00:00
|
|
|
variables:
|
|
|
|
GIT_DEPTH: 0
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- cargo test -q test_all_localizations -- --nocapture --ignored
|
|
|
|
|
|
|
|
# Artifacts
|
|
|
|
.artifact: &artifact
|
2020-05-15 13:34:52 +00:00
|
|
|
extends: .recompile
|
2020-05-14 16:12:22 +00:00
|
|
|
stage: build-post
|
2020-05-14 16:27:35 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_REF_NAME =~ /^master.$/ || $CI_COMMIT_TAG =~ /^r[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+/
|
2020-05-14 16:12:22 +00:00
|
|
|
tags:
|
|
|
|
- veloren-docker
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
linux:
|
2020-05-14 16:12:22 +00:00
|
|
|
<<: *artifact
|
|
|
|
script:
|
|
|
|
- cargo build --release
|
|
|
|
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
|
|
|
|
- strip --strip-all veloren-server-cli
|
|
|
|
- strip --strip-all veloren-voxygen
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
windows:
|
2020-05-14 16:12:22 +00:00
|
|
|
<<: *artifact
|
|
|
|
script:
|
|
|
|
- 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
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli.exe
|
|
|
|
- veloren-voxygen.exe
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
macos:
|
2020-05-14 16:12:22 +00:00
|
|
|
<<: *artifact
|
|
|
|
script:
|
|
|
|
- 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
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
|
|
|
allow_failure: true
|