2021-01-23 22:05:24 +00:00
|
|
|
unittests:
|
|
|
|
extends: .recompile-branch
|
|
|
|
stage: build
|
2021-05-20 04:21:53 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
2021-01-23 22:05:24 +00:00
|
|
|
variables:
|
|
|
|
GIT_DEPTH: 9999999999999
|
|
|
|
script:
|
2021-05-20 04:21:53 +00:00
|
|
|
- ln -s /dockercache/target target
|
2021-03-23 07:59:37 +00:00
|
|
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-05-04 08:55:40 +00:00
|
|
|
- cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored
|
2021-03-23 10:15:33 +00:00
|
|
|
- rm -r target/debug/incremental* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-06-08 19:46:45 +00:00
|
|
|
- cargo test --features asset_tweak
|
2021-01-23 22:05:24 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
|
2020-05-14 15:37:34 +00:00
|
|
|
benchmarks:
|
2021-04-17 22:49:11 +00:00
|
|
|
extends: .post-merge
|
2020-06-12 11:09:56 +00:00
|
|
|
stage: build
|
2021-05-20 04:21:53 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/bench:${CACHE_IMAGE_TAG}
|
upload benchmark to central ci db
```sql
CREATE TABLE benchmarks(
"timestamp" timestamptz NOT NULL DEFAULT (current_setting('veloren.timestamp')::timestamptz),
branch text NOT NULL DEFAULT current_setting('veloren.branch'),
sha text NOT NULL DEFAULT current_setting('veloren.sha'),
"group" text NULL,
"function" text NULL,
"value" text NULL,
throughput_num numeric NULL,
throughput_type text NULL,
sample_measured_value numeric NOT NULL,
unit text NULL,
iteration_count numeric NULL
);
```
2020-09-29 23:58:35 +00:00
|
|
|
tags:
|
|
|
|
- veloren-benchmark
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
|
|
|
- unset DISABLE_GIT_LFS_CHECK
|
2021-05-20 04:21:53 +00:00
|
|
|
- ln -s /dockercache/target target
|
2021-03-23 07:59:37 +00:00
|
|
|
- ls -la target/*
|
|
|
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
|
|
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-06-01 21:24:56 +00:00
|
|
|
- rm -r target/debug/incremental/* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
|
|
|
- rm -r target/release/incremental/* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-03-23 07:59:37 +00:00
|
|
|
- cargo bench || exit 0 #temp fix
|
2020-12-11 23:20:57 +00:00
|
|
|
- TAGUUID="Z$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)" || echo "ignore this returncode, dont ask me why, it works"
|
2020-11-09 08:53:34 +00:00
|
|
|
- echo $TAGUUID
|
upload benchmark to central ci db
```sql
CREATE TABLE benchmarks(
"timestamp" timestamptz NOT NULL DEFAULT (current_setting('veloren.timestamp')::timestamptz),
branch text NOT NULL DEFAULT current_setting('veloren.branch'),
sha text NOT NULL DEFAULT current_setting('veloren.sha'),
"group" text NULL,
"function" text NULL,
"value" text NULL,
throughput_num numeric NULL,
throughput_type text NULL,
sample_measured_value numeric NOT NULL,
unit text NULL,
iteration_count numeric NULL
);
```
2020-09-29 23:58:35 +00:00
|
|
|
- echo 'SET veloren.timestamp = "'"$(git show --no-patch --no-notes --pretty='%cd' HEAD)"'";' > upload.sql
|
2020-11-09 08:53:34 +00:00
|
|
|
- echo "SET veloren.branch = \$${TAGUUID}\$${CI_COMMIT_REF_NAME}\$${TAGUUID}\$;" >> upload.sql
|
|
|
|
- echo "SET veloren.sha = \$${TAGUUID}\$${CI_COMMIT_SHA}\$${TAGUUID}\$;" >> upload.sql
|
2021-04-18 18:01:26 +00:00
|
|
|
- find target/criterion -wholename "*new/*.csv" -exec echo '\copy benchmarks ("group", "function", "value", throughput_num, throughput_type, sample_measured_value, unit, iteration_count) from '"'{}' csv header" >> upload.sql \;
|
upload benchmark to central ci db
```sql
CREATE TABLE benchmarks(
"timestamp" timestamptz NOT NULL DEFAULT (current_setting('veloren.timestamp')::timestamptz),
branch text NOT NULL DEFAULT current_setting('veloren.branch'),
sha text NOT NULL DEFAULT current_setting('veloren.sha'),
"group" text NULL,
"function" text NULL,
"value" text NULL,
throughput_num numeric NULL,
throughput_type text NULL,
sample_measured_value numeric NOT NULL,
unit text NULL,
iteration_count numeric NULL
);
```
2020-09-29 23:58:35 +00:00
|
|
|
- cat upload.sql
|
2021-06-03 15:26:09 +00:00
|
|
|
- PGPASSWORD="${CIDBPASSWORD}" PGSSLROOTCERT="./.gitlab/ci-db.crt" psql "sslmode=verify-ca host=grafana.veloren.net port=15432 dbname=benchmarks" -U hgseehzjtsrghtjdcqw -f upload.sql;
|
2020-05-14 16:12:22 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
2020-09-29 12:29:18 +00:00
|
|
|
# Coverage is needed on master for the README.md badge to work
|
2020-10-26 18:52:45 +00:00
|
|
|
# tmp remove simd as it doesnt work with tarpaulin: https://github.com/rust-lang/rust/issues/77529
|
2020-09-29 12:29:18 +00:00
|
|
|
coverage:
|
2021-04-17 22:49:11 +00:00
|
|
|
extends: .post-merge
|
2020-09-29 12:29:18 +00:00
|
|
|
stage: build
|
2021-05-20 04:21:53 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/tarpaulin:${CACHE_IMAGE_TAG}
|
2020-09-29 12:29:18 +00:00
|
|
|
script:
|
2021-05-20 04:21:53 +00:00
|
|
|
- ln -s /dockercache/target target
|
2021-03-23 07:59:37 +00:00
|
|
|
- rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2020-09-29 12:29:18 +00:00
|
|
|
- find ./* -name "Cargo.toml" -exec sed -i 's/, "simd"]/]/g' {} \;
|
|
|
|
- find ./* -name "Cargo.toml" -exec sed -i 's/"simd"]/]/g' {} \;
|
|
|
|
- sed -i 's/vek /#vek /g' ./Cargo.toml;
|
2020-10-26 18:52:45 +00:00
|
|
|
- cargo tarpaulin -v -- --test-threads=2
|
2020-09-29 12:29:18 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
#linux, windows, macos builds here as template
|
|
|
|
.tlinux:
|
2021-05-20 04:21:53 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-linux:${CACHE_IMAGE_TAG}
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2021-05-20 04:21:53 +00:00
|
|
|
- ln -s /dockercache/target target
|
2021-03-23 07:59:37 +00:00
|
|
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-06-26 15:43:39 +00:00
|
|
|
- export VELOREN_USERDATA_STRATEGY=executable
|
|
|
|
- cargo build --release -p veloren-voxygen --no-default-features --features default-publish
|
|
|
|
- cargo build --release -p veloren-server-cli
|
2020-05-14 16:12:22 +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/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
2020-05-14 15:37:34 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
.twindows:
|
2021-05-20 04:21:53 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-windows:${CACHE_IMAGE_TAG}
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2021-04-22 01:56:18 +00:00
|
|
|
- update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
|
|
|
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
2021-05-20 04:21:53 +00:00
|
|
|
- ln -s /dockercache/target target
|
2021-03-23 07:59:37 +00:00
|
|
|
- rm -r target/release/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
2021-06-26 15:43:39 +00:00
|
|
|
- export VELOREN_USERDATA_STRATEGY=executable
|
|
|
|
- cargo build --target=x86_64-pc-windows-gnu --release -p veloren-voxygen --no-default-features --features default-publish
|
|
|
|
- cargo build --target=x86_64-pc-windows-gnu --release -p veloren-server-cli
|
2020-05-14 16:12:22 +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
|
2021-04-22 01:56:18 +00:00
|
|
|
- cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/libgcc_s_seh-1.dll $CI_PROJECT_DIR
|
|
|
|
- cp /usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/libstdc++-6.dll $CI_PROJECT_DIR
|
|
|
|
- cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll $CI_PROJECT_DIR
|
2020-05-14 16:12:22 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli.exe
|
|
|
|
- veloren-voxygen.exe
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
2021-04-22 01:56:18 +00:00
|
|
|
- libgcc_s_seh-1.dll
|
|
|
|
- libstdc++-6.dll
|
|
|
|
- libwinpthread-1.dll
|
2020-05-14 16:12:22 +00:00
|
|
|
expire_in: 1 week
|
2020-05-14 15:37:34 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
.tmacos:
|
2021-06-01 19:33:41 +00:00
|
|
|
tags: ["veloren-macos"]
|
|
|
|
before_script:
|
|
|
|
- source $HOME/.cargo/env
|
|
|
|
- cargo --version
|
|
|
|
- export DISABLE_GIT_LFS_CHECK=true
|
|
|
|
- export VELOREN_ASSETS="$(pwd)/assets"
|
|
|
|
- echo "VELOREN_ASSETS=$VELOREN_ASSETS"
|
|
|
|
- export RUSTFLAGS="-D warnings"
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2021-06-01 19:33:41 +00:00
|
|
|
- export MACOSX_DEPLOYMENT_TARGET="10.13"
|
2021-06-26 15:43:39 +00:00
|
|
|
- export VELOREN_USERDATA_STRATEGY=executable
|
|
|
|
- cargo build --release -p veloren-voxygen --no-default-features --features default-publish
|
|
|
|
- cargo build --release -p veloren-server-cli
|
2021-06-01 19:33:41 +00:00
|
|
|
- cp -r target/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp -r target/release/veloren-voxygen $CI_PROJECT_DIR
|
2020-05-14 16:12:22 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2021-06-01 19:33:41 +00:00
|
|
|
# e.g. post merge and scheduled builds
|
|
|
|
.tmacos-master-cache:
|
|
|
|
cache:
|
|
|
|
key: "macos-master-cache"
|
|
|
|
paths:
|
|
|
|
- target/
|
|
|
|
|
|
|
|
# e.g. optional builds from MRs
|
|
|
|
.tmacos-mr-cache:
|
|
|
|
cache:
|
|
|
|
key: "macos-mr-cache"
|
|
|
|
paths:
|
|
|
|
- target/
|
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
# build on release or master
|
|
|
|
linux:
|
|
|
|
extends:
|
|
|
|
- .tlinux
|
|
|
|
- .release
|
|
|
|
|
|
|
|
windows:
|
|
|
|
extends:
|
|
|
|
- .twindows
|
|
|
|
- .release
|
|
|
|
|
|
|
|
macos:
|
|
|
|
extends:
|
|
|
|
- .tmacos
|
|
|
|
- .release
|
2021-06-01 19:33:41 +00:00
|
|
|
- .tmacos-master-cache
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2021-04-23 15:47:55 +00:00
|
|
|
# build on schedule quickfix till airshipper 0.5
|
|
|
|
air-linux:
|
|
|
|
extends:
|
|
|
|
- .tlinux
|
|
|
|
- .release-nightly-tmp-fix-airshipper
|
|
|
|
|
|
|
|
air-windows:
|
|
|
|
extends:
|
|
|
|
- .twindows
|
|
|
|
- .release-nightly-tmp-fix-airshipper
|
|
|
|
|
|
|
|
air-macos:
|
|
|
|
extends:
|
|
|
|
- .tmacos
|
|
|
|
- .release-nightly-tmp-fix-airshipper
|
2021-06-01 19:33:41 +00:00
|
|
|
- .tmacos-master-cache
|
2021-04-23 15:47:55 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
# if NOT release or master, allow optional builds
|
|
|
|
opt-linux:
|
|
|
|
extends:
|
|
|
|
- .tlinux
|
|
|
|
- .optional-release
|
|
|
|
|
|
|
|
opt-windows:
|
|
|
|
extends:
|
|
|
|
- .twindows
|
|
|
|
- .optional-release
|
|
|
|
|
|
|
|
opt-macos:
|
|
|
|
extends:
|
|
|
|
- .tmacos
|
2020-07-12 02:38:11 +00:00
|
|
|
- .optional-release
|
2021-06-01 19:33:41 +00:00
|
|
|
- .tmacos-mr-cache
|