Skip to content

Update README.md

Update README.md #273

Workflow file for this run

name: Check Set-Up & Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request (only for the develop branch)
push: # Run checks on push to any branch, for early notification of issues
pull_request:
branches: [ universal-develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
env:
SKIP_WASM_BUILD: '1' # Skip for all steps, so no wasm32-unknown-unknown target required
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Install and use nightly
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-09-01 # Specific version required otherwise new cache each day due to nightly changes
override: true
components: rustfmt, clippy
# Setup cache
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "checks-v2"
# Check default and runtime-benchmarks for errors
# todo: can probably be removed to just use clippy below, as it supposedly calls cargo check
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --features=default,runtime-benchmarks --release
# Run clippy checks (using same arguments as above to re-use built dependencies)
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --release
# # Check formatting
# - name: Check formatting
# uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check