From 0c077c0303a5028ed3ffa59a03d7f4f95d27813d Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Wed, 24 Jun 2026 09:38:14 +0200 Subject: [PATCH] ci: add semver check Adds a check_semver CI job using n0-computer/cargo-semver-checks-action, matching the setup used across the iroh ecosystem. --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b51d6cc..97f706f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,3 +170,33 @@ jobs: run: | rm -f Cargo.lock cargo +nightly check -Z minimal-versions -p irpc -p irpc-derive --all-features --lib --bins + + check_semver: + runs-on: ubuntu-latest + env: + RUSTC_WRAPPER: "sccache" + SCCACHE_GHA_ENABLED: "on" + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.9 + + - name: Setup Environment (PR) + if: ${{ github.event_name == 'pull_request' }} + shell: bash + run: | + echo "HEAD_COMMIT_SHA=$(git rev-parse origin/${{ github.base_ref }})" >> ${GITHUB_ENV} + - name: Setup Environment (Push) + if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }} + shell: bash + run: | + echo "HEAD_COMMIT_SHA=$(git rev-parse origin/main)" >> ${GITHUB_ENV} + - name: Check semver + # uses: obi1kenobi/cargo-semver-checks-action@v2 + uses: n0-computer/cargo-semver-checks-action@feat-baseline + with: + package: irpc, irpc-iroh + baseline-rev: ${{ env.HEAD_COMMIT_SHA }} + use-cache: false