mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-15 15:39:09 +01:00
We recently introduced release branches that need to remain backwards compatible. However, even small changes to item visibility during backporting fixes might introduce SemVer violations (see https://doc.rust-lang.org/cargo/reference/semver.html#change-categories for a list of changs that would be considered major/minor). To make sure we don't accidentally introduce such changes in the backports, we here add a new `semver-checks` CI job that utilizes `cargo-semver-checks` (https://github.com/obi1kenobi/cargo-semver-checks), and have it run on any push or pull requests towards anything else but `main`/`master` (i.e., all feature branches to come).
57 lines
2.1 KiB
YAML
57 lines
2.1 KiB
YAML
name: SemVer checks
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
pull_request:
|
|
branches-ignore:
|
|
- master
|
|
|
|
jobs:
|
|
semver-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
- name: Install Rust stable toolchain
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
|
|
rustup override set stable
|
|
- name: Check SemVer with default features
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
feature-group: default-features
|
|
- name: Check SemVer *without* default features
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
feature-group: only-explicit-features
|
|
- name: Check lightning-background-processor SemVer
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
package: lightning-background-processor
|
|
feature-group: only-explicit-features
|
|
features: futures
|
|
- name: Check lightning-block-sync SemVer
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
package: lightning-block-sync
|
|
feature-group: only-explicit-features
|
|
features: rpc-client,rest-client
|
|
- name: Check lightning-transaction-sync electrum SemVer
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
manifest-path: lightning-transaction-sync/Cargo.toml
|
|
feature-group: only-explicit-features
|
|
features: electrum
|
|
- name: Check lightning-transaction-sync esplora-blocking SemVer
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
manifest-path: lightning-transaction-sync/Cargo.toml
|
|
feature-group: only-explicit-features
|
|
features: esplora-blocking
|
|
- name: Check lightning-transaction-sync esplora-async SemVer
|
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
|
with:
|
|
manifest-path: lightning-transaction-sync/Cargo.toml
|
|
feature-group: only-explicit-features
|
|
features: esplora-async
|