d46a4f8244
Bumps [uncenter/setup-taplo](https://github.com/uncenter/setup-taplo) from 1 to 2. - [Release notes](https://github.com/uncenter/setup-taplo/releases) - [Commits](https://github.com/uncenter/setup-taplo/compare/v1...v2) --- updated-dependencies: - dependency-name: uncenter/setup-taplo dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
name: Lint
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**.rs"
|
|
- "**.toml"
|
|
- "Cargo.*"
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
cargo-toml:
|
|
name: Cargo.toml
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install taplo
|
|
uses: uncenter/setup-taplo@v2
|
|
|
|
- name: Run taplo lint
|
|
run: taplo lint Cargo.toml
|
|
|
|
- name: Run taplo fmt
|
|
if: always()
|
|
run: taplo fmt --check Cargo.toml
|
|
|
|
rust:
|
|
name: Rust (${{ matrix.feature.name }})
|
|
runs-on: ubuntu-24.04
|
|
|
|
strategy:
|
|
matrix:
|
|
feature:
|
|
- name: default
|
|
|
|
- name: minimal+mimalloc
|
|
flags: "--no-default-features -F mimalloc"
|
|
|
|
- name: minimal
|
|
flags: "--no-default-features"
|
|
|
|
- name: mimalloc
|
|
flags: "-F mimalloc"
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install build dependencies
|
|
run: sudo apt install -y libluajit-5.1-dev mold
|
|
|
|
- name: Set up build cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: lint_${{ matrix.feature.name }}_${{ hashFiles('**.toml', 'Cargo.*') }}
|
|
|
|
- name: Switch to nightly toolchain
|
|
run: rustup default nightly
|
|
|
|
- name: Install components
|
|
run: rustup component add clippy rustfmt
|
|
|
|
- run: cargo clippy ${{ matrix.feature.flags }} -- -D clippy::pedantic
|
|
|
|
- if: always()
|
|
run: cargo fmt --check
|