.gitlab-ci.yml 1.56 KB
Newer Older
Alexander Færøy's avatar
Alexander Færøy committed
1
2
3
stages:
  - build

4
5
6
7
variables:
  # We don't need Husky to install the Git hooks for CI.
  CARGO_HUSKY_DONT_INSTALL_HOOKS: "true"

Alexander Færøy's avatar
Alexander Færøy committed
8
9
10
11
rust-latest:
  stage: build
  image: rust:latest
  script:
12
13
    - cargo build --verbose --target x86_64-unknown-linux-gnu
    - cargo test --verbose
14
    - rustup component add clippy rustfmt
daniel.eades's avatar
daniel.eades committed
15
    - cargo clippy --all-features --tests -- -D warnings
16
    - cargo fmt -- --check
17
    - cargo install cargo-audit
18
    - cargo audit -D warnings
19
20
21
    - cp misc/Cargo.lock Cargo.lock
    - cargo fetch
    - diff misc/Cargo.lock Cargo.lock || (echo 'Some new dependancies were added. Please run "./maint/reproducible_update_cargolock.sh" and commit.' && false)
trinity-1686a's avatar
trinity-1686a committed
22
23
  tags:
    - amd64
Alexander Færøy's avatar
Alexander Færøy committed
24

25
26
27
28
rust-latest-async-std:
  stage: build
  image: rust:latest
  script:
Nick Mathewson's avatar
Nick Mathewson committed
29
    - cd crates/tor-client && cargo check --no-default-features --features=async-std
trinity-1686a's avatar
trinity-1686a committed
30
31
  tags:
    - amd64
32

Alexander Færøy's avatar
Alexander Færøy committed
33
34
35
36
37
rust-nightly:
  stage: build
  image: rustlang/rust:nightly
  allow_failure: true
  script:
38
39
    - cargo build --verbose --target x86_64-unknown-linux-gnu --all-features
    - cargo test --verbose --all-features
40
    - rustup component add clippy
41
42
    - cargo clippy --all-features
    - RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
trinity-1686a's avatar
trinity-1686a committed
43
44
  tags:
    - amd64
45

46
build-repro:
trinity-1686a's avatar
trinity-1686a committed
47
48
49
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
    - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null
50
51
52
53
54
55
  stage: build
  image: rust:1.54.0-alpine3.14
  script:
    - ./maint/reproducible_build.sh
  artifacts:
    paths:
56
57
      - arti-linux
      - arti-windows.exe
58
    expire_in: 1 day
59
60
  tags:
    - TPA
trinity-1686a's avatar
trinity-1686a committed
61
    - amd64