2020-05-14 16:27:35 +00:00
|
|
|
unittests:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends: .recompile-branch
|
|
|
|
stage: build
|
2020-07-13 07:50:55 +00:00
|
|
|
variables:
|
|
|
|
GIT_DEPTH: 9999999999999
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2020-05-29 12:13:12 +00:00
|
|
|
- ln -s /dockercache/cache-all target
|
2020-07-13 07:50:55 +00:00
|
|
|
- cargo test --package veloren-voxygen --lib test_all_localizations -- --nocapture --ignored
|
2020-05-14 16:12:22 +00:00
|
|
|
- cargo test
|
|
|
|
retry:
|
|
|
|
max: 2
|
2020-05-14 15:37:34 +00:00
|
|
|
|
|
|
|
benchmarks:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends: .recompile-branch
|
|
|
|
stage: build
|
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
|
2020-05-29 12:13:12 +00:00
|
|
|
- ln -s /dockercache/cache-all target
|
2020-05-14 16:12:22 +00:00
|
|
|
- cargo bench
|
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
|
|
|
|
- echo 'SET veloren.branch = "'"${CI_COMMIT_REF_NAME}"'";' >> upload.sql
|
|
|
|
- echo 'SET veloren.sha = "'"${CI_COMMIT_SHA}"'";' >> upload.sql
|
|
|
|
- find . -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 \;
|
|
|
|
- cat upload.sql
|
|
|
|
- mkdir -p /usr/share/man/man1/ /usr/share/man/man3/ /usr/share/man/man7/
|
|
|
|
- apt-get update
|
|
|
|
- apt-get -y install postgresql-client
|
|
|
|
- PGPASSWORD="${CIDBPASSWORD}" PGSSLROOTCERT="./.gitlab/ci-db.crt" psql "sslmode=verify-ca host=auth.veloren.net dbname=benchmarks" -U bsdrftsejrhdrjhgd -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:
|
2020-10-26 18:52:45 +00:00
|
|
|
extends: .recompile
|
2020-09-29 12:29:18 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- ln -s /dockercache/cache-tarpaulin target
|
|
|
|
- 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:
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2020-05-29 12:13:12 +00:00
|
|
|
- ln -s /dockercache/cache-release-linux target
|
2020-10-05 08:48:29 +00:00
|
|
|
- VELOREN_USERDATA_STRATEGY=executable cargo build --release
|
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:
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2020-05-29 12:13:12 +00:00
|
|
|
- ln -s /dockercache/cache-release-windows target
|
2020-10-05 08:48:29 +00:00
|
|
|
- VELOREN_USERDATA_STRATEGY=executable cargo build --target=x86_64-pc-windows-gnu --release
|
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
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli.exe
|
|
|
|
- veloren-voxygen.exe
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
2020-05-14 15:37:34 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
.tmacos:
|
2020-05-14 16:12:22 +00:00
|
|
|
script:
|
2020-05-29 12:13:12 +00:00
|
|
|
- ln -s /dockercache/cache-release-macos target
|
2020-10-05 08:48:29 +00:00
|
|
|
- VELOREN_USERDATA_STRATEGY=executable 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
|
2020-05-14 16:12:22 +00:00
|
|
|
- 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
|
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
|
|
|
|
|
|
|
|
# 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
|