veloren/.gitlab/CI/build.gitlab-ci.yml

115 lines
2.6 KiB
YAML
Raw Normal View History

2020-05-14 16:27:35 +00:00
unittests:
extends: .recompile-branch
stage: build
script:
- ln -s /dockercache/cache-all target
- cargo test
retry:
max: 2
benchmarks:
extends: .recompile-branch
stage: build
script:
- unset DISABLE_GIT_LFS_CHECK
- ln -s /dockercache/cache-all target
- cargo bench
retry:
max: 2
localization-status:
extends: .recompile-branch
stage: build
variables:
GIT_DEPTH: 0
allow_failure: true
script:
- ln -s /dockercache/cache-all target
- cargo test test_all_localizations -- --nocapture --ignored
# Coverage is needed on master for the README.md badge to work
coverage:
extends: .recompile
stage: build
script:
- ln -s /dockercache/cache-tarpaulin target
- cargo tarpaulin -v
retry:
max: 2
#linux, windows, macos builds here as template
.tlinux:
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
- strip --strip-all veloren-server-cli
- strip --strip-all veloren-voxygen
artifacts:
paths:
- veloren-server-cli
- veloren-voxygen
- assets/
- LICENSE
expire_in: 1 week
.twindows:
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
artifacts:
paths:
- veloren-server-cli.exe
- veloren-voxygen.exe
- assets/
- LICENSE
expire_in: 1 week
.tmacos:
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
artifacts:
paths:
- veloren-server-cli
- veloren-voxygen
- assets/
- LICENSE
expire_in: 1 week
# build on release or master
linux:
extends:
- .tlinux
- .release
windows:
extends:
- .twindows
- .release
macos:
extends:
- .tmacos
- .release
# if NOT release or master, allow optional builds
opt-linux:
extends:
- .tlinux
- .optional-release
opt-windows:
extends:
- .twindows
- .optional-release
opt-macos:
extends:
- .tmacos
- .optional-release