-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (47 loc) · 1.52 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
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
features:
[
"--no-default-features",
"--features axum",
"--features hyper",
"--features actix-web",
"--features warp",
"--features salvo",
"--features tide",
"--features rocket",
"--features api-error",
"--features 'axum api-error'",
"--features 'hyper api-error'",
"--features 'actix-web api-error'",
"--features 'warp api-error'",
"--features 'salvo api-error'",
"--features 'tide api-error'",
"--features 'rocket api-error'",
]
rust: [
1.79.0, # MSRV
nightly, # it is good practise to test libraries against nightly to catch regressions in the compiler early
]
fail-fast: false # don't want to kill the whole CI if nightly fails
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cache target directory
uses: actions/cache@v1
with:
path: target
key: target-directory-${{ matrix.rust }}-${{ matrix.features }}-${{ hashFiles('Cargo.toml') }}
- run: cargo build ${{ matrix.features }}
- run: cargo test ${{ matrix.features }}