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-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "check"]
|
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-07-14 08:25:29 +00:00
|
|
|
- cat ./.gitlab/scripts/unittest.sh
|
|
|
|
- source ./.gitlab/scripts/unittest.sh
|
2021-01-23 22:05:24 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
|
2021-08-02 09:05:05 +00:00
|
|
|
translation:
|
|
|
|
extends: .release
|
|
|
|
stage: build
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "check"]
|
2021-08-02 09:05:05 +00:00
|
|
|
script:
|
|
|
|
- ln -s /dockercache/target target
|
|
|
|
- cat ./.gitlab/scripts/translation.sh
|
|
|
|
- source ./.gitlab/scripts/translation.sh
|
|
|
|
- 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"
|
|
|
|
- echo $TAGUUID # Use TAGUUID to mitigate https://xkcd.com/327/ in the branch name
|
|
|
|
- echo 'SET veloren.timestamp = "'"$(git show --no-patch --no-notes --pretty='%cd' HEAD)"'";' > upload.sql
|
|
|
|
- echo "SET veloren.branch = \$${TAGUUID}\$${CI_COMMIT_REF_NAME}\$${TAGUUID}\$;" >> upload.sql
|
|
|
|
- echo "SET veloren.sha = \$${TAGUUID}\$${CI_COMMIT_SHA}\$${TAGUUID}\$;" >> upload.sql
|
|
|
|
- echo '\copy translations ("country_code", "file_name", "translation_key", "status", "git_commit") from '"'translation_analysis.csv' csv header" >> upload.sql
|
|
|
|
- cat upload.sql
|
2023-06-26 22:13:01 +00:00
|
|
|
- PGPASSWORD="${CIDBPASSWORD}" PGSSLROOTCERT="./.gitlab/ci-db.crt" psql "sslmode=verify-ca host=cidb.veloren.net port=30432 dbname=translations" -U hgseehzjtsrghtjdcqw -f upload.sql;
|
2021-08-02 09:05:05 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
|
2020-05-14 15:37:34 +00:00
|
|
|
benchmarks:
|
2021-06-28 19:22:59 +00:00
|
|
|
extends: .release
|
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}
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "check", "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-07-14 08:25:29 +00:00
|
|
|
- cat ./.gitlab/scripts/benchmark.sh
|
|
|
|
- source ./.gitlab/scripts/benchmark.sh
|
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"
|
2021-08-02 09:05:05 +00:00
|
|
|
- echo $TAGUUID # Use TAGUUID to mitigate https://xkcd.com/327/ in the branch name
|
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
|
2023-06-16 13:22:07 +00:00
|
|
|
- PGPASSWORD="${CIDBPASSWORD}" PGSSLROOTCERT="./.gitlab/ci-db.crt" psql "sslmode=verify-ca host=cidb.veloren.net port=30432 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
|
2022-09-26 06:36:17 +00:00
|
|
|
|
|
|
|
coverage:
|
|
|
|
extends: .release
|
|
|
|
stage: build
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/tarpaulin:${CACHE_IMAGE_TAG}
|
|
|
|
coverage: '/^\d+.\d+% coverage/'
|
|
|
|
tags: ["veloren/veloren", "check"]
|
|
|
|
script:
|
|
|
|
- ln -s /dockercache/target target
|
|
|
|
- cat ./.gitlab/scripts/coverage.sh
|
|
|
|
- source ./.gitlab/scripts/coverage.sh
|
|
|
|
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
|
2022-02-14 15:30:37 +00:00
|
|
|
.tlinux-x86_64:
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-linux-x86_64:${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
|
2022-02-14 15:30:37 +00:00
|
|
|
- cat ./.gitlab/scripts/linux-x86_64.sh
|
|
|
|
- source ./.gitlab/scripts/linux-x86_64.sh
|
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
|
|
|
|
2021-11-16 05:41:33 +00:00
|
|
|
.tlinux-aarch64:
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-linux-aarch64:${CACHE_IMAGE_TAG}
|
|
|
|
script:
|
|
|
|
- ln -s /dockercache/target target
|
|
|
|
- cat ./.gitlab/scripts/linux-aarch64.sh
|
|
|
|
- source ./.gitlab/scripts/linux-aarch64.sh
|
2021-11-21 15:38:27 +00:00
|
|
|
- cp -r target/aarch64-unknown-linux-gnu/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp -r target/aarch64-unknown-linux-gnu/release/veloren-voxygen $CI_PROJECT_DIR
|
2021-11-16 05:41:33 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- veloren-server-cli
|
|
|
|
- veloren-voxygen
|
|
|
|
- assets/
|
|
|
|
- LICENSE
|
|
|
|
expire_in: 1 week
|
|
|
|
|
2022-02-14 15:30:37 +00:00
|
|
|
.twindows-x86_64:
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/release-windows-x86_64:${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
|
2022-02-14 15:30:37 +00:00
|
|
|
- cat ./.gitlab/scripts/windows-x86_64.sh
|
|
|
|
- source ./.gitlab/scripts/windows-x86_64.sh
|
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
|
2023-05-10 14:06:18 +00:00
|
|
|
- cp /usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/libgcc_s_seh-1.dll $CI_PROJECT_DIR
|
|
|
|
- cp /usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/libstdc++-6.dll $CI_PROJECT_DIR
|
2021-04-22 01:56:18 +00:00
|
|
|
- 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
|
|
|
|
2022-02-08 21:25:09 +00:00
|
|
|
# Use a yaml anchor to allow the same before_script to be used in both .tmacos-x86_64 and .tmacos-aarch64
|
|
|
|
# https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#yaml-anchors-for-scripts
|
|
|
|
.tmacos-before-script: &tmacos-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"
|
|
|
|
- export CARGO_INCREMENTAL=0
|
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
.tmacos:
|
2021-06-01 19:33:41 +00:00
|
|
|
tags: ["veloren-macos"]
|
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
|
2022-02-08 21:25:09 +00:00
|
|
|
- cargo build --release --no-default-features --features default-publish --target $RUST_TARGET
|
2022-02-18 14:06:25 +00:00
|
|
|
- cp -r target/$RUST_TARGET/release/veloren-server-cli $CI_PROJECT_DIR
|
|
|
|
- cp -r target/$RUST_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
|
|
|
|
2022-02-08 21:25:09 +00:00
|
|
|
.tmacos-x86_64:
|
|
|
|
extends:
|
|
|
|
- .tmacos
|
|
|
|
before_script:
|
|
|
|
- *tmacos-before-script
|
|
|
|
- export RUST_TARGET="x86_64-apple-darwin"
|
2023-10-13 12:33:17 +00:00
|
|
|
# Using fat LTO on macos_x86_64 caused timeouts in the build pipeline, overriding it to thin here fixes this
|
2023-10-13 10:18:50 +00:00
|
|
|
- export RUSTFLAGS="-C lto=thin"
|
2021-06-01 19:33:41 +00:00
|
|
|
|
2022-02-08 21:25:09 +00:00
|
|
|
.tmacos-aarch64:
|
|
|
|
extends:
|
|
|
|
- .tmacos
|
|
|
|
before_script:
|
|
|
|
- *tmacos-before-script
|
|
|
|
- export RUST_TARGET="aarch64-apple-darwin"
|
2021-06-01 19:33:41 +00:00
|
|
|
|
2020-06-12 11:09:56 +00:00
|
|
|
# build on release or master
|
2022-02-14 15:30:37 +00:00
|
|
|
linux-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-14 15:30:37 +00:00
|
|
|
- .tlinux-x86_64
|
2020-06-12 11:09:56 +00:00
|
|
|
- .release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "build", "publish", "trusted"]
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2022-03-03 09:33:19 +00:00
|
|
|
linux-aarch64:
|
|
|
|
extends:
|
|
|
|
- .tlinux-aarch64
|
|
|
|
- .release
|
|
|
|
tags: ["veloren/veloren", "build", "publish", "trusted"]
|
|
|
|
|
2022-02-14 15:30:37 +00:00
|
|
|
windows-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-14 15:30:37 +00:00
|
|
|
- .twindows-x86_64
|
2020-06-12 11:09:56 +00:00
|
|
|
- .release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "build", "publish", "trusted"]
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2022-02-14 15:30:37 +00:00
|
|
|
macos-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-08 21:25:09 +00:00
|
|
|
- .tmacos-x86_64
|
|
|
|
- .release
|
|
|
|
tags: ["veloren/veloren:macos", "build", "publish", "trusted"]
|
|
|
|
|
|
|
|
macos-aarch64:
|
|
|
|
extends:
|
|
|
|
- .tmacos-aarch64
|
2020-06-12 11:09:56 +00:00
|
|
|
- .release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren:macos", "build", "publish", "trusted"]
|
2020-06-12 11:09:56 +00:00
|
|
|
|
|
|
|
# if NOT release or master, allow optional builds
|
2022-02-14 15:30:37 +00:00
|
|
|
opt-linux-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-14 15:30:37 +00:00
|
|
|
- .tlinux-x86_64
|
2020-06-12 11:09:56 +00:00
|
|
|
- .optional-release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "build"]
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2021-11-16 05:41:33 +00:00
|
|
|
opt-linux-aarch64:
|
|
|
|
extends:
|
|
|
|
- .tlinux-aarch64
|
|
|
|
- .optional-release
|
|
|
|
tags: ["veloren/veloren", "build"]
|
|
|
|
|
2022-02-14 15:30:37 +00:00
|
|
|
opt-windows-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-14 15:30:37 +00:00
|
|
|
- .twindows-x86_64
|
2020-06-12 11:09:56 +00:00
|
|
|
- .optional-release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren", "build"]
|
2020-06-12 11:09:56 +00:00
|
|
|
|
2022-02-08 21:25:09 +00:00
|
|
|
opt-macos-x86_64:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends:
|
2022-02-08 21:25:09 +00:00
|
|
|
- .tmacos-x86_64
|
|
|
|
- .optional-release
|
|
|
|
tags: ["veloren/veloren:macos", "build"]
|
|
|
|
|
|
|
|
opt-macos-aarch64:
|
|
|
|
extends:
|
|
|
|
- .tmacos-aarch64
|
2020-07-12 02:38:11 +00:00
|
|
|
- .optional-release
|
2021-08-17 11:22:18 +00:00
|
|
|
tags: ["veloren/veloren:macos", "build"]
|