-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (86 loc) · 2.8 KB
/
full.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
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
on: [ push, pull_request ]
name: full
# TODO: cargo workspace builds are problematic for us since they take the union
# of the features for a crate from all crates in the workspace: even for leaf
# crates on the dependency graph (i.e. if my workspace contains A, B, and Z
# with Z having two incompatible features, a and b where A requires a and B
# requires b, when a workspace build is run Z will be built with a and b — even
# though A does not depend on B and vice versa).
#
# So, we should perhaps switch to having the full test just build and test each
# crate in the workspace separately. Or we should do away with this workflow
# entirely.
#
# Update this has been resolved for now, but we're playing an increasingly
# precarious game here..
jobs:
check:
name: Check + test
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest, macOS-latest ]
rust:
- stable
- beta
- nightly
- 1.42.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --no-fail-fast
- name: Run cargo test in release mode
uses: actions-rs/cargo@v1
with:
command: test
args: --all --no-fail-fast --release
lint:
name: Format + run clippy
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
rust: [ stable, nightly ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings
# TODO: feature combinations (for now it's fine since we don't have any real
# ones).
# Bench, if that ever becomes necessary.
# TODO: it is now necessary!
# So, we'll have a bench thing for PRs that's just `criterion-compare-action`
# But then we'll also have a thing that, for each push:
# - runs the benchmarks/generates the reports
# - uses critcomp to make the json file
# - uploads both to the gh-pages branch under benches/<branch name>/<commit hash>
# + also adds the corresponding entry on the index page