-
Notifications
You must be signed in to change notification settings - Fork 77
68 lines (58 loc) · 1.68 KB
/
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
name: CI
on:
pull_request:
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"
push:
paths:
- "**.rs"
- "**.toml"
- "**.lock"
- ".github/workflows/*.yml"
branches: [master]
jobs:
Check_Formatting:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: rustfmt
- name: Check Formatting
run: cargo +stable fmt --all -- --check
Tests:
strategy:
fail-fast: false
matrix:
rust_version: [stable, beta, nightly]
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }}
targets: ${{ matrix.platform.target }}
- name: Check documentation
shell: bash
run: cargo doc --no-deps --target ${{ matrix.platform.target }}
- name: Build
shell: bash
run: cargo build --verbose --target ${{ matrix.platform.target }}
- name: Build tests
shell: bash
run: cargo test --no-run --verbose --target ${{ matrix.platform.target }}
- name: Run tests
shell: bash
run: cargo test --verbose --target ${{ matrix.platform.target }}