-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
43 lines (43 loc) · 881 Bytes
/
.gitlab-ci.yml
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
image: "rustlang/rust:nightly"
services:
- docker:dind
variables:
DOCKER_TLS_CERTDIR: ""
stages:
- verify
- build
- publish
test:cargo:
stage: verify
cache:
key: "cache-test"
paths:
- ./target
script:
- rustc --version && cargo --version
- rustup component add rustfmt
- rustup component add clippy-preview
- cargo fmt --verbose
- cargo clippy --verbose
- cargo test --all --verbose
release:cargo:
stage: build
cache:
key: "cache-release"
paths:
- ./target
script:
- cargo build --release --verbose
artifacts:
paths:
- target/release/$CI_PROJECT_NAME
doc:cargo:
stage: build
script:
- cargo doc --no-deps
publish:cargo:
stage: publish
script:
- cargo publish --verbose --token $CARGO_TOKEN
only:
- tags