Skip to content

Document MSRV policy #605

Document MSRV policy

Document MSRV policy #605

Workflow file for this run

name: Public API Check
on:
pull_request:
branches:
- master
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# The workflow may fail if we change the public API in a pull request.
# We allow fail on this action. But we should manually check if the changes are reasonable when we see a failed action.
# It would be good if the workflow returns a neutral status when we find API changes. But it is currently not
# possible with Github actions.
jobs:
check-public-api-changes:
runs-on: ubuntu-latest
steps:
# Full git history needed
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Install nightly
- uses: actions-rs/toolchain@v1
with:
# We need nightly for cargo-public-api to get the API output.
toolchain: nightly-2023-01-04
profile: minimal
# It is not necessary to use nightly as default (which is used to install cargo-public-api and compile our code).
# However, our current toolchain is 1.59.0, and cargo-public-api requires 1.60 at least. To make it simple,
# we just use the latest nightly toolchain.
override: true
- run: cargo --version
# Install cargo-public-api
- name: Install cargo-public-api
run: cargo install cargo-public-api --version 0.26.0
- name: API Diff
run: cargo public-api diff origin/${GITHUB_BASE_REF}..${{ github.event.pull_request.head.sha }} --deny=all