forked from rust-lang/measureme
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (100 loc) · 2.63 KB
/
rust.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
name: Rust
on:
push:
branches: [
master,
auto, # used for bors
try # used for bors
]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --verbose --all
- name: Run tests
run: cargo test --verbose --all
- name: Docs
run: cargo doc --verbose --all
build_beta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: beta
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all
- uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --all
build_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all
- uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --all
check_big_endian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: powerpc64-unknown-linux-gnu
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --verbose --lib --bins --tests
# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
end-success:
name: bors build finished
runs-on: ubuntu-latest
needs: [build_stable, build_beta, build_nightly, check_big_endian]
if: github.event.pusher.name == 'bors' && success()
steps:
- name: mark the job as a success
run: exit 0
end-failure:
name: bors build finished
runs-on: ubuntu-latest
needs: [build_stable, build_beta, build_nightly, check_big_endian]
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
steps:
- name: mark the job as a failure
run: exit 1