-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
101 lines (95 loc) · 2.13 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
stages:
- lint
- test
- coverage
- build
- package
- doc
include:
- local: '/ci/lint.yml'
- local: '/ci/linux.yml'
- local: '/ci/linux-arm.yml'
- local: '/ci/windows.yml'
- local: '/ci/macos.yml'
test:coverage:
stage: coverage
image: "xd009642/tarpaulin"
script:
- export RUSTFLAGS=""
- apt-get update
- apt-get install curl git -y
- env
- cargo tarpaulin --out Xml -t 600 --ignore-tests --force-clean --output-dir tarp
after_script:
- bash <(curl -s https://codecov.io/bash) -f tarp/cobertura.xml
tags:
- linux-own
allow_failure: true
needs: []
services:
- name: registry.gitlab.com/asuran-rs/sftp-docker:latest
alias: sftp
command:
- "asuran:asuran:::asuran"
artifacts:
reports:
cobertura: tarp/cobertura.xml
variables:
ASURAN_SFTP_HOSTNAME: "sftp"
ASURAN_SFTP_PORT: "22"
ASURAN_SFTP_USER: "asuran"
ASURAN_SFTP_PASS: "asuran"
dependencies: []
package:normal:
stage: package
image: "ubuntu"
script:
- echo "This stage only exists to combine all three binaries into a single archive"
dependencies:
- build:linux
- build:macos
- build:windows
- build:linux-arm
artifacts:
paths:
- asuran-cli-linux-x64
- asuran-cli-win64.exe
- asuran-cli-darwin
- asuran-cli-linux-aarch64
expire_in: 4 weeks
except:
- tags
package:release:
stage: package
image: "ubuntu"
script:
- echo "This stage only exists to combine all three binaries into a single archive"
dependencies:
- build:linux
- build:macos
- build:windows
- build:linux-arm
artifacts:
paths:
- asuran-cli-linux-x64
- asuran-cli-win64.exe
- asuran-cli-darwin
- asuran-cli-linux-aarch64
only:
- tags
pages:
stage: doc
image: "registry.gitlab.com/asuran-rs/rust-sccache-docker:latest"
script:
- cargo doc --no-deps --document-private-items
- mv target/doc public
- echo '<meta http-equiv="refresh" content="0; url=asuran">' > public/index.html
artifacts:
paths:
- public
- target
needs: []
tags:
- linux
only:
- master