-
Notifications
You must be signed in to change notification settings - Fork 256
189 lines (179 loc) · 4.95 KB
/
tests.yml
File metadata and controls
189 lines (179 loc) · 4.95 KB
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
name: Tests
on:
push:
branches: master
pull_request:
branches: master
schedule:
- cron: "0 12 * * 1"
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
jobs:
check-doc:
name: Doc deadlinks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: cargo install cargo-deadlinks
- run: cargo deadlinks -- --features custom
main-tests:
name: Main tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [nightly, beta, stable, 1.34]
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- run: cargo test
- run: cargo test --features std
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo build --benches
linux-tests:
name: Additional Linux targets
runs-on: ubuntu-latest
strategy:
matrix:
target: [
x86_64-unknown-linux-musl,
i686-unknown-linux-gnu,
i686-unknown-linux-musl,
]
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: stable
override: true
# update is needed to fix the 404 error on install, see:
# https://github.com/actions/virtual-environments/issues/675
- run: sudo apt-get update
- run: sudo apt-get install gcc-multilib
- run: cargo test --target ${{ matrix.target }}
windows-tests:
name: Additional Windows targets
runs-on: windows-latest
strategy:
matrix:
toolchain: [
stable-x86_64-gnu,
stable-i686-gnu,
stable-i686-msvc,
]
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- run: cargo test
cross-tests:
name: Cross tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: mips-unknown-linux-gnu
toolchain: stable
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
override: true
- name: Cache cargo plugins
uses: actions/cache@v1
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins
- name: Install cross
run: cargo install cross || true
- name: Test
run: cross test --no-fail-fast --target ${{ matrix.target }}
build:
name: Build-only
runs-on: ubuntu-latest
strategy:
matrix:
target: [
x86_64-sun-solaris,
x86_64-unknown-freebsd,
x86_64-fuchsia,
x86_64-unknown-netbsd,
x86_64-unknown-redox,
x86_64-fortanix-unknown-sgx,
]
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: nightly
override: true
- name: Build
run: cargo build --target ${{ matrix.target }}
build-rdrand:
name: Build-only RDRAND
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rust-src
override: true
- name: Cache cargo plugins
uses: actions/cache@v1
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins
- name: Install xbuild
run: cargo install cargo-xbuild || true
- name: UEFI
run: cargo xbuild --features=rdrand --target x86_64-unknown-uefi
- name: Hermit
run: cargo xbuild --features=rdrand --target x86_64-unknown-hermit
- name: L4Re
run: cargo xbuild --features=rdrand --target x86_64-unknown-l4re-uclibc
- name: VxWorks
run: cargo xbuild --features=rdrand --target x86_64-wrs-vxworks
clippy-fmt:
name: Clippy + rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: clippy
run: cargo clippy --all
- name: fmt
run: cargo fmt --all -- --check