-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
189 lines (169 loc) · 3.92 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
variables:
CARGO_HOME: $CI_PROJECT_DIR/.cargo
RUST_BACKTRACE: 1
stages:
- build
- test
- build_doc
- deploy_doc
cache: &cache_template
key: ${CI_COMMIT_REF_SLUG}
paths:
- target
- .cargo
policy: pull-push
.cache_pull_template: &cache_pull_template
cache:
<<: *cache_template
policy: pull
build::default:
image: rust:latest
stage: build
script:
- cargo build --all
cache:
<<: *cache_template
build::1.56.1:
<<: *cache_pull_template
needs:
- build::default
image: rust:1.56.1
stage: build
script:
- cargo build
build::features:
image: rust:latest
needs:
- build::default
stage: build
script:
- cargo build --features "blocking"
- cargo build --features "minimal_traits"
- cargo build --no-default-features
cache:
<<: *cache_template
build::rustls_features:
image: rust:alpine
needs:
- build::default
stage: build
script:
- apk add --no-cache clang musl-dev
- cargo build --features "blocking rustls" --no-default-features
- cargo build --features "rustls" --no-default-features
cache:
<<: *cache_template
.test_template: &test_template
<<: *cache_pull_template
variables:
ARANGO_ROOT_PASSWORD: test
DB_HOST: http://arangodb:8529
DB_NAME: _system
DB_USER: root
DB_PASSWORD: test
SCHEMA_PATH: tests/schema.yaml
services:
- arangodb:latest
stage: test
before_script:
- rustup show
- cargo -V
test:default:
image: rust:latest
<<: *test_template
script:
- cargo test --tests -- --test-threads=1
test:doc:
image: rust:latest
<<: *test_template
script:
- cargo test --doc -- --test-threads=1
test:features:
image: rust:latest
<<: *test_template
script:
- cargo test --features "derive" --no-default-features --tests -- --test-threads=1
- cargo test --features "blocking derive" --no-default-features --tests -- --test-threads=1
- cargo test --features "minimal_traits" --tests -- --test-threads=1
test:rustls-features:
image: rust:alpine
<<: *test_template
script:
- apk add --no-cache clang musl-dev
- cargo test --features "rustls derive" --no-default-features --tests -- --test-threads=1
- cargo test --features "blocking rustls derive" --no-default-features --tests -- --test-threads=1
test:packages:
image: rust:latest
<<: *test_template
script:
- cargo test --package aragog_cli --no-default-features
test:clippy:
image: rust:latest
<<: *test_template
script:
- rustup component add clippy
- cargo clippy --all --tests -- -D warnings
- cargo clippy --all --tests --all-features -- -D warnings
test:examples:
image: rust:latest
<<: *test_template
script:
- cargo run --example simple_example
- cargo run --example graph_example
- cargo run --example transaction_example
- cargo run --example boxed_example
test::rustfmt:
<<: *cache_pull_template
image: rust:latest
stage: test
script:
- rustup component add rustfmt
- cargo fmt --all -- --check
rustdoc:
<<: *cache_pull_template
image: rust:latest
stage: build_doc
variables:
PKG_NAME: aragog
script:
- cargo --version
- cargo rustdoc -p $PKG_NAME --target-dir public/rustdoc -- -D warnings
artifacts:
paths:
- public
build::mdbook:
image: registry.gitlab.com/qonfucius/infrastructure/docker-images/mdbook-alpine
stage: build_doc
variables:
MDBOOK_OUTPUT__HTML__SITE_URL: $CI_PAGES_URL/book
script:
- cargo --version
- mdbook build -d public/book
artifacts:
paths:
- public
build::website:
image: node:lts
stage: build_doc
variables:
CUSTOM_DOMAIN: http://localhost
script:
- cd docs/aragog-docs
- npm ci
- npm run generate
- cp -r dist ../../public
artifacts:
paths:
- public
pages:
script: ls
needs:
- build::mdbook
- build::website
stage: deploy_doc
artifacts:
paths:
- public
only:
refs:
- master