From 3754b1e1831b620a5eb35d396b8a2f4384a4c74a Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Mon, 29 Apr 2024 21:22:01 +0200 Subject: [PATCH] feat(ci): add cfg check (#7965) Co-authored-by: Oliver Nordbjerg --- .github/workflows/lint.yml | 14 +++++++++++++- Makefile | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ff3dad495..b939e159d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -126,11 +126,23 @@ jobs: with: cmd: jq empty etc/grafana/dashboards/overview.json + check-cfg: + name: check-cfg + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - run: cargo +nightly -Zcheck-cfg c + lint-success: name: lint success runs-on: ubuntu-latest if: always() - needs: [clippy-binaries, clippy, crate-checks, docs, fmt, codespell, grafana] + needs: [clippy-binaries, clippy, crate-checks, docs, fmt, codespell, grafana, check-cfg] timeout-minutes: 30 steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/Makefile b/Makefile index 82994b3c2..fd5a252f1 100644 --- a/Makefile +++ b/Makefile @@ -414,8 +414,11 @@ test: make test-doc && \ make test-other-targets +cfg-check: + cargo +nightly -Zcheck-cfg c + pr: - make fmt && \ + make cfg-check && \ make lint && \ make docs && \ make test