Skip to content

polkadot v1.12.0

polkadot v1.12.0 #721

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
- 'sdk-v[0-9]+.[0-9]+.[0-9]+-*'
- 'polkadot-v[0-9]+.[0-9]+.[0-9]+-*'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- master
- 'sdk-v[0-9]+.[0-9]+.[0-9]+-*'
- 'polkadot-v[0-9]+.[0-9]+.[0-9]+-*'
env:
CARGO_TERM_COLOR: always
jobs:
cancel_previous_runs:
name: Cancel Previous Runs
runs-on: ubuntu-20.04
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
check:
name: Rust check ${{ matrix.check }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
check: [ cargo build --release,
cargo build --release --features dot,
cargo build --release --features ksm,
cargo test --all --features runtime-benchmarks,
cargo test --all --features dot,
cargo test --all --features ksm,
cargo fmt --all -- --check,
cargo clippy -- -D warnings
]
steps:
- uses: actions/checkout@v3
# With rustup's nice new toml format, we just need to run rustup show to install the toolchain
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659
- name: Setup Rust toolchain
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.rust-target }}-${{ matrix.check }}
- name: ${{ matrix.check }}
run: ${{ matrix.check }}
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install cargo-about
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-about
version: "0.5.6"
- name: Run license check
# Explicitly use stable because otherwise cargo will trigger a download of
# the nightly version specified in rust-toolchain.toml
run: cargo +stable about generate about.hbs > license.html
- name: Archive license file
uses: actions/upload-artifact@v3
with:
name: license
path: license.html
cargo-zepter:
name: Cargo Zepter
runs-on: ubuntu-latest
steps:
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Don't clone historic commits.
- name: Check features
run: zepter run check
cargo-toml-fmt:
runs-on: ubuntu-latest
container: "tamasfe/taplo:0.7.0-alpine"
steps:
- uses: actions/checkout@v3
- name: Run Taplo fmt
run: taplo fmt --check
- name: Fail-fast; cancel other jobs
if: failure()
uses: andymckay/[email protected]