Skip to content

Commit 66c3ae8

Browse files
authored
Merge pull request #71 from 42ByteLabs/actions-cache
feat(ci): Add caching
2 parents 56b2534 + b6874c7 commit 66c3ae8

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ jobs:
3232
if: steps.changes.outputs.src == 'true'
3333
with:
3434
components: clippy,rustfmt
35+
36+
- name: Restore cached Cargo
37+
id: cache-restore
38+
if: steps.changes.outputs.src == 'true'
39+
uses: actions/cache/restore@v4
40+
with:
41+
path: |
42+
~/.cargo/bin/
43+
~/.cargo/registry/index/
44+
~/.cargo/registry/cache/
45+
~/.cargo/git/db/
46+
target/
47+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
3548

3649
- name: Build
3750
if: steps.changes.outputs.src == 'true'
@@ -56,3 +69,16 @@ jobs:
5669
if: steps.changes.outputs.src == 'true'
5770
run: |
5871
cargo clippy --all-targets
72+
73+
- name: Save Cargo / Rust Cache
74+
id: cache-save
75+
if: steps.changes.outputs.src == 'true'
76+
uses: actions/cache/save@v4
77+
with:
78+
path: |
79+
~/.cargo/bin/
80+
~/.cargo/registry/index/
81+
~/.cargo/registry/cache/
82+
~/.cargo/git/db/
83+
target/
84+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}

geekorm-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geekorm-core"
3-
description = "GeekORM core library"
3+
description = "GeekORM Core Library"
44

55
version.workspace = true
66
categories.workspace = true

0 commit comments

Comments
 (0)