Skip to content

Commit b213f12

Browse files
ci(build): Cache dependencies on release build (#2745)
This will speed up release builds. Caching is less important here than for tests, but as we appear to be well under the 10 GB cache limit, why not cache more things?
1 parent 775f60f commit b213f12

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
steps:
3434
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
3535

36+
- name: Cache Dependencies
37+
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0
38+
3639
- name: Build
3740
run: cargo build --release --target=${{ matrix.target }} --locked
3841

@@ -64,6 +67,9 @@ jobs:
6467
- name: Add Rustup Target
6568
run: rustup target add ${{ matrix.target }}
6669

70+
- name: Cache Dependencies
71+
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0
72+
6773
- name: Run Cargo Build
6874
run: cargo build --target=${{ matrix.target }} --release --locked
6975

@@ -190,6 +196,9 @@ jobs:
190196
- name: Add Rustup Target
191197
run: rustup target add ${{ env.TARGET }}
192198

199+
- name: Cache Dependencies
200+
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0
201+
193202
- name: Run Cargo Build
194203
run: cargo build --target=${{ env.TARGET }} --release --locked
195204

0 commit comments

Comments
 (0)