-
Notifications
You must be signed in to change notification settings - Fork 5
82 lines (78 loc) · 2.99 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
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
name: Build & Test
on:
push:
branches:
- main
pull_request:
jobs:
# Proxy application is not as strict as protocol library.
proxy:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v3
- name: Update Toolchain
run: |
rustup default ${{ matrix.toolchain }}
rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
rustup component add --toolchain ${{ matrix.toolchain }} clippy
rustup update ${{ matrix.toolchain }}
- name: Lint
run: |
cargo clippy --package bip324-proxy --all-targets
- name: Format
run: |
cargo fmt --package bip324-proxy -- --check
- name: Build
run: |
cargo build --package bip324-proxy --verbose
cargo build --all --verbose --no-default-features
cargo build --all --verbose --all-features
- name: Test
run: |
cargo test --package bip324-proxy --verbose
protocol:
runs-on: ubuntu-latest
strategy:
matrix:
# Minumum Supported Rust Version (MSRV) is 1.56.1.
toolchain: [1.56.1, stable, beta, nightly]
steps:
- uses: actions/checkout@v3
- name: Update Toolchain
run: |
rustup default ${{ matrix.toolchain }}
rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
rustup component add --toolchain ${{ matrix.toolchain }} clippy
rustup update ${{ matrix.toolchain }}
- name: Lint
run: |
cargo clippy --package bip324 --all-targets
- name: Format
run: |
cargo fmt --package bip324 -- --check
- name: Build
# Build with default features, all, and none.
# Then build with specific feature sub-sets.
run: |
cargo build --package bip324 --verbose
cargo build --package bip324 --verbose --all-features
cargo build --package bip324 --verbose --no-default-features
cargo build --package bip324 --verbose --no-default-features --features alloc
- name: Test
# Test with default features, all, and none.
# Then test with specific feature sub-sets.
run: |
cargo test --package bip324 --verbose
cargo test --package bip324 --verbose --all-features
cargo test --package bip324 --verbose --no-default-features
cargo test --package bip324 --verbose --no-default-features --features alloc
- name: Check No Standard Library Support
# The cross tool used to test in a no standard library environment doesn't play nice with our MSRV, so limiting to just stable toolchain.
if: matrix.toolchain == 'stable'
run: |
rustup target add --toolchain ${{ matrix.toolchain }} thumbv7m-none-eabi
cargo install cross --locked
cross build --package bip324 --target thumbv7m-none-eabi --no-default-features --features alloc