Skip to content

Commit 46836bc

Browse files
committed
Use depot cargo caching
1 parent 760da64 commit 46836bc

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

.github/workflows/push.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ jobs:
9999
env:
100100
CARGO_TERM_COLOR: always
101101
steps:
102+
- uses: mozilla-actions/[email protected]
103+
- uses: depot/setup-action@v1
102104
- uses: actions/checkout@v5
103105
with:
104106
persist-credentials: false
@@ -107,12 +109,12 @@ jobs:
107109
with:
108110
shared-key: rust-lint
109111
save-if: ${{ github.ref == 'refs/heads/master' }}
110-
- run: cargo fmt --check --all
111-
- run: cargo check --workspace --all-targets
112+
- run: depot cargo fmt --check --all
113+
- run: depot cargo check --workspace --all-targets
112114
- name: cargo clippy
113115
run: |
114116
rustup component add clippy
115-
cargo clippy --workspace --all-targets -- -D warnings
117+
depot cargo clippy --workspace --all-targets -- -D warnings
116118
117119
rust-but-binary-no-tauri:
118120
needs: changes
@@ -121,6 +123,8 @@ jobs:
121123
env:
122124
CARGO_TERM_COLOR: always
123125
steps:
126+
- uses: mozilla-actions/[email protected]
127+
- uses: depot/setup-action@v1
124128
- uses: actions/checkout@v5
125129
with:
126130
persist-credentials: false
@@ -132,7 +136,7 @@ jobs:
132136
- run: |
133137
sudo apt update
134138
sudo apt install -y libdbus-1-dev pkg-config
135-
- run: cargo build -p but
139+
- run: depot cargo build -p but
136140

137141
rust-docs:
138142
needs: changes
@@ -143,6 +147,8 @@ jobs:
143147
env:
144148
CARGO_TERM_COLOR: always
145149
steps:
150+
- uses: mozilla-actions/[email protected]
151+
- uses: depot/setup-action@v1
146152
- uses: actions/checkout@v5
147153
with:
148154
persist-credentials: false
@@ -151,7 +157,7 @@ jobs:
151157
with:
152158
shared-key: rust-docs
153159
save-if: ${{ github.ref == 'refs/heads/master' }}
154-
- run: cargo doc --no-deps --all-features --document-private-items -p gitbutler-git
160+
- run: depot cargo doc --no-deps --all-features --document-private-items -p gitbutler-git
155161
env:
156162
RUSTDOCFLAGS: -Dwarnings
157163

@@ -179,6 +185,8 @@ jobs:
179185
run:
180186
shell: bash
181187
steps:
188+
- uses: mozilla-actions/[email protected]
189+
- uses: depot/setup-action@v1
182190
- uses: actions/checkout@v5
183191
with:
184192
persist-credentials: false
@@ -188,15 +196,15 @@ jobs:
188196
shared-key: rust-testing
189197
save-if: ${{ github.ref == 'refs/heads/master' }}
190198
- run: |
191-
cargo test --workspace
199+
depot cargo test --workspace
192200
env:
193201
GITBUTLER_TESTS_NO_CLEANUP: '1'
194202
name: cargo test
195203
- run: |
196204
set -e
197-
cargo check -p gitbutler-tauri --no-default-features
205+
depot cargo check -p gitbutler-tauri --no-default-features
198206
for feature in devtools custom-protocol error-context; do
199-
cargo check -p gitbutler-tauri --no-default-features --features "$feature"
207+
depot cargo check -p gitbutler-tauri --no-default-features --features "$feature"
200208
done
201209
name: Check Tauri App
202210
@@ -207,6 +215,8 @@ jobs:
207215
env:
208216
CARGO_TERM_COLOR: always
209217
steps:
218+
- uses: mozilla-actions/[email protected]
219+
- uses: depot/setup-action@v1
210220
- uses: actions/checkout@v5
211221
with:
212222
persist-credentials: false
@@ -216,7 +226,7 @@ jobs:
216226
shared-key: rust-testing
217227
save-if: ${{ github.ref == 'refs/heads/master' }}
218228
- name: 'cargo check'
219-
run: cargo check --workspace --all-targets --features windows
229+
run: depot cargo check --workspace --all-targets --features windows
220230

221231
check-rust:
222232
if: always()
@@ -230,6 +240,8 @@ jobs:
230240
env:
231241
CARGO_TERM_COLOR: always
232242
steps:
243+
- uses: mozilla-actions/[email protected]
244+
- uses: depot/setup-action@v1
233245
- name: Decide whether the needed jobs succeeded or failed
234246
uses: re-actors/alls-green@release/v1
235247
with:

.github/workflows/test-e2e-blackbox.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
env:
2626
CARGO_TERM_COLOR: always
2727
steps:
28+
- uses: mozilla-actions/[email protected]
29+
- uses: depot/setup-action@v1
2830
- uses: actions/checkout@v5
2931
with:
3032
persist-credentials: false
@@ -48,7 +50,7 @@ jobs:
4850
- name: Setup node environment
4951
uses: ./.github/actions/init-env-node
5052
- name: Build CLI
51-
run: cargo build -p gitbutler-cli
53+
run: depot cargo build -p gitbutler-cli
5254
- name: Build SvelteKit
5355
run: pnpm build:desktop -- --mode development
5456
- name: Build Tauri

.github/workflows/test-e2e-playwright.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
VITE_BUTLER_HOST: 'localhost'
2828
VITE_BUILD_TARGET: 'web'
2929
steps:
30+
- uses: mozilla-actions/[email protected]
31+
- uses: depot/setup-action@v1
3032
- uses: actions/checkout@v5
3133
with:
3234
persist-credentials: false
@@ -65,11 +67,11 @@ jobs:
6567
if: ${{ steps.playwright-cache.outputs.cache-hit == 'true' && github.ref != 'refs/heads/master' }}
6668
name: Install missing deps after cache hit
6769
- name: Build gitbutler-git
68-
run: cargo build -p gitbutler-git
70+
run: depot cargo build -p gitbutler-git
6971
- name: Build but-server
70-
run: cargo build -p but-server
72+
run: depot cargo build -p but-server
7173
- name: Build but-testing
72-
run: cargo build -p but-testing
74+
run: depot cargo build -p but-testing
7375
- name: Build SvelteKit
7476
run: pnpm build:desktop
7577
if: ${{ github.ref != 'refs/heads/master' }}

0 commit comments

Comments
 (0)