Skip to content

Commit 47bff04

Browse files
committed
Create ci.yml
1 parent 5e07710 commit 47bff04

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTDOCFLAGS: "--deny warnings"
12+
RUSTFLAGS: "--deny warnings"
13+
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
toolchain: ["nightly", "stable", "beta"]
21+
os: ["windows-latest"]
22+
target: ["x86_64-pc-windows-msvc", "x86_64-pc-windows-gnu", "i686-pc-windows-msvc"]
23+
steps:
24+
- uses: actions/checkout@v6
25+
26+
- name: Install latest rust ${{ matrix.toolchain }} for ${{ matrix.target }}
27+
uses: dtolnay/rust-toolchain@master
28+
with:
29+
target: ${{ matrix.target }}
30+
toolchain: ${{ matrix.toolchain }}
31+
32+
- name: Build
33+
run: cargo build --target ${{ matrix.target }} --all-targets
34+
35+
- name: Test
36+
run: cargo test --target ${{ matrix.target }} --all-targets --all-features -- --nocapture
37+
38+
documentation:
39+
runs-on: windows-latest
40+
steps:
41+
- uses: actions/checkout@v6
42+
- name: Install latest beta
43+
uses: dtolnay/rust-toolchain@beta
44+
- name: Generate documentation
45+
run: cargo doc --all-features
46+
- name: Install cargo-deadlinks
47+
run: cargo install cargo-deadlinks
48+
- name: Check dead links in doc
49+
run: cargo deadlinks
50+
51+
clippy:
52+
runs-on: windows-latest
53+
steps:
54+
- uses: actions/checkout@v6
55+
- name: Install latest beta
56+
uses: dtolnay/rust-toolchain@beta
57+
with:
58+
components: clippy
59+
- name: Clippy check
60+
run: cargo clippy --all-features
61+
62+
fmt:
63+
runs-on: windows-latest
64+
steps:
65+
- uses: actions/checkout@v6
66+
- name: Install latest beta
67+
uses: dtolnay/rust-toolchain@beta
68+
with:
69+
components: rustfmt
70+
- name: Format check
71+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)