Skip to content

chore: bump proc-macro-crate to 2.0.0 in borsh-derive #1090

chore: bump proc-macro-crate to 2.0.0 in borsh-derive

chore: bump proc-macro-crate to 2.0.0 in borsh-derive #1090

Workflow file for this run

name: Rust
permissions:
pull-requests: write
contents: write
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
tests:
strategy:
matrix:
rust_version: [1.66.0, stable]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
- name: set default rust toolchain
run: rustup default ${{ matrix.rust_version }}
- name: print rustc version
run: rustc --version
# remove this step when MSRV >= 1.67.0
- name: downgrade `toml_edit`, time`, `toml_datetime` crate to support older Rust toolchain
if: matrix.rust_version == '1.66.0'
run: |
cargo update -p toml_edit --precise 0.20.2
cargo update -p toml_datetime --precise 0.6.3
cargo update -p time --precise 0.3.23
- name: Run tests
run: ./.github/test.sh
# remove this job when https://github.com/rust-lang/rust/issues/89554 stabilizes
test_exhaustive_checks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install nightly for exhaustive check tests
uses: dtolnay/rust-toolchain@nightly
# a failure on this check means, that some of `syn` crate's enums have been extended
# with new variants.
# consult https://github.com/serde-rs/serde/blob/master/serde_derive/src/bound.rs#L100 ,
# the implementation of `FindTyParams` may have been updated already
- name: Run exhaustive check tests
run: cargo check --workspace --features force_exhaustive_checks
clippy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run clippy
run: cargo clippy --features unstable__schema --benches -- -D clippy::all
cargo-fmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run cargo fmt
run: cargo fmt --check
# there're sometimes warnings, which signal, that the generated doc
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
# generated at release time altogether.
cargo-doc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: run cargo doc
run: RUSTDOCFLAGS="-D warnings" cargo doc --features derive,unstable__schema
release-plz:
runs-on: ubuntu-latest
needs: [tests, clippy, cargo-fmt]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
# https://marcoieni.github.io/release-plz/github-action.html#triggering-further-workflow-runs
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}