-
Notifications
You must be signed in to change notification settings - Fork 78
71 lines (60 loc) · 1.7 KB
/
rust.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
name: Rust
on:
push:
branches: [dev]
pull_request:
branches: [dev]
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build_and_test:
if: ( ! github.event.pull_request.draft )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- components/integration-tests
- components/uid-mux
- components/cipher
- components/universal-hash
- components/aead
- components/key-exchange
- components/point-addition
- components/prf
- components/tls
- tlsn
include:
- package: components/integration-tests
release: true
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- uses: actions/checkout@v3
- name: Nightly with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: "Check formatting"
run: cargo +nightly fmt --check --all
- name: Stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2.5.0
with:
workspaces: ${{ matrix.package }} -> target
- name: "Build"
run: cargo build ${{ matrix.release && '--release' }}
- name: "Test"
if: ${{ matrix.release != true }}
run: cargo test --lib --bins --tests --examples --workspace
- name: "Integration Test"
if: ${{ matrix.release == true }}
run: cargo test --release --tests
- name: "Clippy"
run: cargo clippy --all-features -- -D warnings