Skip to content

Commit f5e9fd5

Browse files
authored
ci: add semver check (#106)
Adds a check_semver CI job using n0-computer/cargo-semver-checks-action, matching the setup used across the iroh ecosystem.
1 parent 2d33601 commit f5e9fd5

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,33 @@ jobs:
170170
run: |
171171
rm -f Cargo.lock
172172
cargo +nightly check -Z minimal-versions -p irpc -p irpc-derive --all-features --lib --bins
173+
174+
check_semver:
175+
runs-on: ubuntu-latest
176+
env:
177+
RUSTC_WRAPPER: "sccache"
178+
SCCACHE_GHA_ENABLED: "on"
179+
steps:
180+
- uses: actions/checkout@v6
181+
with:
182+
fetch-depth: 0
183+
- name: Install sccache
184+
uses: mozilla-actions/sccache-action@v0.0.9
185+
186+
- name: Setup Environment (PR)
187+
if: ${{ github.event_name == 'pull_request' }}
188+
shell: bash
189+
run: |
190+
echo "HEAD_COMMIT_SHA=$(git rev-parse origin/${{ github.base_ref }})" >> ${GITHUB_ENV}
191+
- name: Setup Environment (Push)
192+
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
193+
shell: bash
194+
run: |
195+
echo "HEAD_COMMIT_SHA=$(git rev-parse origin/main)" >> ${GITHUB_ENV}
196+
- name: Check semver
197+
# uses: obi1kenobi/cargo-semver-checks-action@v2
198+
uses: n0-computer/cargo-semver-checks-action@feat-baseline
199+
with:
200+
package: irpc, irpc-iroh
201+
baseline-rev: ${{ env.HEAD_COMMIT_SHA }}
202+
use-cache: false

0 commit comments

Comments
 (0)