2020-12-06 00:16:34 +00:00
|
|
|
stages:
|
2022-02-03 15:27:13 +00:00
|
|
|
- check
|
2020-12-06 00:16:34 +00:00
|
|
|
- build
|
2021-09-27 16:35:32 +01:00
|
|
|
- test
|
2022-05-05 12:52:00 +01:00
|
|
|
- deploy
|
2020-12-06 00:16:34 +00:00
|
|
|
|
2020-12-06 16:01:53 +00:00
|
|
|
variables:
|
|
|
|
# We don't need Husky to install the Git hooks for CI.
|
|
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: "true"
|
2022-05-24 16:10:45 +01:00
|
|
|
# fs-mistrust doesn't like umask 0
|
|
|
|
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
|
|
|
|
|
|
|
|
default:
|
|
|
|
before_script:
|
|
|
|
# gitlab fetch strategy doesn't reset permissions
|
|
|
|
- (while [ "$PWD" != / ]; do chmod go-w . && cd ..; done)
|
2020-12-06 16:01:53 +00:00
|
|
|
|
2022-02-03 15:27:13 +00:00
|
|
|
check-editorconfig:
|
|
|
|
stage: check
|
|
|
|
image: mstruebing/editorconfig-checker
|
|
|
|
script:
|
|
|
|
- ec
|
|
|
|
|
2022-01-28 14:21:28 +00:00
|
|
|
shellcheck:
|
2022-02-03 15:27:13 +00:00
|
|
|
stage: check
|
2022-01-28 14:21:28 +00:00
|
|
|
image: koalaman/shellcheck-alpine
|
|
|
|
script:
|
2022-05-25 12:10:55 +01:00
|
|
|
- apk add git bash
|
2022-02-03 18:14:57 +00:00
|
|
|
- ./maint/shellcheck_all
|
2022-01-28 14:21:28 +00:00
|
|
|
|
2022-06-08 19:14:27 +01:00
|
|
|
maint-checks:
|
|
|
|
stage: check
|
|
|
|
image: debian:stable-slim
|
|
|
|
script:
|
2023-01-26 20:06:52 +00:00
|
|
|
- apt-get update && apt-get install -y python3-toml python-is-python3 git
|
2022-06-08 19:14:27 +01:00
|
|
|
- ./maint/check_toposort
|
2022-06-24 12:55:42 +01:00
|
|
|
- ./maint/add_warning --check
|
2023-01-24 16:28:33 +00:00
|
|
|
|
|
|
|
# non-blocking for now, see
|
|
|
|
# https://gitlab.torproject.org/tpo/core/arti/-/issues/581
|
|
|
|
# https://gitlab.torproject.org/tpo/core/arti/-/issues/601
|
|
|
|
doc-features:
|
|
|
|
stage: check
|
|
|
|
image: debian:stable-slim
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- apt-get update && apt-get install -y python3-toml python-is-python3
|
2022-08-18 07:09:49 +01:00
|
|
|
- ./maint/check_doc_features
|
2023-01-26 20:06:52 +00:00
|
|
|
- ./maint/shebang
|
2022-06-08 19:14:27 +01:00
|
|
|
|
2023-03-21 11:54:20 +00:00
|
|
|
# This should always be in the last testing stage, so that if it fails all the other steps still run
|
|
|
|
# But it should run before any deployument.
|
|
|
|
blocking-todos:
|
|
|
|
stage: test
|
|
|
|
image: debian:stable-slim
|
|
|
|
script:
|
|
|
|
- apt update && apt install -y git
|
|
|
|
- ./maint/check_todos
|
|
|
|
|
2022-06-08 19:14:33 +01:00
|
|
|
rust-checks:
|
|
|
|
# This is too slow (and the cacheing of the "cargo build" too flaky) to be a "check"
|
2020-12-06 00:16:34 +00:00
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
2022-01-31 13:50:51 +00:00
|
|
|
- rustup show
|
2022-06-08 19:14:33 +01:00
|
|
|
- rustup component add rustfmt
|
2023-04-12 10:55:16 +01:00
|
|
|
- ./maint/via-cargo-install-in-ci cargo-sort cargo-license
|
2021-05-25 21:18:00 +01:00
|
|
|
- cargo fmt -- --check
|
2022-05-31 19:01:21 +01:00
|
|
|
- ./maint/check_licenses
|
2022-05-28 17:41:39 +01:00
|
|
|
- ./maint/cargo_sort
|
2022-06-16 13:59:45 +01:00
|
|
|
- ./maint/check_tree
|
2021-11-12 14:47:27 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
2022-05-28 17:41:39 +01:00
|
|
|
- cargo-sort
|
2022-05-31 19:01:21 +01:00
|
|
|
- cargo-license
|
2022-06-08 19:14:33 +01:00
|
|
|
|
2023-04-12 10:55:16 +01:00
|
|
|
cargo-audit:
|
|
|
|
# This can start to fail even when our code doesn't change.
|
|
|
|
# Usually the new advisory is not a huge concern.
|
|
|
|
# Run it last, separately, so if we think we may want to merge anyway,
|
|
|
|
# all the other tests will have been run.
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- rustup show
|
|
|
|
- ./maint/via-cargo-install-in-ci cargo-audit
|
|
|
|
- ./maint/cargo_audit
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- cargo-audit
|
|
|
|
|
2022-06-08 19:14:33 +01:00
|
|
|
rust-latest:
|
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- rustup show
|
2023-07-12 10:51:25 +01:00
|
|
|
- cargo build --locked --verbose --target x86_64-unknown-linux-gnu
|
2022-06-08 19:14:33 +01:00
|
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu
|
|
|
|
- rustup component add clippy
|
|
|
|
- rustup show
|
2022-06-23 19:13:12 +01:00
|
|
|
- cargo clippy --all-features --all-targets -- --cfg ci_arti_stable -D warnings
|
2022-06-08 19:14:33 +01:00
|
|
|
- cargo build --verbose --release -p arti-bench --target x86_64-unknown-linux-gnu
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- ./maint/preserve target/x86_64-unknown-linux-gnu/debug/arti target/x86_64-unknown-linux-gnu/release/arti-bench
|
|
|
|
- cargo clean
|
2021-09-27 16:35:32 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-10-21 19:10:39 +01:00
|
|
|
- artifacts
|
2021-09-27 16:35:32 +01:00
|
|
|
expire_in: 1 hours
|
2022-05-05 12:52:00 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2020-12-06 00:16:34 +00:00
|
|
|
|
2023-07-11 19:22:27 +01:00
|
|
|
rust-latest-arti-extra-features:
|
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- rustup show
|
|
|
|
# Build the arti binary for use in chutney and shadow integration tests.
|
|
|
|
#
|
|
|
|
# Note: we enable the `experimental-api` feature instead of `experimental`,
|
|
|
|
# because we don't want to build with `rpc` enabled. The `rpc` feature causes
|
|
|
|
# the RPC listener to try to bind to a Unix domain socket, and pathname Unix
|
|
|
|
# domain sockets are not currently supported by shadow.
|
|
|
|
#
|
|
|
|
# Consider enabling the rpc feature when shadow starts supporting pathname
|
|
|
|
# addresses, or when we add a config setting for disabling rpc.
|
|
|
|
- cargo build --verbose --target x86_64-unknown-linux-gnu --bin arti --features full,experimental-api,arti-client/keymgr
|
|
|
|
after_script:
|
|
|
|
- ./maint/preserve target/x86_64-unknown-linux-gnu/debug/arti
|
|
|
|
# Save the full-featured binary under a different name to prevent it from being
|
|
|
|
# overwritten by the other jobs that preserve the arti binary.
|
|
|
|
- mv artifacts/target/x86_64-unknown-linux-gnu/debug/arti artifacts/target/x86_64-unknown-linux-gnu/debug/arti-extra
|
|
|
|
- cargo clean
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- artifacts
|
|
|
|
expire_in: 1 hours
|
|
|
|
tags:
|
|
|
|
- amd64
|
|
|
|
|
2022-01-26 20:00:04 +00:00
|
|
|
rust-latest-async-std-rustls:
|
2021-03-02 17:21:38 +00:00
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
2022-01-31 13:50:51 +00:00
|
|
|
- rustup show
|
2022-01-26 20:00:04 +00:00
|
|
|
- rustup component add clippy
|
|
|
|
- cd crates/arti-client && cargo clippy --no-default-features --features=async-std,rustls
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- cargo clean
|
2021-09-08 21:15:20 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2021-03-02 17:21:38 +00:00
|
|
|
|
2020-12-06 00:16:34 +00:00
|
|
|
rust-nightly:
|
2022-02-25 16:38:52 +00:00
|
|
|
stage: test
|
2022-11-22 13:30:09 +00:00
|
|
|
image: rustlang/rust:nightly
|
|
|
|
# In case there is a bug in rust:nightly, you can instead pin an older
|
|
|
|
# version of the Docker image until that bug is fixed. To find the
|
|
|
|
# SHA256 ID of the last working version of nightly, look at the logs
|
|
|
|
# from the last successful CI run. Here is an example of how to do so:
|
|
|
|
#
|
|
|
|
# image: rustlang/rust@sha256:415b7c22ab4a8a3ec3efc9cc8d7b018964f0c6757fff27bbd110e0ed92566321
|
2020-12-06 00:16:34 +00:00
|
|
|
allow_failure: true
|
|
|
|
script:
|
2022-01-31 13:50:51 +00:00
|
|
|
- rustup show
|
2021-05-25 21:18:00 +01:00
|
|
|
- cargo build --verbose --target x86_64-unknown-linux-gnu --all-features
|
2021-11-12 15:22:47 +00:00
|
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
2020-12-07 17:51:03 +00:00
|
|
|
- rustup component add clippy
|
2021-11-04 15:13:29 +00:00
|
|
|
# We check these extra warnings on CI only, since we don't want to forbid them while developing.
|
2023-07-10 19:08:03 +01:00
|
|
|
|
2022-02-02 21:57:30 +00:00
|
|
|
# The --cfg allows us to write #![cfg_attr(ci_arti_nightly, allow(clippy::needless_borrow))]
|
|
|
|
# and similar, for when nightly clippy has false positives. (There is no builtin
|
|
|
|
# cfg flag for nightly, and a cargo "feature" would be bad with --all-features.)
|
2022-06-08 17:08:40 +01:00
|
|
|
- (echo; cat clippy-nightly.toml) >>clippy.toml
|
2023-06-21 11:29:18 +01:00
|
|
|
- cargo clippy --all-features --tests -- --cfg ci_arti_nightly -D clippy::dbg_macro
|
2022-08-17 20:13:13 +01:00
|
|
|
- RUSTDOCFLAGS="-Dwarnings --cfg docsrs" cargo doc --all-features --document-private-items --no-deps
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- cargo clean
|
2021-09-08 21:15:20 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2020-12-07 19:04:05 +00:00
|
|
|
|
2022-01-06 20:05:17 +00:00
|
|
|
coverage:
|
|
|
|
stage: test
|
2022-01-07 03:18:09 +00:00
|
|
|
image: rust:latest
|
2022-01-06 20:05:17 +00:00
|
|
|
script:
|
2022-01-27 05:48:11 +00:00
|
|
|
- apt-get update && apt-get install -y python3-pip python3-setuptools
|
2022-01-28 17:22:48 +00:00
|
|
|
- pip3 install beautifulsoup4 lxml
|
2023-01-27 14:56:09 +00:00
|
|
|
- rustup component add llvm-tools
|
2022-06-08 19:11:56 +01:00
|
|
|
- ./maint/via-cargo-install-in-ci grcov
|
2022-01-27 05:13:15 +00:00
|
|
|
# Generate report
|
2022-05-05 12:52:00 +01:00
|
|
|
- ./maint/with_coverage -f cobertura -o coverage.xml cargo test --verbose --all-features
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- cargo clean
|
2022-02-25 16:38:52 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- grcov
|
2022-01-06 20:05:17 +00:00
|
|
|
artifacts:
|
|
|
|
reports:
|
2022-05-23 11:14:09 +01:00
|
|
|
coverage_report:
|
|
|
|
coverage_format: cobertura
|
|
|
|
path: coverage.xml
|
2022-05-05 12:52:00 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2022-01-06 20:05:17 +00:00
|
|
|
|
2021-10-31 08:18:22 +00:00
|
|
|
minimal-versions:
|
|
|
|
stage: test
|
2023-07-04 19:35:59 +01:00
|
|
|
# when this reaches at least rust 1.68, we should enable crates-io sparse protocol
|
|
|
|
# (which becomes default in 1.70), to make builds faster.
|
2023-04-11 20:34:36 +01:00
|
|
|
image: rust:1.65
|
2021-10-31 08:18:22 +00:00
|
|
|
script:
|
|
|
|
- rustup install nightly
|
2022-02-03 18:14:57 +00:00
|
|
|
- ./maint/downgrade_dependencies
|
2021-11-12 15:22:47 +00:00
|
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- cargo clean
|
2021-10-31 08:18:22 +00:00
|
|
|
tags:
|
|
|
|
- amd64
|
|
|
|
|
2021-08-25 16:16:49 +01:00
|
|
|
build-repro:
|
2021-08-29 14:36:41 +01:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null
|
2021-08-25 16:16:49 +01:00
|
|
|
stage: build
|
2022-03-04 13:22:57 +00:00
|
|
|
# If you upgrade this image, also change the one in docker_reproducible_build
|
2023-04-13 12:31:20 +01:00
|
|
|
image: rust:1.68.2-alpine3.17
|
2021-08-25 16:16:49 +01:00
|
|
|
script:
|
2022-05-25 12:10:55 +01:00
|
|
|
- apk add bash
|
2022-02-17 17:56:33 +00:00
|
|
|
- ./maint/reproducible_build linux windows macos
|
2022-10-21 19:10:39 +01:00
|
|
|
# no after_script:, we don't build in the project dir
|
2021-08-25 16:16:49 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-08-29 12:48:33 +01:00
|
|
|
- arti-linux
|
|
|
|
- arti-windows.exe
|
2021-09-19 23:20:47 +01:00
|
|
|
- arti-macos
|
2021-08-25 16:16:49 +01:00
|
|
|
expire_in: 1 day
|
2021-09-19 23:20:47 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- osxcross/target
|
2021-08-31 17:24:49 +01:00
|
|
|
tags:
|
2022-06-16 15:01:07 +01:00
|
|
|
- tpa
|
2021-09-08 21:15:20 +01:00
|
|
|
- amd64
|
2021-09-27 16:35:32 +01:00
|
|
|
|
2022-08-30 19:45:12 +01:00
|
|
|
integration-chutney:
|
2021-09-27 16:35:32 +01:00
|
|
|
stage: test
|
2023-07-08 10:35:18 +01:00
|
|
|
# we use debian 11 as this is currently what rust:latest uses. When rust:latest gets updated,
|
|
|
|
# this should be changed to stable (and possibly shadow too).
|
|
|
|
image: debian:11-slim
|
2021-09-27 16:35:32 +01:00
|
|
|
script:
|
2022-10-21 19:10:39 +01:00
|
|
|
- ./maint/preserve -u
|
2021-09-27 16:35:32 +01:00
|
|
|
- apt update
|
2022-03-11 16:56:41 +00:00
|
|
|
- apt install -y tor git python3 curl dnsutils
|
2022-03-10 14:56:11 +00:00
|
|
|
- ./tests/chutney/setup proxy
|
2022-03-11 16:56:41 +00:00
|
|
|
- ./tests/chutney/test
|
2022-02-17 17:56:33 +00:00
|
|
|
- ./tests/chutney/stop-arti
|
2022-02-01 16:14:31 +00:00
|
|
|
- RUST_LOG=debug target/x86_64-unknown-linux-gnu/release/arti-bench -c ./chutney/net/nodes/arti.toml --socks5 127.0.0.1:9008 -o benchmark_results.json
|
2022-02-17 17:56:33 +00:00
|
|
|
- ./tests/chutney/teardown
|
2022-02-01 16:14:31 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- benchmark_results.json
|
2021-09-27 16:35:32 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2022-05-05 12:52:00 +01:00
|
|
|
|
2022-08-30 19:45:12 +01:00
|
|
|
integration-shadow:
|
|
|
|
variables:
|
|
|
|
JOB_SHADOW_REPO: "https://github.com/shadow/shadow.git"
|
|
|
|
JOB_SHADOW_BRANCH: "main"
|
2023-05-08 16:56:47 +01:00
|
|
|
JOB_SHADOW_COMMIT: "v3.0.0"
|
2022-08-30 19:45:12 +01:00
|
|
|
|
|
|
|
JOB_TGEN_REPO: "https://github.com/shadow/tgen.git"
|
|
|
|
JOB_TGEN_BRANCH: "main"
|
2023-05-08 16:57:40 +01:00
|
|
|
JOB_TGEN_COMMIT: "30c95bbe723ebe5e4d068adfd975b094e00dbe10"
|
2022-08-30 19:45:12 +01:00
|
|
|
stage: test
|
|
|
|
cache:
|
|
|
|
- key: $CI_JOB_NAME-shadow-$JOB_SHADOW_COMMIT
|
|
|
|
paths:
|
|
|
|
- opt/shadow
|
|
|
|
- key: $CI_JOB_NAME-tgen-$JOB_TGEN_COMMIT
|
|
|
|
paths:
|
|
|
|
- opt/tgen
|
|
|
|
image: debian:11-slim
|
|
|
|
script:
|
2022-10-21 19:10:39 +01:00
|
|
|
- ./maint/preserve -u
|
2022-12-05 17:41:23 +00:00
|
|
|
- ./maint/ci_log_span start "shadow_install_deps[collapsed=true]" "Installing shadow and tgen"
|
2022-08-30 19:45:12 +01:00
|
|
|
# We're going to install binaries to $HOME/.local/bin
|
|
|
|
- 'export PATH=$HOME/.local/bin:$PATH'
|
|
|
|
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y git tor stow
|
|
|
|
- mkdir -p ~/src
|
|
|
|
- mkdir -p ~/.local
|
|
|
|
|
|
|
|
# Build shadow
|
|
|
|
- |
|
|
|
|
if [ -f opt/shadow/bin/shadow ]
|
|
|
|
then
|
|
|
|
echo "Using shadow binary from cache"
|
|
|
|
else
|
|
|
|
echo "Building shadow"
|
|
|
|
git clone --shallow-since=2021-08-01 -b $JOB_SHADOW_BRANCH $JOB_SHADOW_REPO ~/src/shadow
|
|
|
|
pushd ~/src/shadow
|
|
|
|
git checkout $JOB_SHADOW_COMMIT
|
|
|
|
export CC=gcc CXX=g++ CONTAINER=debian:11-slim BUILDTYPE=release RUSTPROFILE=minimal
|
|
|
|
ci/container_scripts/install_deps.sh
|
|
|
|
ci/container_scripts/install_extra_deps.sh
|
|
|
|
export PATH="$HOME/.cargo/bin:${PATH}"
|
|
|
|
./setup build --jobs $(nproc) --prefix $CI_PROJECT_DIR/opt/shadow
|
|
|
|
./setup install
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
- apt-get install -y libglib2.0-0
|
|
|
|
- stow -d opt -t $HOME/.local shadow
|
|
|
|
|
|
|
|
# Build tgen
|
|
|
|
- |
|
|
|
|
if [ -f opt/tgen/bin/tgen ]
|
|
|
|
then
|
|
|
|
echo "Using tgen binary from cache"
|
|
|
|
else
|
|
|
|
echo "Building tgen"
|
|
|
|
git clone --shallow-since=2022-01-01 -b $JOB_TGEN_BRANCH $JOB_TGEN_REPO ~/src/tgen
|
|
|
|
pushd ~/src/tgen
|
|
|
|
git checkout $JOB_TGEN_COMMIT
|
|
|
|
apt-get install -y cmake gcc libglib2.0-0 libglib2.0-dev libigraph-dev make
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=$CI_PROJECT_DIR/opt/tgen
|
|
|
|
make --jobs $(nproc)
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
- apt-get install -y libigraph1 libglib2.0-0
|
|
|
|
- stow -d opt -t $HOME/.local tgen
|
|
|
|
|
|
|
|
# Ensure newly installed executables can be found
|
|
|
|
- hash -r
|
|
|
|
|
2022-11-30 17:38:42 +00:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y tshark
|
2022-12-05 17:41:23 +00:00
|
|
|
- ./maint/ci_log_span end "shadow_install_deps"
|
2022-11-30 17:38:42 +00:00
|
|
|
|
2022-08-30 19:45:12 +01:00
|
|
|
# Run tests
|
|
|
|
- pushd tests/shadow
|
|
|
|
- ./run.sh
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tests/shadow
|
|
|
|
when: always
|
|
|
|
expire_in: 1 week
|
|
|
|
tags:
|
|
|
|
- amd64
|
2022-10-19 20:18:40 +01:00
|
|
|
- tpa
|
2022-08-30 19:45:12 +01:00
|
|
|
|
2023-06-27 17:31:10 +01:00
|
|
|
rust-latest-test-all-features:
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- rustup show
|
|
|
|
- cargo test --target x86_64-unknown-linux-gnu --locked --workspace --all-features
|
|
|
|
after_script:
|
|
|
|
- ./maint/preserve target/x86_64-unknown-linux-gnu/debug/arti target/x86_64-unknown-linux-gnu/release/arti-bench
|
|
|
|
- cargo clean
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- artifacts
|
|
|
|
expire_in: 1 hours
|
|
|
|
tags:
|
|
|
|
- amd64
|
|
|
|
|
2023-06-14 18:33:32 +01:00
|
|
|
every-crate:
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
2023-07-04 19:35:59 +01:00
|
|
|
needs: ["rust-checks", "rust-latest-async-std-rustls"]
|
2023-06-14 18:33:32 +01:00
|
|
|
script:
|
|
|
|
- apt-get update && apt-get install -y python3-toml python-is-python3
|
|
|
|
- ./maint/every-crate
|
|
|
|
|
2022-10-17 16:56:51 +01:00
|
|
|
matrix-test:
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
2023-07-04 19:35:59 +01:00
|
|
|
needs: ["rust-checks", "rust-latest-async-std-rustls"]
|
2022-10-17 16:56:51 +01:00
|
|
|
script:
|
|
|
|
- apt-get update && apt-get install -y python3-toml python-is-python3
|
|
|
|
- ./maint/matrix_test
|
|
|
|
|
2022-11-29 16:29:59 +00:00
|
|
|
matrix-test-cfg:
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- ./maint/matrix_test_cfg
|
|
|
|
|
2022-10-17 16:56:51 +01:00
|
|
|
|
2022-05-05 12:52:00 +01:00
|
|
|
coverage-aggregated:
|
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
|
|
|
needs: []
|
|
|
|
script:
|
|
|
|
- apt update && apt install -y tor python3 python3-pip python3-setuptools curl
|
|
|
|
# install deps for report generation
|
|
|
|
- pip3 install beautifulsoup4 lxml
|
2023-01-27 14:56:09 +00:00
|
|
|
- rustup component add llvm-tools
|
2022-05-05 12:52:00 +01:00
|
|
|
- cp grcov $CARGO_HOME/bin/ || cargo install grcov
|
|
|
|
- cp $CARGO_HOME/bin/grcov .
|
|
|
|
# Generate report
|
|
|
|
- ./maint/coverage all
|
2022-10-21 19:10:39 +01:00
|
|
|
after_script:
|
|
|
|
- cargo clean
|
2022-05-05 12:52:00 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- grcov
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- coverage
|
|
|
|
tags:
|
|
|
|
- amd64
|
|
|
|
|
2022-11-10 13:34:17 +00:00
|
|
|
check-targets:
|
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
stage: test
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
|
|
|
- ./maint/cargo_check_target -il
|
|
|
|
after_script:
|
|
|
|
- cargo clean
|
|
|
|
|
2022-05-05 12:52:00 +01:00
|
|
|
pages:
|
|
|
|
rules:
|
2022-05-05 21:21:09 +01:00
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "main"
|
2022-05-05 12:52:00 +01:00
|
|
|
stage: deploy
|
|
|
|
image: debian:stable-slim
|
|
|
|
script:
|
|
|
|
- apt update && apt install -y git
|
|
|
|
# Export report as website, while keeping the existing public page
|
|
|
|
- git fetch
|
|
|
|
- git checkout origin/pages -- public/
|
|
|
|
- mv coverage public/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|