Skip to content

Commit 397d840

Browse files
committed
improve releasing: add cache management
1 parent 9a039b5 commit 397d840

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v6
4545

46+
- name: Cache Cargo registry and index
47+
uses: actions/cache@v5
48+
with:
49+
path: |
50+
~/.cargo/registry
51+
~/.cargo/git
52+
key: ${{ runner.os }}-cargo-registry-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
53+
restore-keys: |
54+
${{ runner.os }}-cargo-registry-${{ matrix.target }}-
55+
${{ runner.os }}-cargo-registry-
56+
57+
- name: Cache cargo target
58+
uses: actions/cache@v5
59+
with:
60+
path: target
61+
key: ${{ runner.os }}-cargo-target-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
62+
restore-keys: |
63+
${{ runner.os }}-cargo-target-${{ matrix.target }}-
64+
${{ runner.os }}-cargo-target-
65+
4666
- name: Install system deps (Ubuntu)
4767
if: matrix.runner == 'ubuntu-24.04' || matrix.runner == 'ubuntu-24.04-arm'
4868
run: |
@@ -64,6 +84,19 @@ jobs:
6484
brew update || true
6585
brew install cairo pango fontconfig pkg-config lzo libffi zlib bzip2 graphite2 libpng freetype harfbuzz pixman pcre2 || true
6686
87+
- name: Cache vcpkg (Windows)
88+
if: matrix.runner == 'windows-latest'
89+
uses: actions/cache@v5
90+
with:
91+
path: |
92+
C:/vcpkg/installed
93+
C:/vcpkg/downloads
94+
C:/vcpkg/packages
95+
key: ${{ runner.os }}-vcpkg-${{ matrix.target }}-${{ hashFiles('**/vcpkg.json') }}
96+
restore-keys: |
97+
${{ runner.os }}-vcpkg-${{ matrix.target }}-
98+
${{ runner.os }}-vcpkg-
99+
67100
- name: Install system deps (Windows)
68101
if: matrix.runner == 'windows-latest'
69102
shell: bash

0 commit comments

Comments
 (0)