Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Add rayon parallel iterators for node and edge weights #976

feat: Add rayon parallel iterators for node and edge weights

feat: Add rayon parallel iterators for node and edge weights #976

Workflow file for this run

name: Rust semver-checks
on:
pull_request:
branches:
- master
workflow_dispatch:
inputs:
base:
description: 'Base branch or tag to run the semver checks against.'
required: true
default: 'master'
permissions:
pull-requests: read
jobs:
semver-checks:
name: semver-checks 🦀
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
path: PR_BRANCH
fetch-depth: 0
# Remove repo toolchain pin so we can specify toolchain manually
- name: Remove toolchain pin
run: rm -f rust-toolchain.toml rustup-toolchain.toml
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build caching
uses: Swatinem/rust-cache@v2
# Run cargo-semver-checks against the PR's target branch.
- name: Check semver changes
id: semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: all-features
manifest-path: PR_BRANCH/Cargo.toml
baseline-rev: ${{ github.event.pull_request.base.sha || github.event.inputs.base }}
release-type: minor
continue-on-error: true
- name: Evaluate semver result
run: |
echo "=== cargo-semver-checks result ==="
if [ "${{ steps.semver.outcome }}" = "failure" ]; then
BREAKING=true
echo "❌ Breaking changes detected in public Rust API"
else
BREAKING=false
echo "✅ No breaking changes detected"
fi
echo
echo "=== cargo-semver-checks summary ==="
echo
printf "%s\n" "${{ steps.semver.outputs.semver-checks-output }}"
echo
# Check PR title for conventional-commit breaking marker
if [[ "${{ github.event.pull_request.title }}" =~ ^.*\!:.*$ ]]; then
DECLARED=true
echo "ℹ️ PR title declares a breaking change (!)"
else
DECLARED=false
echo "ℹ️ PR title does NOT declare a breaking change"
fi
echo
echo "=== Decision ==="
if [ "$BREAKING" = true ] && [ "$DECLARED" = false ]; then
echo "🚨 ERROR: Undeclared breaking changes detected."
echo "Hey there and thank you for opening this pull request! 👋 Please deprecate the old API instead (if possible), or mark the PR with a `!` following the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format to indicate a breaking change."
exit 1
fi
if [ "$BREAKING" = true ] && [ "$DECLARED" = true ]; then
echo "⚠️ Breaking changes detected but correctly declared."
echo "Workflow will succeed."
fi
if [ "$BREAKING" = false ]; then
echo "✅ No breaking changes; workflow will succeed."
fi