Skip to content

Commit

Permalink
CI: add job to check compilation without lock file (#2257)
Browse files Browse the repository at this point in the history
* CI: add job to check compilation without lock file

Avoid situations like #2256 going unnoticed for so long.
  • Loading branch information
sveitser authored Nov 19, 2024
1 parent 5795d5a commit ed4bec1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-without-lockfile.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ed4bec1

Please sign in to comment.