Skip to content

Commit 5eecb47

Browse files
committed
workspace: check in Cargo.lock
This is fine as the Cargo.lock lives on the top level and is not automatically packaged into the crates, when they are published. This guarantees us increased CI stability and better caching.
1 parent 678bcc1 commit 5eecb47

File tree

3 files changed

+96
-4
lines changed

3 files changed

+96
-4
lines changed

.github/workflows/_build-rust.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ jobs:
5858
~/.cargo/registry/cache/
5959
~/.cargo/git/db/
6060
target/
61-
# We do not have a Cargo.lock here, so I hash Cargo.toml
62-
key: ${{ runner.os }}-rust-${{ inputs.rust-version }}-cargo-${{ hashFiles('**/Cargo.toml') }}
63-
restore-keys: ${{ runner.os }}-cargo-${{ inputs.rust-version }}
61+
key: ${{ runner.os }}-rust-${{ inputs.rust-version }}-cargo-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
6462
- run: cargo version
6563
- name: Build (library)
6664
run: cargo build --target ${{ inputs.rust-target }} --features ${{ inputs.features }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
target
2-
Cargo.lock
32
*.swp

Cargo.lock

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)