From ed4bec147b59c571284736f97ea42015343260e8 Mon Sep 17 00:00:00 2001 From: Mathis Date: Tue, 19 Nov 2024 13:24:40 +0100 Subject: [PATCH] CI: add job to check compilation without lock file (#2257) * CI: add job to check compilation without lock file Avoid situations like #2256 going unnoticed for so long. --- .github/workflows/build-without-lockfile.yml | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-without-lockfile.yml diff --git a/.github/workflows/build-without-lockfile.yml b/.github/workflows/build-without-lockfile.yml new file mode 100644 index 0000000000..b60d3ae9ba --- /dev/null +++ b/.github/workflows/build-without-lockfile.yml @@ -0,0 +1,35 @@ +name: Build without committed Cargo.lock + +on: + push: + branches: + - main + - release-* + tags: + # YYYYMMDD + - "20[0-9][0-9][0-1][0-9][0-3][0-9]*" + schedule: + - cron: "0 0 * * 1" + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-ignore-lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Enable Rust Caching + uses: Swatinem/rust-cache@v2 + with: + prefix-key: v1-rust + + - name: Build without committed Cargo.lock + run: | + cargo generate-lockfile + cargo check --all-features --all-targets