Release v0.50.0 #465
Workflow file for this run
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
name: Rust | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/rust.yml | |
- Cargo.toml | |
- src/** | |
- tools/** | |
push: | |
branches: main | |
paths: | |
- .github/workflows/rust.yml | |
- Cargo.toml | |
- src/** | |
- tools/** | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_PROFILE_DEV_DEBUG: 1 | |
CARGO_PROFILE_RELEASE_DEBUG: 1 | |
RUST_BACKTRACE: short | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/workflow-run-cleanup-action@master | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy-all-features: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --all-targets | |
clippy-no-default-features: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --no-default-features | |
check-each-feature: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: Swatinem/rust-cache@v1 | |
- run: cargo hack check --each-feature --no-dev-deps | |
test-stable: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --no-fail-fast --no-run | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --no-fail-fast --workspace -- --nocapture | |
test-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --features=borsh,parity-scale-codec | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
env: | |
RUSTDOCFLAGS: "-D warnings" | |
with: | |
command: doc | |
args: --all-features | |
publish-dry-run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: arduino/setup-protoc@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --dry-run |