mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: <Native> Generate OH SDK Cache
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate_oh_sdk_cache:
|
|
name: "Generate OH SDK cache"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get oh sdk cache directory path
|
|
id: oh-sdk-cache-dir-path
|
|
run: |
|
|
echo "cache dir: "
|
|
echo "dir=$HOME/openharmony" >> $GITHUB_OUTPUT
|
|
|
|
- name: Output cache dir
|
|
run: |
|
|
echo "Output cache dir: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}"
|
|
|
|
- name: Cache OH SDK
|
|
id: cache-oh-sdk
|
|
uses: actions/cache@v4
|
|
env:
|
|
cache-name: cache-oh-sdk-13
|
|
with:
|
|
path: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}
|
|
|
|
- if: ${{ steps.cache-oh-sdk.outputs.cache-hit != 'true' }}
|
|
name: No Cache found, install oh sdk
|
|
continue-on-error: false
|
|
run: |
|
|
if [ ! -d "$HOME/openharmony" ]; then
|
|
mkdir -p $HOME/openharmony
|
|
echo "Download commandline-tools-linux-x64-5.0.7.200.zip ..."
|
|
wget -q https://github.com/dumganhar/oh-sdk-for-ci/releases/download/api-13/commandline-tools-linux-x64-5.0.7.200.zip.001
|
|
wget -q https://github.com/dumganhar/oh-sdk-for-ci/releases/download/api-13/commandline-tools-linux-x64-5.0.7.200.zip.002
|
|
echo "Unzip commandline-tools-linux-x64-5.0.7.200.zip ..."
|
|
7z x commandline-tools-linux-x64-5.0.7.200.zip.001 -o$HOME/openharmony > /dev/null
|
|
cd $HOME/openharmony
|
|
ls -l
|
|
cd commandline-tools-linux-x64-5.0.7.200
|
|
ls -l
|
|
fi |