-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
63 lines (55 loc) · 1.29 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
image: affidaty/rust-buster-builder
variables:
DEPLOY_HOST: "10.200.0.100"
stages:
- lints
- build
- test
- deploy
lints:
stage: lints
script:
- cargo fmt --all -- --check
- cargo clippy --all -- -D warnings
build:
stage: build
dependencies:
- lints
script:
- cargo build
test:
stage: test
dependencies:
- build
script:
- cargo test
deploy_nightly:
stage: deploy
dependencies:
- test
only:
- master
script:
- cargo +nightly build --out-dir build -Z unstable-options
- strip build/trinci-node
- scp build/trinci-node runner@${DEPLOY_HOST}:trinci/nightly/trinci_new
deploy_staging:
stage: deploy
dependencies:
- test
only:
- tags
script:
- cargo +nightly build --out-dir $(pwd)/build -Z unstable-options
- strip build/trinci-node
- scp build/trinci-node runner@${DEPLOY_HOST}:trinci/staging/trinci_new
deploy_release:
stage: deploy
dependencies:
- test
only:
- tags
script:
- cargo +nightly build --release --out-dir $(pwd)/build -Z unstable-options
- strip build/trinci-node
- scp build/trinci-node runner@${DEPLOY_HOST}:trinci/release/trinci_new