-
-
Notifications
You must be signed in to change notification settings - Fork 5
99 lines (78 loc) · 2.08 KB
/
build.yaml
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
name: Build
on:
push:
branches: ["**"]
tags-ignore: ["**"]
paths-ignore:
- "**.md"
- LICENSE-Apache
- LICENSE-MIT
pull_request:
paths-ignore:
- "**.md"
- LICENSE-Apache
- LICENSE-MIT
jobs:
powerset:
name: Type checking (${{ matrix.rust.name }})
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- { version: "1.65.0", name: MSRV }
- { version: stable, name: stable }
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust.version }}
- name: Install cargo-hack
shell: bash
run: |
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C ~/.cargo/bin
- name: Cache cargo output
uses: Swatinem/rust-cache@v2
- name: Type checking
run: |
cargo hack check --feature-powerset --exclude-features default
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Run test suite
run: cargo test
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all-features