forked from cocos/cocos-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.8.2' of https://github.com/cocos/cocos-engine into p…
…article
- Loading branch information
Showing
325 changed files
with
23,215 additions
and
10,229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: <Native> Generate Android NDK Cache | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
android_ndk_sdk_version: | ||
description: 'Android NDK Version' | ||
type: string | ||
default: 'r21e' | ||
required: true | ||
|
||
jobs: | ||
generate_android_ndk_cache: | ||
name: "Generate Android NDK Cache" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Android NDK | ||
uses: nttld/setup-ndk@v1 | ||
id: setup-ndk | ||
with: | ||
ndk-version: ${{ github.event.inputs.android_ndk_sdk_version }} | ||
local-cache: true | ||
|
||
- name: Verify | ||
env: | ||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
run: | | ||
cd ${ANDROID_NDK_HOME} | ||
cat source.properties | ||
platform=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
./toolchains/llvm/prebuilt/${platform}-x86_64/bin/clang -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: <Native> Generate Emsdk Cache | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
emsdk_version: | ||
description: 'Emsdk version' | ||
type: string | ||
default: '3.1.45' | ||
required: true | ||
|
||
jobs: | ||
generate_emsdk_cache: | ||
name: "Generate Emsdk cache" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup emsdk | ||
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846 | ||
with: | ||
version: ${{ github.event.inputs.emsdk_version }} | ||
actions-cache-folder: 'emsdk-cache' | ||
|
||
- name: Verify | ||
run: | | ||
which emcc | ||
emcc -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ jobs: | |
with: | ||
ndk-version: r21e | ||
add-to-path: false | ||
local-cache: true | ||
- uses: actions/setup-java@v3 | ||
id: setup-jdk | ||
with: | ||
|
@@ -163,6 +164,7 @@ jobs: | |
with: | ||
ndk-version: r21e | ||
add-to-path: false | ||
local-cache: true | ||
- uses: actions/setup-java@v3 | ||
id: setup-jdk | ||
with: | ||
|
@@ -331,6 +333,8 @@ jobs: | |
echo "set(CMAKE_CXX_STANDARD_REQUIRED ON)" >> build-oh/proj/cfg.cmake | ||
echo "set(COCOS_X_PATH $NATIVE_ROOT)" >> build-oh/proj/cfg.cmake | ||
echo "set(CC_EXECUTABLE_NAME \"\")" >> build-oh/proj/cfg.cmake | ||
echo "set(USE_SE_V8 OFF)" >> build-oh/proj/cfg.cmake | ||
echo "set(USE_SE_NAPI ON)" >> build-oh/proj/cfg.cmake | ||
echo "=============== cat build-oh/proj/cfg.cmake ===============" | ||
cat build-oh/proj/cfg.cmake | ||
|
@@ -364,9 +368,7 @@ jobs: | |
echo "{\"hvigorVersion\":\"3.0.2\",\"dependencies\":{\"@ohos/hvigor-ohos-plugin\":\"3.0.2\"}}" > ./hvigor/hvigor-config.json5 | ||
echo "=============== Do not import game.ts for cocos_worker.ts ===============" | ||
sed -i "s@import . launchEngine .@const window = globalThis;//@g" ./entry/src/main/ets/workers/cocos_worker.ts | ||
sed -i 's@launchEngine().then@/*@g' ./entry/src/main/ets/workers/cocos_worker.ts | ||
sed -i '[email protected]@*/window.oh.postMessage@g' ./entry/src/main/ets/workers/cocos_worker.ts | ||
sed -i '/<% if(!useV8) { %>/,/<% } %>/d' ./entry/src/main/ets/workers/cocos_worker.ts | ||
echo "=============== EXECUTE hvigorw ===============" | ||
./hvigorw clean -i | ||
|
@@ -529,33 +531,3 @@ jobs: | |
cmake --build . --config Debug -- -jobs $NUM_OF_CORES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | ||
fi | ||
echo "Compile iOS Done!" | ||
compile_wgpu_mac: | ||
name: "Emscripten" | ||
runs-on: macos-latest | ||
if: contains( github.event.pull_request.title, 'WGPU_CI_ON' ) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download external libraries | ||
shell: bash | ||
run: | | ||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` | ||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external | ||
- name: Setup Emscripten | ||
run: | | ||
NATIVE_ROOT=$GITHUB_WORKSPACE/native | ||
git clone https://github.com/emscripten-core/emsdk.git NATIVE_ROOT/../../emsdk | ||
cd NATIVE_ROOT/../../emsdk | ||
./emsdk install 3.1.17 | ||
./emsdk activate 3.1.17 | ||
source ./emsdk_env.sh | ||
emcc -v | ||
- name: Compile | ||
env: | ||
COCOS_ENGINE_DEV: 1 | ||
run: | | ||
NATIVE_ROOT=$GITHUB_WORKSPACE/native | ||
cd $NATIVE_ROOT/cocos/renderer/gfx-wgpu | ||
$NATIVE_ROOT/../../emsdk/upstream/emscripten/emcmake cmake . | ||
$NATIVE_ROOT/../../emsdk/upstream/emscripten/emmake make | ||
echo "Compile WGPU by ems on MacOS Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: <Native> Compile WebGPU | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'native/external-config.json' | ||
- 'native/cocos/base/**' | ||
- 'native/cocos/renderer/gfx-base/**' | ||
- 'native/cocos/renderer/gfx-wgpu/**' | ||
- 'native/cocos/renderer/gfx-validator/**' | ||
- 'native/cocos/renderer/gfx-empty/**' | ||
- '.github/workflows/native-compile-webgpu.yml' | ||
|
||
# github.head_ref is only defined on pull_request events | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
compile_wgpu: | ||
if: | ||
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration')) | ||
name: "Emscripten" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download external libraries | ||
shell: bash | ||
run: | | ||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` | ||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external | ||
- name: Setup emsdk | ||
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846 | ||
with: | ||
version: 3.1.45 | ||
actions-cache-folder: 'emsdk-cache' | ||
|
||
- name: Verify | ||
run: | | ||
which emcc | ||
emcc -v | ||
- name: Install ninja | ||
run: | | ||
if ! command -v ninja &> /dev/null; then | ||
echo "Ninja not found, installing..." | ||
# sudo apt update | ||
sudo apt install ninja-build | ||
else | ||
echo "Ninja is already installed." | ||
fi | ||
which ninja | ||
- name: Compile | ||
# env: | ||
# COCOS_ENGINE_DEV: 1 | ||
run: | | ||
NATIVE_ROOT=$GITHUB_WORKSPACE/native | ||
cd $NATIVE_ROOT/cocos/renderer/gfx-wgpu | ||
mkdir build | ||
cd build | ||
cmake .. -GNinja -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Debug | ||
ninja | ||
echo "============== Compile WGPU by ems on Ubuntu Done! ==============" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.