Skip to content

Commit ec7baea

Browse files
committed
fix: cleanup CI workflow
1 parent a4a58c5 commit ec7baea

File tree

9 files changed

+190
-474
lines changed

9 files changed

+190
-474
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Opt in to the v3 MSRV-aware resolver.
2+
[resolver]
3+
incompatible-rust-versions = "fallback"

.github/workflows/ci.yml

Lines changed: 52 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,67 @@
1-
name: Build & Test
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
77
pull_request:
8+
branches:
9+
- main
810

911
jobs:
10-
proxy:
11-
runs-on: ubuntu-latest
12+
# Quick canary of code as well as potential issues with upcoming toolchains.
13+
check:
1214
strategy:
1315
matrix:
1416
toolchain: [stable, beta, nightly]
15-
steps:
16-
- uses: actions/checkout@v3
17-
- name: Update Toolchain
18-
run: |
19-
rustup default ${{ matrix.toolchain }}
20-
rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
21-
rustup component add --toolchain ${{ matrix.toolchain }} clippy
22-
rustup update ${{ matrix.toolchain }}
23-
- name: Lint
24-
run: |
25-
cargo clippy --package bip324-proxy --all-targets
26-
- name: Format
27-
run: |
28-
cargo fmt --package bip324-proxy -- --check
29-
- name: Build
30-
run: |
31-
cargo build --package bip324-proxy --verbose
32-
cargo build --all --verbose --no-default-features
33-
cargo build --all --verbose --all-features
34-
- name: Test
35-
run: |
36-
cargo test --package bip324-proxy --verbose
37-
38-
protocol:
3917
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: extractions/setup-just@v3
21+
- uses: actions-rust-lang/setup-rust-toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.toolchain }}
24+
components: clippy,rustfmt
25+
- run: just check
26+
# Build and test the code across platforms.
27+
test:
4028
strategy:
4129
matrix:
42-
# Minumum Supported Rust Version (MSRV) is 1.63.0.
43-
toolchain: [1.63.0, stable, beta, nightly]
30+
platform: [ubuntu-latest, macos-latest, windows-latest]
31+
runs-on: ${{ matrix.platform }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: extractions/setup-just@v3
35+
- uses: actions-rust-lang/setup-rust-toolchain@v1
36+
- run: just test unit
37+
features:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: extractions/setup-just@v3
42+
- uses: actions-rust-lang/setup-rust-toolchain@v1
43+
- run: just test features
44+
msrv:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: extractions/setup-just@v3
49+
- uses: actions-rust-lang/setup-rust-toolchain@v1
50+
- run: just test msrv
51+
min-versions:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: extractions/setup-just@v3
56+
- uses: actions-rust-lang/setup-rust-toolchain@v1
57+
with:
58+
toolchain: nightly
59+
- run: just test min-versions
60+
no-std:
61+
runs-on: ubuntu-latest
4462
steps:
45-
- uses: actions/checkout@v3
46-
- name: Update Toolchain
47-
run: |
48-
rustup default ${{ matrix.toolchain }}
49-
rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
50-
rustup component add --toolchain ${{ matrix.toolchain }} clippy
51-
rustup update ${{ matrix.toolchain }}
52-
- name: Lint
53-
run: |
54-
cargo clippy --package bip324 --all-targets
55-
- name: Format
56-
run: |
57-
cargo fmt --package bip324 -- --check
58-
- name: Build
59-
# Build with default features, all, and none.
60-
# Then build with specific feature sub-sets.
61-
run: |
62-
cargo build --package bip324 --verbose
63-
cargo build --package bip324 --verbose --all-features
64-
cargo build --package bip324 --verbose --no-default-features
65-
cargo build --package bip324 --verbose --no-default-features --features alloc
66-
- name: Test
67-
# Test with default features, all, and none.
68-
# Then test with specific feature sub-sets.
69-
run: |
70-
cargo test --package bip324 --verbose
71-
cargo test --package bip324 --verbose --all-features
72-
cargo test --package bip324 --verbose --no-default-features
73-
cargo test --package bip324 --verbose --no-default-features --features alloc
74-
- name: Check No Standard Library Support
75-
# 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.
76-
if: matrix.toolchain == 'stable'
77-
run: |
78-
rustup target add --toolchain ${{ matrix.toolchain }} thumbv7m-none-eabi
79-
cargo install cross --locked
80-
cross build --package bip324 --target thumbv7m-none-eabi --no-default-features --features alloc
81-
63+
- uses: actions/checkout@v4
64+
- uses: extractions/setup-just@v3
65+
- uses: actions-rust-lang/setup-rust-toolchain@v1
66+
- run: just test no-std
67+
continue-on-error: true

0 commit comments

Comments
 (0)