From 766f2e7df0ee32a09009ef8c40c53cc8dc7e06f0 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Wed, 24 Jun 2026 09:28:03 +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 132bfe2..7560c93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,3 +72,33 @@ jobs: - uses: swatinem/rust-cache@v2 - name: cargo check run: cargo check --workspace --all-features --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: dumbpipe + baseline-rev: ${{ env.HEAD_COMMIT_SHA }} + use-cache: false