Skip to content

Commit 2677c55

Browse files
committed
Add caching for OpenHarmony Native SDK in CI
Introduces a cache step for the OpenHarmony Native SDK in the GitHub Actions workflow to speed up builds and reduce redundant downloads. The SDK is only downloaded if the cache is not hit.
1 parent 7d9bcdb commit 2677c55

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,15 @@ jobs:
162162
sudo apt-get update
163163
sudo apt-get install -y ninja-build unzip
164164
165+
- name: Cache OpenHarmony Native SDK
166+
id: cache-ohos-sdk
167+
uses: actions/cache@v4
168+
with:
169+
path: sdk
170+
key: ohos-sdk-v5.1.0-linux-x64-${{ runner.os }}
171+
165172
- name: Download OpenHarmony Native SDK
173+
if: steps.cache-ohos-sdk.outputs.cache-hit != 'true'
166174
run: |
167175
echo $PWD
168176
wget -q \

0 commit comments

Comments
 (0)