Skip to content

Commit ff2e63c

Browse files
committed
Cache HarmonyOS build outputs on failure
1 parent bcbca00 commit ff2e63c

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎.github/workflows/harmonyos-test.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ jobs:
5454
run: |
5555
script/setup-harmonyos-runner.sh
5656
57-
- name: Cache HarmonyOS Cargo dependencies
58-
uses: actions/cache@v4
57+
- name: Restore HarmonyOS Cargo build cache
58+
id: harmonyos-cargo-cache
59+
uses: actions/cache/restore@v4
5960
with:
6061
path: |
6162
~/.cargo/registry/index/
@@ -162,3 +163,14 @@ jobs:
162163
path: |
163164
dist/harmonyos/*.hap
164165
ohos/**/*.hap
166+
167+
- name: Save HarmonyOS Cargo build cache
168+
if: always()
169+
uses: actions/cache/save@v4
170+
with:
171+
path: |
172+
~/.cargo/registry/index/
173+
~/.cargo/registry/cache/
174+
~/.cargo/git/db/
175+
ohos/native/target/
176+
key: ${{ steps.harmonyos-cargo-cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)