-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (40 loc) · 1.12 KB
/
.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
44
45
image: "edgarogh/rustre-ci:alpine"
# Cache dependencies for faster builds
# Taken from https://gitlab.com/yvan-sraka/rust-cache-example/-/blob/main/.gitlab-ci.yml
cache:
key:
files:
- Cargo.lock
paths:
- /usr/local/cargo/registry/index
- /usr/local/cargo/registry/cache
- /usr/local/cargo/git/db
- ./target
# Optional: Install a C compiler, cmake and git into the container.
# You will often need this when you (or any of your dependencies) depends on C code.
# before_script:
# - apt-get update -yqq
# - apt-get install -yqq --no-install-recommends build-essential
# Use a third party library to generate gitlab junit reports
test:junit-report:
script:
- cargo test -- --format=json -Z unstable-options --report-time | junitify --out $CI_PROJECT_DIR/tests/
artifacts:
when: always
reports:
junit: $CI_PROJECT_DIR/tests/*.xml
test:style:
script:
- cargo +nightly fmt --check
- cargo clippy -- -Dwarnings
# Deploy rustdoc to GitLab pages
pages:
only:
refs:
- main
script:
- cargo doc --verbose
- mv target/doc public
artifacts:
paths:
- public