-
Notifications
You must be signed in to change notification settings - Fork 64
164 lines (156 loc) · 5.15 KB
/
rust.yaml
File metadata and controls
164 lines (156 loc) · 5.15 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
164
--- # rust-bitcoin CI: If you edit this file please update README.md
on: # yamllint disable-line rule:truthy
push:
branches:
- master
- 'test-ci/**'
pull_request:
name: Continuous integration
jobs:
Test: # 6 jobs: 3 toolchains × 2 lock files.
name: Test - ${{ matrix.toolchain }} toolchain (${{ matrix.dep }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dep: [minimal, recent]
toolchain: [stable, nightly, msrv]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Run ${{ matrix.toolchain }} tests"
run: |
cargo rbmt --lock-file ${{ matrix.dep }} test --toolchain ${{ matrix.toolchain }} \
-p bitreq \
-p corepc-client \
-p jsonrpc-fuzz \
-p jsonrpc \
-p corepc-types
Lint:
name: Lint - nightly toolchain
runs-on: ubuntu-latest
env:
BITCOIND_SKIP_DOWNLOAD: "1"
strategy:
fail-fast: false
matrix:
dep: [recent]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Run lints"
run: |
cargo rbmt --lock-file ${{ matrix.dep }} lint \
-p bitreq \
-p corepc-client \
-p jsonrpc-fuzz \
-p jsonrpc \
-p corepc-types
./contrib/lint-integration-tests.sh
./contrib/lint-verify.sh
Docs:
name: Docs - stable toolchain
runs-on: ubuntu-latest
env:
BITCOIND_SKIP_DOWNLOAD: "1"
strategy:
fail-fast: false
matrix:
dep: [recent]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Run doc tests"
run: cargo rbmt --lock-file ${{ matrix.dep }} docs
Docsrs:
name: Docs - nightly toolchain
runs-on: ubuntu-latest
env:
BITCOIND_SKIP_DOWNLOAD: "1"
strategy:
fail-fast: false
matrix:
dep: [recent]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Run docsrs tests"
run: cargo rbmt --lock-file ${{ matrix.dep }} docsrs
Format: # 1 job, run cargo fmt directly.
name: Format - nightly toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Check formatting"
run: |
cargo rbmt fmt --check
./contrib/fmt-integration-tests.sh
./contrib/fmt-verify.sh
Verify: # 1 job, run `verify` directly.
name: Verify - stable toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Select toolchain"
uses: dtolnay/rust-toolchain@stable
- name: "Run the verify program"
# Verify all versions (known to the verify program)
run: cd verify && cargo run all
Integration: # 1 job for each bitcoind version we support.
name: Integration tests - stable toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
[
"30_2",
# Don't integration test v30.0 and v30.1 as the binaries have been
# removed due to a wallet migration bug.
"29_0",
"28_2",
"28_1",
"28_0",
"27_2",
"27_1",
"27_0",
"26_2",
"25_2",
"24_2",
"23_2",
"22_1",
"0_21_2",
"0_20_2",
"0_19_1",
"0_18_1",
"0_17_2",
]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
- name: "Cache downloaded bitcoind"
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/corepc/bitcoind
key: bitcoind-${{ runner.os }}-${{ runner.arch }}-${{ matrix.version }}
- name: "Run integration tests"
env:
BITCOIND_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/corepc/bitcoind
run: cd integration_test && cargo test --features=${{ matrix.version }},download