mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
# Template to only run if actual changes has been made to the code and not just documentation
|
|
.tests: &tests
|
|
extends: .recompile
|
|
stage: build-post
|
|
tags:
|
|
- veloren-docker
|
|
|
|
unittests:
|
|
<<: *tests
|
|
script:
|
|
- cargo test
|
|
retry:
|
|
max: 2
|
|
|
|
coverage:
|
|
<<: *tests
|
|
allow_failure: true
|
|
script:
|
|
- cargo tarpaulin -v
|
|
retry:
|
|
max: 2
|
|
|
|
benchmarks:
|
|
<<: *tests
|
|
script:
|
|
- unset DISABLE_GIT_LFS_CHECK
|
|
- cargo bench
|
|
retry:
|
|
max: 2
|
|
|
|
localization-status:
|
|
<<: *tests
|
|
variables:
|
|
GIT_DEPTH: 0
|
|
allow_failure: true
|
|
script:
|
|
- cargo test -q test_all_localizations -- --nocapture --ignored
|
|
|
|
# Artifacts
|
|
.artifact: &artifact
|
|
extends: .recompile
|
|
stage: build-post
|
|
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]+/
|
|
tags:
|
|
- veloren-docker
|
|
|
|
linux:
|
|
<<: *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
|
|
|
|
windows:
|
|
<<: *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
|
|
|
|
macos:
|
|
<<: *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
|