-
Notifications
You must be signed in to change notification settings - Fork 26
/
.gitlab-ci.yml
73 lines (64 loc) · 1.87 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
stages:
- checkstyle
- test
- build
variables: &default-vars
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
.test: &test
script:
- cargo test --workspace
.build: &build
script:
- cargo build --locked --all
- cargo doc -p subwasm -p subwasmlib -p wasm-loader -p wasm-testbed -p substrate-runtime-proposal-hash --all-features --no-deps
.only: &only
only:
- triggers
- tags
- master
- schedules
- web
- /^[0-9]+$/
.only_tags: &only_tags
only:
- triggers
- tags
.docker-env: &docker-env
image: rust:latest
before_script:
- rustup show
- cargo --version
# - sccache -s
variables:
<<: *default-vars
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
interruptible: true
tags:
- docker
checkstyle-linux-stable:
stage: checkstyle
<<: *only
<<: *docker-env
script:
- rustup component add rustfmt clippy
- cargo fmt --all -- --check
- cargo clippy
allow_failure: false
test-linux-stable:
stage: test
<<: *docker-env
<<: *only
<<: *test
build:
stage: build
<<: *docker-env
<<: *only_tags
<<: *build