Skip to content

Commit 7888d40

Browse files
committed
Merge branch 'master' into winxp
2 parents 95d0fe8 + 6f11660 commit 7888d40

File tree

6 files changed

+187
-322
lines changed

6 files changed

+187
-322
lines changed

.github/workflows/tests.yml

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
branches: master
8+
schedule:
9+
- cron: "0 12 * * 1"
10+
11+
env:
12+
CARGO_INCREMENTAL: 0
13+
RUSTFLAGS: "-Dwarnings"
14+
15+
jobs:
16+
check-doc:
17+
name: Doc deadlinks
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Install toolchain
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
toolchain: nightly
26+
override: true
27+
- run: cargo install cargo-deadlinks
28+
- run: cargo deadlinks -- --features custom
29+
30+
main-tests:
31+
name: Main tests
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
matrix:
35+
os: [ubuntu-latest, macos-latest, windows-latest]
36+
toolchain: [nightly, beta, stable, 1.34]
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Install toolchain
40+
uses: actions-rs/toolchain@v1
41+
with:
42+
profile: minimal
43+
toolchain: ${{ matrix.toolchain }}
44+
override: true
45+
- run: cargo test
46+
- run: cargo test --features std
47+
- if: ${{ matrix.toolchain == 'nightly' }}
48+
run: cargo build --benches
49+
50+
linux-tests:
51+
name: Additional Linux targets
52+
runs-on: ubuntu-latest
53+
strategy:
54+
matrix:
55+
target: [
56+
x86_64-unknown-linux-musl,
57+
i686-unknown-linux-gnu,
58+
i686-unknown-linux-musl,
59+
]
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Install toolchain
63+
uses: actions-rs/toolchain@v1
64+
with:
65+
profile: minimal
66+
target: ${{ matrix.target }}
67+
toolchain: stable
68+
override: true
69+
- run: sudo apt install gcc-multilib
70+
- run: cargo test --target ${{ matrix.target }}
71+
72+
windows-tests:
73+
name: Additional Windows targets
74+
runs-on: windows-latest
75+
strategy:
76+
matrix:
77+
toolchain: [
78+
stable-x86_64-gnu,
79+
stable-i686-gnu,
80+
stable-i686-msvc,
81+
]
82+
steps:
83+
- uses: actions/checkout@v2
84+
- name: Install toolchain
85+
uses: actions-rs/toolchain@v1
86+
with:
87+
profile: minimal
88+
toolchain: ${{ matrix.toolchain }}
89+
override: true
90+
- run: cargo test
91+
92+
cross-tests:
93+
name: Cross tests
94+
runs-on: ${{ matrix.os }}
95+
strategy:
96+
matrix:
97+
include:
98+
- os: ubuntu-latest
99+
target: mips-unknown-linux-gnu
100+
toolchain: stable
101+
steps:
102+
- uses: actions/checkout@v2
103+
- name: Install toolchain
104+
uses: actions-rs/toolchain@v1
105+
with:
106+
profile: minimal
107+
target: ${{ matrix.target }}
108+
toolchain: ${{ matrix.toolchain }}
109+
override: true
110+
- name: Cache cargo plugins
111+
uses: actions/cache@v1
112+
with:
113+
path: ~/.cargo/bin/
114+
key: ${{ runner.os }}-cargo-plugins
115+
- name: Install cross
116+
run: cargo install cross || true
117+
- name: Test
118+
run: cross test --no-fail-fast --target ${{ matrix.target }}
119+
120+
build:
121+
name: Build-only
122+
runs-on: ubuntu-latest
123+
strategy:
124+
matrix:
125+
target: [
126+
x86_64-sun-solaris,
127+
x86_64-unknown-freebsd,
128+
x86_64-fuchsia,
129+
x86_64-unknown-netbsd,
130+
x86_64-unknown-redox,
131+
x86_64-fortanix-unknown-sgx,
132+
]
133+
steps:
134+
- uses: actions/checkout@v2
135+
- name: Install toolchain
136+
uses: actions-rs/toolchain@v1
137+
with:
138+
profile: minimal
139+
target: ${{ matrix.target }}
140+
toolchain: nightly
141+
override: true
142+
- name: Build
143+
run: cargo build --target ${{ matrix.target }}
144+
145+
build-rdrand:
146+
name: Build-only RDRAND
147+
runs-on: ubuntu-latest
148+
steps:
149+
- uses: actions/checkout@v2
150+
- name: Install toolchain
151+
uses: actions-rs/toolchain@v1
152+
with:
153+
profile: minimal
154+
toolchain: nightly
155+
components: rust-src
156+
override: true
157+
- name: Cache cargo plugins
158+
uses: actions/cache@v1
159+
with:
160+
path: ~/.cargo/bin/
161+
key: ${{ runner.os }}-cargo-plugins
162+
- name: Install xbuild
163+
run: cargo install cargo-xbuild || true
164+
- name: UEFI
165+
run: cargo xbuild --features=rdrand --target x86_64-unknown-uefi
166+
- name: Hermit
167+
run: cargo xbuild --features=rdrand --target x86_64-unknown-hermit
168+
- name: L4Re
169+
run: cargo xbuild --features=rdrand --target x86_64-unknown-l4re-uclibc
170+
- name: VxWorks
171+
run: cargo xbuild --features=rdrand --target x86_64-wrs-vxworks
172+
173+
clippy-fmt:
174+
name: Clippy + rustfmt
175+
runs-on: ubuntu-latest
176+
steps:
177+
- uses: actions/checkout@v1
178+
- uses: actions-rs/toolchain@v1
179+
with:
180+
profile: minimal
181+
toolchain: stable
182+
components: rustfmt, clippy
183+
- name: clippy
184+
run: cargo clippy --all
185+
- name: fmt
186+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)