2019-10-08 09:14:46 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci:latest
|
2019-04-18 22:23:11 +00:00
|
|
|
|
|
|
|
variables:
|
2019-10-09 22:42:39 +00:00
|
|
|
GIT_STRATEGY: fetch
|
|
|
|
GIT_DEPTH: 3
|
|
|
|
GIT_CLEAN_FLAGS: -f
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- optional-builds
|
|
|
|
- check-compile
|
|
|
|
- post
|
|
|
|
|
2019-04-18 22:23:11 +00:00
|
|
|
before_script:
|
2019-10-08 08:13:40 +00:00
|
|
|
- source $HOME/.cargo/env
|
|
|
|
- df -h
|
|
|
|
- free -h
|
|
|
|
- gcc -v
|
|
|
|
- cargo --version
|
2019-10-08 17:03:00 +00:00
|
|
|
- export DISABLE_GIT_LFS_CHECK=true
|
2019-10-10 20:47:40 +00:00
|
|
|
- find assets | md5sum
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
# -- optional build
|
|
|
|
|
|
|
|
.optional-debug: &optional-debug
|
|
|
|
stage: optional-builds
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
except:
|
|
|
|
- schedules
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
optional-debug:linux:
|
|
|
|
<<: *optional-debug
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-debug-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
script:
|
|
|
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
|
|
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose && cd ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- cp target/debug/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp target/debug/veloren-voxygen $CI_PROJECT_DIR
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
2019-10-17 13:06:20 +00:00
|
|
|
- LICENSE
|
2019-10-08 17:03:00 +00:00
|
|
|
expire_in: 1 week
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
optional-debug:windows:
|
|
|
|
<<: *optional-debug
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-windows-debug-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
script:
|
|
|
|
- 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 ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- cp target/x86_64-pc-windows-gnu/debug/veloren-server-cli.exe $CI_PROJECT_DIR
|
|
|
|
- cp target/x86_64-pc-windows-gnu/debug/veloren-voxygen.exe $CI_PROJECT_DIR
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli.exe
|
|
|
|
- veloren-voxygen.exe
|
|
|
|
- assets/
|
2019-10-17 13:06:20 +00:00
|
|
|
- LICENSE
|
2019-10-08 17:03:00 +00:00
|
|
|
expire_in: 1 week
|
2019-09-07 16:35:10 +00:00
|
|
|
|
|
|
|
.optional-release: &optional-release
|
2019-10-08 08:13:40 +00:00
|
|
|
stage: optional-builds
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
except:
|
|
|
|
- schedules
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
optional-release:linux:
|
|
|
|
<<: *optional-release
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-release-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
script:
|
|
|
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
|
|
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --verbose --release && cd ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- cp target/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp target/release/veloren-voxygen $CI_PROJECT_DIR
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
2019-10-17 13:06:20 +00:00
|
|
|
- LICENSE
|
2019-10-08 17:03:00 +00:00
|
|
|
expire_in: 1 week
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
optional-release:windows:
|
|
|
|
<<: *optional-release
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-windows-release-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
script:
|
|
|
|
- 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 ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- 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
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli.exe
|
|
|
|
- veloren-voxygen.exe
|
|
|
|
- assets/
|
2019-10-17 13:06:20 +00:00
|
|
|
- LICENSE
|
2019-10-08 17:03:00 +00:00
|
|
|
expire_in: 1 week
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
# --
|
|
|
|
|
|
|
|
# -- check
|
|
|
|
|
|
|
|
check:
|
|
|
|
stage: check-compile
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-debug-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- RUSTFLAGS="-D warnings" cargo check --verbose
|
|
|
|
|
|
|
|
code-quality:
|
|
|
|
stage: check-compile
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-debug-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- cargo clippy -- --warn clippy::all
|
|
|
|
- cargo fmt --all -- --check
|
|
|
|
|
|
|
|
# --
|
|
|
|
|
|
|
|
# -- post build
|
2019-04-27 15:38:28 +00:00
|
|
|
|
2019-04-18 22:23:11 +00:00
|
|
|
unittests:
|
2019-10-08 08:13:40 +00:00
|
|
|
stage: post
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-debug-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
when: delayed
|
|
|
|
start_in: 5 seconds
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- cargo test
|
|
|
|
|
|
|
|
benchmarks:
|
|
|
|
stage: post
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-release-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
when: delayed
|
|
|
|
start_in: 5 seconds
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- cargo bench
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
linux:
|
|
|
|
stage: post
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-linux-release-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
when: delayed
|
|
|
|
start_in: 5 seconds
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- /^r[0-9]+\.[0-9]+\.[0-9]+/
|
|
|
|
- /^v[0-9]+\.[0-9]+\.[0-9]+/
|
|
|
|
- /^master$/
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --release && cd ..
|
|
|
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --release && cd ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
|
|
|
expire_in: 1 week
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
windows:
|
|
|
|
stage: post
|
|
|
|
cache:
|
2019-10-10 20:53:26 +00:00
|
|
|
key: "cache-windows-release-v2"
|
2019-10-08 08:13:40 +00:00
|
|
|
paths:
|
2019-10-10 20:47:40 +00:00
|
|
|
- ./target
|
2019-10-08 08:13:40 +00:00
|
|
|
when: delayed
|
|
|
|
start_in: 5 seconds
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- /^r[0-9]+\.[0-9]+\.[0-9]+/
|
|
|
|
- /^v[0-9]+\.[0-9]+\.[0-9]+/
|
|
|
|
- /^master$/
|
|
|
|
tags:
|
|
|
|
- veloren-docker
|
|
|
|
script:
|
|
|
|
- cd voxygen && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu --release && cd ..
|
|
|
|
- cd server-cli && VELOREN_ASSETS=assets cargo build --target=x86_64-pc-windows-gnu --release && cd ..
|
2019-10-08 17:03:00 +00:00
|
|
|
- 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/
|
|
|
|
expire_in: 1 week
|
2019-10-08 08:13:40 +00:00
|
|
|
|
|
|
|
# --
|