-
Notifications
You must be signed in to change notification settings - Fork 23
107 lines (99 loc) · 2.7 KB
/
check.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
100
101
102
103
104
105
106
107
on:
push:
branches:
- '**'
pull_request:
name: Build, test, and bench
jobs:
cachix:
name: upload cachix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
if: ${{ github.event_name == 'push' }}
with:
name: dcompass
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# Don't push source or .iso files as they are pointless to take up precious cache space.
pushFilter: '(-source$|nixpkgs\.tar\.gz$|\.iso$|-squashfs.img$|crate-$)'
# Run the general flake checks
- run: nix flake check -vL
build:
name: Build all feature permutations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}-check
- uses: actions-rs/install@v0.1
with:
crate: cargo-all-features
version: latest
use-tool-cache: true
- run: cargo build-all-features
env:
RUSTFLAGS: -D warnings
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/install@v0.1
with:
crate: cargo-all-features
version: latest
use-tool-cache: true
- run: cargo test-all-features
env:
RUSTFLAGS: -D warnings
bench:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}-bench
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo bench --no-run
env:
RUSTFLAGS: -D warnings
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}-clippy
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- run: cargo clippy
env:
RUSTFLAGS: -D warnings