summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 8d95b402f1727f9baa9cc43d0dab516602b565de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
    - rustup component add clippy rustfmt
    - cargo clippy --all-features --tests -- -D warnings
    - cargo fmt -- --check
    - cargo install cargo-audit
    - ./maint/cargo_audit.sh
  tags:
    - amd64
  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 --all-features
    - rustup component add clippy
    - cargo clippy --all-features
    - RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
  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