2020-12-06 00:16:34 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2021-09-27 16:35:32 +01:00
|
|
|
- test
|
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"
|
|
|
|
|
2020-12-06 00:16:34 +00:00
|
|
|
rust-latest:
|
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
2021-05-25 21:18:00 +01:00
|
|
|
- cargo build --verbose --target x86_64-unknown-linux-gnu
|
2021-11-12 15:22:47 +00:00
|
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu
|
2020-12-07 17:41:28 +00:00
|
|
|
- rustup component add clippy rustfmt
|
2021-12-09 15:42:36 +00:00
|
|
|
- cargo clippy --all-features --all-targets -- -D warnings
|
2021-05-25 21:18:00 +01:00
|
|
|
- cargo fmt -- --check
|
2021-11-12 14:47:27 +00:00
|
|
|
- cp cargo-audit $CARGO_HOME/bin/ || cargo install cargo-audit
|
2021-10-17 15:39:19 +01:00
|
|
|
- ./maint/cargo_audit.sh
|
2021-11-12 14:47:27 +00:00
|
|
|
- cp $CARGO_HOME/bin/cargo-audit .
|
2021-09-08 21:15:20 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|
2021-11-12 14:47:27 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- cargo-audit
|
2021-09-27 16:35:32 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target/x86_64-unknown-linux-gnu/debug/arti
|
|
|
|
expire_in: 1 hours
|
2020-12-06 00:16:34 +00:00
|
|
|
|
2021-03-02 17:21:38 +00:00
|
|
|
rust-latest-async-std:
|
|
|
|
stage: build
|
|
|
|
image: rust:latest
|
|
|
|
script:
|
2021-10-21 19:15:13 +01:00
|
|
|
- cd crates/arti-client && cargo check --no-default-features --features=async-std
|
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:
|
|
|
|
stage: build
|
|
|
|
image: rustlang/rust:nightly
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
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.
|
2021-12-09 15:42:36 +00:00
|
|
|
- cargo clippy --all-features --tests -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
|
2021-05-25 21:18:00 +01:00
|
|
|
- RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
|
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
|
|
|
|
image: rustlang/rust:nightly
|
|
|
|
variables:
|
|
|
|
RUSTFLAGS: "-Zinstrument-coverage"
|
|
|
|
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw"
|
|
|
|
script:
|
|
|
|
- rustup component add llvm-tools-preview
|
|
|
|
- cargo test
|
|
|
|
# generate html report
|
|
|
|
- cargo install grcov
|
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*cargo*" -o ./coverage/
|
|
|
|
# generate cobertura report for gitlab integration
|
|
|
|
- pip3 install lcov_cobertura
|
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" -o coverage.lcov
|
|
|
|
- python3 /usr/local/lib/python3.5/dist-packages/lcov_cobertura.py coverage.lcov
|
|
|
|
# output coverage summary for gitlab parsing
|
|
|
|
- apt-get update && apt-get install -y lcov
|
|
|
|
- lcov --summary coverage.lcov
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- 'coverage'
|
|
|
|
reports:
|
|
|
|
cobertura: coverage.xml
|
|
|
|
|
2021-10-31 08:18:22 +00:00
|
|
|
minimal-versions:
|
|
|
|
stage: test
|
2021-12-09 10:51:39 +00:00
|
|
|
image: rust:1.53
|
2021-10-31 08:18:22 +00:00
|
|
|
script:
|
|
|
|
- rustup install nightly
|
|
|
|
- cargo +nightly update -Z minimal-versions
|
|
|
|
- cargo update -p crc32fast -p lexical-core -p synstructure:0.12.0 # failing deps of deps
|
|
|
|
- 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
|
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
|
|
|
|
image: rust:1.54.0-alpine3.14
|
|
|
|
script:
|
2021-09-19 20:38:07 +01:00
|
|
|
- ./maint/reproducible_build.sh linux windows macos
|
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:
|
|
|
|
- TPA
|
2021-09-08 21:15:20 +01:00
|
|
|
- amd64
|
2021-09-27 16:35:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
integration:
|
|
|
|
stage: test
|
|
|
|
image: debian:stable-slim
|
|
|
|
script:
|
|
|
|
- apt update
|
|
|
|
- apt install -y tor git python3 curl
|
2021-09-28 18:36:00 +01:00
|
|
|
- ./tests/chutney/setup.sh
|
2021-09-27 16:35:32 +01:00
|
|
|
- curl http://example.com -vs --socks5-hostname 127.0.0.1:9150 -o /dev/null
|
2021-09-28 18:36:00 +01:00
|
|
|
- ./tests/chutney/teardown.sh
|
2021-09-27 16:35:32 +01:00
|
|
|
tags:
|
|
|
|
- amd64
|