Skip to content

Tune lints for 1.79 Rust #133

Tune lints for 1.79 Rust

Tune lints for 1.79 Rust #133

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
tags: ["arcane-*"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
jobs:
##########################
# Linting and formatting #
##########################
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- run: make cargo.lint
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- run: make cargo.fmt check=yes
###########
# Testing #
###########
feature:
strategy:
fail-fast: false
matrix:
include:
- { features: "<none>", crate: "arcane-core" }
- { features: "es", crate: "arcane-core" }
- { features: "reflect", crate: "arcane-core" }
- { features: "es,reflect", crate: "arcane-core" }
- { features: "<none>", crate: "arcane-codegen" }
- { features: "es", crate: "arcane-codegen" }
- { features: "reflect", crate: "arcane-codegen" }
- { features: "es,reflect", crate: "arcane-codegen" }
- { features: "<none>", crate: "arcane" }
- { features: "derive", crate: "arcane" }
- { features: "es", crate: "arcane" }
- { features: "reflect", crate: "arcane" }
- { features: "derive,es", crate: "arcane" }
- { features: "derive,reflect", crate: "arcane" }
- { features: "derive,es,reflect", crate: "arcane" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- run: cargo +nightly update -Z minimal-versions
- run: cargo test -p ${{ matrix.crate }} --no-default-features
${{ (matrix.features != '<none>'
&& format('--features {0}', matrix.features))
|| '' }}
env:
RUSTFLAGS: -D warnings
msrv:
name: MSRV
strategy:
fail-fast: false
matrix:
msrv: ["1.75.0"]
os: ["ubuntu", "macOS", "windows"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.msrv }}
- run: cargo +nightly update -Z minimal-versions
- run: make test.cargo
test:
strategy:
fail-fast: false
matrix:
crate:
- arcane-core
- arcane-codegen-impl
- arcane-codegen-shim
- arcane-codegen
- arcane
toolchain: ["stable", "beta", "nightly"]
os: ["ubuntu", "macOS", "windows"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rust-src
- run: cargo install cargo-careful
if: ${{ matrix.toolchain == 'nightly' }}
- run: make test.cargo crate=${{ matrix.crate }}
careful=${{ (matrix.toolchain == 'nightly' && 'yes')
|| 'no' }}
#################
# Documentation #
#################
rustdoc:
strategy:
fail-fast: false
matrix:
crate:
- arcane-core
- arcane-codegen-impl
- arcane-codegen-shim
- arcane-codegen
- arcane
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- run: make cargo.doc crate=${{ matrix.crate }}
private=yes docsrs=yes
open=no
env:
RUSTFLAGS: -D warnings