-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
116 lines (106 loc) · 2.71 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
stages:
- style
- build
- analyze
format:
image: alexshcdr/rustc-x86_64-debian11
stage: style
script:
- cargo fmt --check
tags:
- docker
x86_64-debian:11:
image: alexshcdr/rustc-x86_64-debian11
stage: build
script:
- cargo build --release
- cargo test --release
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_SHA}
expire_in: 1 days
paths:
- target/release/slave*
tags:
- docker
x86_64-windows-mingw:
image: alexshcdr/rustc-x86_64-windows
stage: build
script:
- cargo build --release --target x86_64-pc-windows-gnu
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_SHA}
expire_in: 1 days
paths:
- target/x86_64-pc-windows-gnu/release/slave*
tags:
- docker
armv7-debian:11:
image: alexshcdr/rustc-armv7-debian11
stage: build
script:
- cargo build --release --target=armv7-unknown-linux-gnueabihf
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_SHA}
expire_in: 1 days
paths:
- target/armv7-unknown-linux-gnueabihf/release/slave*
tags:
- docker
aarch64-debian:11:
image: alexshcdr/rustc-aarch64-debian11
stage: build
script:
- cargo build --release --target=aarch64-unknown-linux-gnu
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_SHA}
expire_in: 1 days
paths:
- target/aarch64-unknown-linux-gnu/release/slave*
tags:
- docker
clippy:
image: alexshcdr/rustc-x86_64-debian11
stage: analyze
needs: [format]
script:
- cargo clippy
tags:
- docker
coverage:
image: alexshcdr/rustc-x86_64-debian11
stage: analyze
needs: [format]
before_script:
- curl -L https://github.com/mozilla/grcov/releases/download/v0.8.12/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
script:
- export RUSTFLAGS="-Cinstrument-coverage"
- export LLVM_PROFILE_FILE="reports-%p-%m.profraw"
- cargo build
- cargo test
- ./grcov . -s . --binary-path ./target/ --ignore "tools/*" -t html --branch --ignore-not-existing -o ./html
- ./grcov . -s . --binary-path ./target/ --ignore "tools/*" -t cobertura --branch --ignore-not-existing -o coverage.xml
- ./grcov . -s . --binary-path ./target/ --ignore "tools/*" -t lcov --branch --ignore-not-existing --ignore '/*' -o coverage.lcov
- lcov --summary ./coverage.lcov
coverage: /^\s*lines\.*\:\s*[0-9]+.[0-9]+%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_SHA}
expire_in: 1 days
paths:
- html
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
tags:
- docker
miri:
image: alexshcdr/rustc-x86_64-debian11
stage: analyze
needs: [format]
script:
- rustup default nightly
- rustup component add miri
- rustup update
- cargo miri test
tags:
- docker