7
7
strategy :
8
8
fail-fast : false
9
9
matrix :
10
- platform : [ ubuntu-latest ]
11
- toolchain : [ stable,
12
- beta,
13
- # 1.48.0 is the MSRV for all LDK crates except lightning-transaction-sync and Windows
14
- 1.48.0]
10
+ platform : [ ubuntu-latest, windows-latest, macos-latest ]
11
+ toolchain : [ stable, beta ]
15
12
include :
16
13
- toolchain : stable
17
- build-tx-sync : true
14
+ platform : ubuntu-latest
18
15
coverage : true
19
- - toolchain : stable
20
- platform : macos-latest
21
- build-tx-sync : true
22
- - toolchain : stable
23
- test-custom-message : true
24
- - toolchain : beta
25
- platform : macos-latest
26
- build-tx-sync : true
27
- - toolchain : stable
28
- platform : windows-latest
29
- build-tx-sync : false
30
- - toolchain : beta
31
- platform : windows-latest
32
- build-tx-sync : false
33
- - toolchain : beta
34
- build-tx-sync : true
35
- - toolchain : beta
36
- test-custom-message : true
16
+ # 1.48.0 is the MSRV for all crates except lightning-transaction-sync and Win/Mac
37
17
- toolchain : 1.48.0
38
- build-tx-sync : false
18
+ platform : ubuntu-latest
19
+ # Windows requires 1.49.0 because that's the MSRV for supported Tokio
20
+ - toolchain : 1.49.0
21
+ platform : windows-latest
22
+ # MacOS-latest requires 1.54.0 because that's what's required for linking to work properly
23
+ - toolchain : 1.54.0
24
+ platform : macos-latest
39
25
runs-on : ${{ matrix.platform }}
40
26
steps :
41
27
- name : Checkout source code
@@ -46,140 +32,19 @@ jobs:
46
32
toolchain : ${{ matrix.toolchain }}
47
33
override : true
48
34
profile : minimal
49
- - name : Pin tokio to 1.14 for Rust 1.45
50
- run : cargo update -p tokio --precise "1.14.0" --verbose
51
- env :
52
- CARGO_NET_GIT_FETCH_WITH_CLI : " true"
53
- - name : Pin tokio to 1.26 for Windows
54
- if : " matrix.platform == 'windows-latest'"
55
- run : cargo update -p tokio --precise "1.26.0" --verbose
56
- env :
57
- CARGO_NET_GIT_FETCH_WITH_CLI : " true"
58
- - name : Build on Rust ${{ matrix.toolchain }} with net-tokio
59
- if : " !matrix.coverage"
60
- run : cargo build --verbose --color always
61
- - name : Build on Rust ${{ matrix.toolchain }} with net-tokio, and full code-linking for coverage generation
62
- if : matrix.coverage
63
- run : RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always
64
- - name : Build on Rust ${{ matrix.toolchain }} with all Log-Limiting features
65
- if : matrix.test-log-variants
66
- run : |
67
- cd lightning
68
- for FEATURE in $(cat Cargo.toml | grep '^max_level_' | awk '{ print $1 }'); do
69
- cargo build --verbose --color always --features $FEATURE
70
- done
71
- - name : Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features
72
- if : " !matrix.coverage"
73
- run : |
74
- cd lightning-block-sync
75
- cargo build --verbose --color always --features rest-client
76
- cargo build --verbose --color always --features rpc-client
77
- cargo build --verbose --color always --features rpc-client,rest-client
78
- cargo build --verbose --color always --features rpc-client,rest-client,tokio
79
- - name : Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
80
- if : matrix.coverage
81
- run : |
82
- cd lightning-block-sync
83
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rest-client
84
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client
85
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client
86
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client,tokio
87
- - name : Build Transaction Sync Clients on Rust ${{ matrix.toolchain }} with features
88
- if : " matrix.build-tx-sync && !matrix.coverage"
89
- run : |
90
- cd lightning-transaction-sync
91
- cargo build --verbose --color always --features esplora-blocking
92
- cargo build --verbose --color always --features esplora-async
93
- cargo build --verbose --color always --features esplora-async-https
94
- - name : Build transaction sync clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
95
- if : " matrix.build-tx-sync && matrix.coverage"
96
- run : |
97
- cd lightning-transaction-sync
98
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-blocking
99
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-async
100
- RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-async-https
101
- - name : Test transaction sync clients on Rust ${{ matrix.toolchain }} with features
102
- if : " matrix.build-tx-sync"
103
- run : |
104
- cd lightning-transaction-sync
105
- cargo test --verbose --color always --features esplora-blocking
106
- cargo test --verbose --color always --features esplora-async
107
- cargo test --verbose --color always --features esplora-async-https
108
- - name : Test backtrace-debug builds on Rust ${{ matrix.toolchain }}
109
- if : " matrix.toolchain == 'stable'"
110
- shell : bash # Default on Winblows is powershell
111
- run : |
112
- cd lightning && RUST_BACKTRACE=1 cargo test --verbose --color always --features backtrace
113
- - name : Test on Rust ${{ matrix.toolchain }} with net-tokio
114
- if : " !matrix.coverage"
115
- run : cargo test --verbose --color always
116
- - name : Test on Rust ${{ matrix.toolchain }} with net-tokio, and full code-linking for coverage generation
117
- if : matrix.coverage
118
- run : RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
119
- - name : Test no-std builds on Rust ${{ matrix.toolchain }}
120
- if : " !matrix.coverage"
121
- shell : bash # Default on Winblows is powershell
122
- run : |
123
- for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
124
- cd $DIR
125
- cargo test --verbose --color always --no-default-features --features no-std
126
- # check if there is a conflict between no-std and the default std feature
127
- cargo test --verbose --color always --features no-std
128
- # check that things still pass without grind_signatures
129
- # note that outbound_commitment_test only runs in this mode, because of hardcoded signature values
130
- cargo test --verbose --color always --no-default-features --features std
131
- # check if there is a conflict between no-std and the c_bindings cfg
132
- RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
133
- cd ..
134
- done
135
- # check no-std compatibility across dependencies
136
- cd no-std-check
137
- cargo check --verbose --color always --features lightning-transaction-sync
138
- - name : Build no-std-check on Rust ${{ matrix.toolchain }} for ARM Embedded
35
+ - name : Install no-std-check dependencies for ARM Embedded
139
36
if : " matrix.platform == 'ubuntu-latest'"
140
37
run : |
141
- cd no-std-check
142
38
rustup target add thumbv7m-none-eabi
143
39
sudo apt-get -y install gcc-arm-none-eabi
144
- cargo build --target=thumbv7m-none-eabi
145
- - name : Test on no-std builds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
146
- if : " matrix.coverage"
147
- run : |
148
- cd lightning
149
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no-std
150
- - name : Test futures builds on Rust ${{ matrix.toolchain }}
151
- if : " !matrix.coverage"
152
- shell : bash # Default on Winblows is powershell
153
- run : |
154
- cd lightning-background-processor
155
- cargo test --verbose --color always --no-default-features --features futures
156
- - name : Test futures builds on Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
157
- if : " matrix.coverage"
40
+ - name : Run CI script with coverage generation
41
+ if : matrix.coverage
158
42
shell : bash # Default on Winblows is powershell
159
- run : |
160
- cd lightning-background-processor
161
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features futures
162
- - name : Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features
43
+ run : LDK_COVERAGE_BUILD=true ./ci/ci-tests.sh
44
+ - name : Run CI script
163
45
if : " !matrix.coverage"
164
- run : |
165
- cd lightning-block-sync
166
- cargo test --verbose --color always --features rest-client
167
- cargo test --verbose --color always --features rpc-client
168
- cargo test --verbose --color always --features rpc-client,rest-client
169
- cargo test --verbose --color always --features rpc-client,rest-client,tokio
170
- - name : Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
171
- if : matrix.coverage
172
- run : |
173
- cd lightning-block-sync
174
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rest-client
175
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client
176
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client
177
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client,tokio
178
- - name : Test Custom Message Macros on Rust ${{ matrix.toolchain }}
179
- if : " matrix.test-custom-message"
180
- run : |
181
- cd lightning-custom-message
182
- cargo test --verbose --color always
46
+ shell : bash # Default on Winblows is powershell
47
+ run : ./ci/ci-tests.sh
183
48
- name : Install deps for kcov
184
49
if : matrix.coverage
185
50
run : |
0 commit comments