Skip to content

Commit e717928

Browse files
committed
feat(ci): cache stuff
1 parent d0f0273 commit e717928

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ jobs:
2525
toolchain: 1.85.0
2626
override: true
2727

28+
- name: Cache cargo registry
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cargo/registry
33+
~/.cargo/git
34+
target
35+
~/.cargo/bin/cargo-appimage
36+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-cargo-
39+
2840
- name: Build server
2941
run: cargo build --release
3042

@@ -34,7 +46,10 @@ jobs:
3446
chmod +x /usr/local/bin/appimagetool; \
3547
sed -i 's|AI\x02|\x00\x00\x00|' /usr/local/bin/appimagetool
3648
- name: Install cargo-appimage
37-
run: cargo install cargo-appimage
49+
run: |
50+
if [ ! -f ~/.cargo/bin/cargo-appimage ]; then
51+
cargo install cargo-appimage
52+
fi
3853
3954
- name: Generate AppImage
4055
run: cargo appimage

0 commit comments

Comments
 (0)