mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-23 02:41:14 -03:00
This flag exists since 1.39, see https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-139-2019-11-07 While at it, remove the "--all" option from "cargo fmt", since it's not needed for formatting the entire workspace, and because it would also format path-dependencies, see https://github.com/fish-shell/fish-shell/pull/11550#discussion_r2133674330
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: Rust checks
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
rustfmt:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: cargo fmt
|
|
run: cargo fmt --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Install deps
|
|
run: |
|
|
sudo apt install gettext libpcre2-dev
|
|
- name: cmake
|
|
run: |
|
|
cmake -B build
|
|
- name: cargo clippy
|
|
# This used to have --deny=warnings, but that turns rust release day
|
|
# into automatic CI failure day, so we don't do that.
|
|
run: cargo clippy --workspace --all-targets
|
|
|
|
rustdoc:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: cargo doc
|
|
run: |
|
|
RUSTDOCFLAGS='-D warnings' cargo doc --workspace
|
|
- name: cargo doctest
|
|
run: |
|
|
cargo test --doc --workspace
|
|
|
|
# Disabling for now because it also checks "advisories",
|
|
# making CI fail for reasons unrelated to the patch
|
|
# cargo-deny:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - uses: actions/checkout@v3
|
|
# - uses: EmbarkStudios/cargo-deny-action@v1
|