Skip to content

Commit

Permalink
Update ci yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Nov 19, 2024
1 parent 9368c9c commit 36f36d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/generate-oh-sdk-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: <Native> Generate OH SDK Cache

on:
workflow_dispatch:
inputs:
oh_sdk_version:
description: 'Openharmony SDK version'
type: string
default: '9'
required: true

jobs:
generate_oh_sdk_cache:
Expand All @@ -34,15 +28,11 @@ jobs:
id: cache-oh-sdk
uses: actions/cache@v4
env:
cache-name: cache-oh-sdk-${{ github.event.inputs.oh_sdk_version }}
cache-name: cache-oh-sdk-12
with:
path: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Add package.json
run: |
echo "{}" > package.json
echo "{\"name\": \"tests\",\"lockfileVersion\": 3,\"requires\": true,\"packages\": {}}" > package-lock.json
- uses: actions/setup-node@v4
with:
node-version: 14
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/native-compile-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ jobs:
path: ${{ steps.oh-sdk-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Add package.json
run: |
echo "{}" > package.json
echo "{\"name\": \"tests\",\"lockfileVersion\": 3,\"requires\": true,\"packages\": {}}" > package-lock.json
# - name: Add package.json
# run: |
# echo "{}" > package.json
# echo "{\"name\": \"tests\",\"lockfileVersion\": 3,\"requires\": true,\"packages\": {}}" > package-lock.json
- uses: actions/setup-node@v4
with:
node-version: 14
Expand Down Expand Up @@ -344,6 +344,8 @@ jobs:
echo "=============== Do not import game.ts for cocos_worker.ts ==============="
sed -i '/<% if(!useV8) { %>/,/<% } %>/d' ./entry/src/main/ets/workers/cocos_worker.ts
sed -i '/<% if(useV8) { %>/,/<% } %>/d' ./entry/src/main/ets/workers/cocos_worker.ts
ls -l ./entry/src/main/ets/workers/cocos_worker.ts
echo "=============== EXECUTE hvigorw ==============="
hvigorw clean -i
Expand Down

0 comments on commit 36f36d9

Please sign in to comment.