Skip to content
check-circle

GitHub Action

cargo-featalign action

v0.1.0 Latest version

cargo-featalign action

check-circle

cargo-featalign action

Use `cargo-featalign` to check your crate's features

Installation

Copy and paste the following snippet into your .yml file.

              

- name: cargo-featalign action

uses: hack-ink/[email protected]

Learn more about this action in hack-ink/cargo-featalign-action

Choose a version

Use cargo-featalign to check your crate's features.

Introduction

This will print the dry run output. If there is no output, it means your crate is good to go.

Usage

Take polkadot-sdk as an example.

gh repo clone paritytech/polkadot-sdk

Check single crate.

name: Checks
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  features-check:
    name: Task check features
    runs-on: ubuntu-latest
    steps:
      - name: Fetch latest code
        uses: actions/checkout@v4
      - name: Check
        uses: hack-ink/[email protected]
        with:
          crate: polkadot/runtime/polkadot
          features: std,runtime-benchmarks,try-runtime
          default-std: true

Check multiple crates at once.

name: Checks
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  runtime-checks:
    name: Task check runtimes
    strategy:
      matrix:
        target: [polkadot/runtime/polkadot, polkadot/runtime/kusama]
    runs-on: ubuntu-latest
    steps:
      - name: Fetch latest code
        uses: actions/checkout@v4
      - name: Check ${{ matrix.target.chain }}
        uses: hack-ink/[email protected]
        with:
          crate: polkadot
          features: std,runtime-benchmarks,try-runtime
          default-std: true