-
Notifications
You must be signed in to change notification settings - Fork 44
56 lines (52 loc) · 1.82 KB
/
build.yml
File metadata and controls
56 lines (52 loc) · 1.82 KB
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
name: Continuous Integration Checks
on: [ push, pull_request ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
platform: [
ubuntu-latest,
macos-latest,
]
toolchain:
[ stable,
beta,
1.85.0, # MSRV, same as ldk-node
]
include:
- toolchain: stable
check-fmt: true
- toolchain: 1.85.0
msrv: true
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Install Rust ${{ matrix.toolchain }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
rustup override set ${{ matrix.toolchain }}
if [ "${{ matrix.msrv }}" = "true" ]; then rustup component add clippy; fi
- name: Check formatting
if: matrix.check-fmt
run: rustup component add rustfmt && cargo fmt --all -- --check
- name: Pin packages to allow for MSRV
if: matrix.msrv
run: |
cargo update -p idna_adapter --precise "1.2.0" --verbose # idna_adapter 1.2.1 uses ICU4X 2.2.0, requiring 1.86 and newer
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
- name: Check clippy if on msrv
if: matrix.msrv
run: cargo clippy --all-features -- -D warnings
- name: Test on Rust ${{ matrix.toolchain }}
run: cargo test
- name: Cargo check release on Rust ${{ matrix.toolchain }}
run: cargo check --release
- name: Cargo check doc on Rust ${{ matrix.toolchain }}
run: cargo doc --release