Add semver check step and cache to actions #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permissions: | |
contents: read | |
on: | |
push: | |
branches: [master] | |
pull_request: {} | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} | |
cancel-in-progress: true | |
name: check | |
jobs: | |
check: | |
runs-on: windows-latest | |
name: ${{matrix.feature}} / ${{ matrix.compiler }} | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [msvc, gnu] | |
feature: [vendored, static] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
with: | |
targets: x86_64-pc-windows-${{ matrix.compiler }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ steps.toolchain.outputs.cachekey }} | |
- name: Semver checks | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
- name: cargo check | |
run: cargo check --target x86_64-pc-windows-${{ matrix.compiler }} --features ${{ matrix.feature }} | |
doc: | |
runs-on: windows-latest | |
name: docs / stable | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ steps.toolchain.outputs.cachekey }}-docs | |
- name: cargo doc | |
run: cargo doc --no-deps --all-features | |
env: | |
DOCS_RS: true | |
RUSTDOCFLAGS: --cfg docsrs | |
msrv: | |
runs-on: windows-latest | |
name: msrv / ${{ matrix.msrv }} | |
strategy: | |
fail-fast: false | |
matrix: | |
msrv: [1.64] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@master | |
id: toolchain | |
with: | |
toolchain: ${{ matrix.msrv }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ steps.toolchain.outputs.cachekey }}-msvr | |
- name: cargo +${{ matrix.msrv }} check | |
run: cargo check --all-features |