-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
94 lines (88 loc) · 1.84 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
94 lines (88 loc) · 1.84 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
variables:
RUST_BACKTRACE: "1"
stages:
- test
- build
- deploy
rust-latest:
stage: test
cache:
key: latest
paths:
- target/
image: rust:latest
script:
- rustup component add rustfmt
- rustup component add clippy
- cargo build --verbose --locked
- cargo test --verbose --workspace
- cargo fmt --all --verbose -- --check
- cargo clippy --workspace --verbose -- -D clippy::all
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
- src/**/*
- crates/**/*
- Cargo.toml
- Cargo.lock
- build.rs
- .gitlab-ci.yml
rust-minimal:
stage: test
cache:
key: latest
paths:
- target/
image: rust:1.89
script:
- rustup component add rustfmt
- rustup component add clippy
- cargo build --verbose --locked
- cargo test --verbose --workspace
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
- src/**/*
- crates/**/*
- Cargo.toml
- Cargo.lock
- build.rs
- .gitlab-ci.yml
rust-nightly:
allow_failure: true
stage: test
image: rustlang/rust:nightly
script:
- cargo build --verbose --locked
- rustup component add clippy
- cargo test --verbose
- cargo clippy --workspace --verbose -- -D clippy::all
cache:
key: nightly
paths:
- target/
rules:
- if: $CI_RUN_NIGHTLY_COMPILER == "True"
release-linux:
stage: build
image: rust:latest
script:
- cargo build --release --locked --verbose
- ./scripts/create-realease-tarbal.sh
cache:
key: release-linux
paths:
- target/
artifacts:
paths:
- linux-build/
only:
- tags
cargo-audit:
stage: test
image: alpine:latest
script:
- apk add cargo-audit
- cargo-audit audit --deny warnings
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"