Skip to content

docs: link to issue in CHANGELOG.md #76

docs: link to issue in CHANGELOG.md

docs: link to issue in CHANGELOG.md #76

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
# RUSTDOCFLAGS: -D warnings
jobs:
check:
name: Check
timeout-minutes: 2
permissions:
# required for ppremk/lfs-warning
pull-requests: read
# required for LouisBrunner/checks-action
checks: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-on-failure: true
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
tool: typos,cargo-deny
- name: Check spelling
if: success() || failure()
id: typos
run: typos
- name: Check dependencies
if: success() || failure()
id: cargo-deny
run: cargo deny check
- name: Check formatting
if: success() || failure()
id: cargo-fmt
run: cargo fmt --all -- --check
- name: Check file size
if: (success() || failure()) && github.event_name == 'pull_request'
id: lfs
uses: mahor1221/lfs-warning@master
with:
filesizelimit: 256000
sendComment: false
# create check runs for pull requests
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check file size
conclusion: ${{ steps.lfs.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check spelling
conclusion: ${{ steps.typos.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check dependencies
conclusion: ${{ steps.cargo-deny.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check formatting
conclusion: ${{ steps.cargo-fmt.outcome }}
check-target:
name: Check target
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, cmd: cross }
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl, cmd: cross }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, cmd: cargo }
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl, cmd: cargo }
# - { os: windows-latest, target: aarch64-pc-windows-msvc, cmd: cross }
# - { os: windows-latest, target: x86_64-pc-windows-msvc, cmd: cargo }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-on-failure: true
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- if: matrix.cmd == 'cross'
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Check build
if: success() || failure()
id: cargo-check
run: ${{ matrix.cmd }} check --profile=ci --locked --target ${{ matrix.target }}
- name: Check lints
if: success() || failure()
id: cargo-clippy
run: ${{ matrix.cmd }} clippy --profile=ci --locked --target ${{ matrix.target }}
- name: Check tests
if: success()
id: cargo-test
run: ${{ matrix.cmd }} test --profile=ci --locked --target ${{ matrix.target }}
- name: Check documents
if: success()
id: cargo-doc
run: ${{ matrix.cmd }} doc --profile=ci --locked --target ${{ matrix.target }} --no-deps
# create check runs for pull requests
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check build ${{ matrix.target }}
conclusion: ${{ steps.cargo-check.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check lints ${{ matrix.target }}
conclusion: ${{ steps.cargo-clippy.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check tests ${{ matrix.target }}
conclusion: ${{ steps.cargo-test.outcome }}
- uses: LouisBrunner/checks-action@v2.0.0
if: (success() || failure()) && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check documents ${{ matrix.target }}
conclusion: ${{ steps.cargo-doc.outcome }}