98 lines
2.6 KiB
YAML
98 lines
2.6 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
|
|
variables:
|
|
# We don't need Husky to install the Git hooks for CI.
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: "true"
|
|
|
|
rust-latest:
|
|
stage: build
|
|
image: rust:latest
|
|
script:
|
|
- cargo build --verbose --target x86_64-unknown-linux-gnu
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu
|
|
- rustup component add clippy rustfmt
|
|
- cargo clippy --all-features --tests -- -D warnings
|
|
- cargo fmt -- --check
|
|
- cp cargo-audit $CARGO_HOME/bin/ || cargo install cargo-audit
|
|
- ./maint/cargo_audit.sh
|
|
- cp $CARGO_HOME/bin/cargo-audit .
|
|
tags:
|
|
- amd64
|
|
cache:
|
|
paths:
|
|
- cargo-audit
|
|
artifacts:
|
|
paths:
|
|
- target/x86_64-unknown-linux-gnu/debug/arti
|
|
expire_in: 1 hours
|
|
|
|
rust-latest-async-std:
|
|
stage: build
|
|
image: rust:latest
|
|
script:
|
|
- cd crates/arti-client && cargo check --no-default-features --features=async-std
|
|
tags:
|
|
- amd64
|
|
|
|
rust-nightly:
|
|
stage: build
|
|
image: rustlang/rust:nightly
|
|
allow_failure: true
|
|
script:
|
|
- cargo build --verbose --target x86_64-unknown-linux-gnu --all-features
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
|
- rustup component add clippy
|
|
# We check these extra warnings on CI only, since we don't want to forbid them while developing.
|
|
- cargo clippy --all-features -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
|
|
- RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
|
|
tags:
|
|
- amd64
|
|
|
|
minimal-versions:
|
|
stage: test
|
|
image: rust:1.53
|
|
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
|
|
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
|
tags:
|
|
- amd64
|
|
|
|
build-repro:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null
|
|
stage: build
|
|
image: rust:1.54.0-alpine3.14
|
|
script:
|
|
- ./maint/reproducible_build.sh linux windows macos
|
|
artifacts:
|
|
paths:
|
|
- arti-linux
|
|
- arti-windows.exe
|
|
- arti-macos
|
|
expire_in: 1 day
|
|
cache:
|
|
paths:
|
|
- osxcross/target
|
|
tags:
|
|
- TPA
|
|
- amd64
|
|
|
|
|
|
integration:
|
|
stage: test
|
|
image: debian:stable-slim
|
|
script:
|
|
- apt update
|
|
- apt install -y tor git python3 curl
|
|
- ./tests/chutney/setup.sh
|
|
- curl http://example.com -vs --socks5-hostname 127.0.0.1:9150 -o /dev/null
|
|
- ./tests/chutney/teardown.sh
|
|
tags:
|
|
- amd64
|