Skip to content

Commit 21d443f

Browse files
committed
Check semver of all workspace crates rather than an explicit list
1 parent 784b85c commit 21d443f

2 files changed

Lines changed: 14 additions & 37 deletions

File tree

.github/workflows/semver.yml

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,11 @@ jobs:
1313
steps:
1414
- name: Checkout source code
1515
uses: actions/checkout@v4
16-
- name: Check SemVer with default features
17-
uses: obi1kenobi/cargo-semver-checks-action@v2
18-
with:
19-
feature-group: default-features
20-
- name: Check SemVer *without* default features
21-
uses: obi1kenobi/cargo-semver-checks-action@v2
22-
with:
23-
feature-group: only-explicit-features
24-
- name: Check lightning-background-processor SemVer
25-
uses: obi1kenobi/cargo-semver-checks-action@v2
26-
with:
27-
package: lightning-background-processor
28-
feature-group: only-explicit-features
29-
- name: Check lightning-block-sync SemVer
30-
uses: obi1kenobi/cargo-semver-checks-action@v2
31-
with:
32-
package: lightning-block-sync
33-
feature-group: only-explicit-features
34-
features: rpc-client,rest-client
35-
- name: Check lightning-transaction-sync electrum SemVer
36-
uses: obi1kenobi/cargo-semver-checks-action@v2
37-
with:
38-
manifest-path: lightning-transaction-sync/Cargo.toml
39-
feature-group: only-explicit-features
40-
features: electrum
41-
- name: Check lightning-transaction-sync esplora-blocking SemVer
42-
uses: obi1kenobi/cargo-semver-checks-action@v2
43-
with:
44-
manifest-path: lightning-transaction-sync/Cargo.toml
45-
feature-group: only-explicit-features
46-
features: esplora-blocking
47-
- name: Check lightning-transaction-sync esplora-async SemVer
48-
uses: obi1kenobi/cargo-semver-checks-action@v2
49-
with:
50-
manifest-path: lightning-transaction-sync/Cargo.toml
51-
feature-group: only-explicit-features
52-
features: esplora-async
16+
- name: Install Rust stable toolchain
17+
run: |
18+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
19+
rustup override set stable
20+
- name: Install SemVer Checker
21+
run: cargo install cargo-semver-checks --locked
22+
- name: Check SemVer
23+
run: ci/check-semver.sh

ci/check-semver.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )
3+
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
4+
cargo semver-checks
5+
cargo semver-checks --only-explicit-features
6+
done

0 commit comments

Comments
 (0)