forked from bitcoindevkit/bdk_wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (152 loc) · 5.1 KB
/
cont_integration.yml
File metadata and controls
163 lines (152 loc) · 5.1 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
on: [push, pull_request]
# Main continuous integration workflow that runs build, test, and code quality checks.
# Runs on every push and pull request, testing against both MSRV (1.85) and stable Rust.
# Includes no_std and WASM compatibility checks, formatting validation, and clippy linting.
name: CI
permissions: {}
env:
CARGO_TERM_COLOR: always
jobs:
build-test-msrv:
name: Build & Test MSRV
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
features:
- --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
- --all-features
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# The 'toolchain' argument on this action overrides the Rust compiler version set in rust-toolchain.toml
# in order to test our MSRV.
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.85 # MSRV
cache: true
- name: Pin dependencies for MSRV
run: ./ci/pin-msrv.sh
- name: Build + Test
run: |
cargo build --workspace --all-targets ${{ matrix.features }}
cargo test --workspace ${{ matrix.features }}
build-test-stable:
name: Build & Test Rust Stable
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
features:
- --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
- --all-features
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# This action will honor the Rust compiler version set in rust-toolchain.toml. We aim to keep it in sync with
# Rust stable.
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Build + Test
run: |
cargo build --workspace --all-targets ${{ matrix.features }}
cargo test --workspace ${{ matrix.features }}
check-no-std:
name: Check no_std
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Check no-std
# TODO "--target thumbv6m-none-eabi" should work but currently does not
run: cargo check --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
check-wasm:
name: Check WASM
runs-on: ubuntu-latest
env:
CC: clang-14
CFLAGS: -I/usr/include
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# Install a recent version of clang that supports wasm32
- run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
- run: sudo apt-get update || exit 1
- run: sudo apt-get install -y libclang-common-14-dev clang-14 libc6-dev-i386 || exit 1
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
target: wasm32-unknown-unknown
- name: Check WASM
run: |
rustup target add wasm32-unknown-unknown
cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Check fmt
run: cargo fmt --all --check
clippy_check:
name: Rust clippy
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
docs_check:
name: Check cargo doc
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# This action automatically reads and applies rust-toolchain.toml
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Check docs
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps