mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
81 lines
1.8 KiB
YAML
81 lines
1.8 KiB
YAML
name: Cargo Build, Test, and Linting
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
format:
|
|
name: Check formatting
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo fmt --check
|
|
clippy:
|
|
name: Run lints
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo clippy --all-targets --all-features --no-default-features -- -D warnings
|
|
build_and_test:
|
|
name: Build project and test
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo build --verbose
|
|
- run: cargo test --verbose
|
|
build_release:
|
|
name: Build project in release
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo build --verbose --release
|
|
clippy_release:
|
|
name: Run lints in release mode
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo clippy --release --all-targets --all-features --no-default-features -- -D warnings |