mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 02:52:39 +08:00
Use swig to generate js bindings (#12410)
This commit is contained in:
@@ -23,26 +23,16 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external native/external
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- name: Install deps
|
||||
run: |
|
||||
choco install --forcex86 vulkan-sdk
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
- name: Generate bindings
|
||||
shell: bash
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -V
|
||||
cd ./native/tools/tojs
|
||||
cd ./native/tools/swig-config
|
||||
echo "Create auto-generated jsbinding glue codes."
|
||||
python ./genbindings.py
|
||||
rm userconf.ini
|
||||
node genbindings.js &&
|
||||
git status
|
||||
- name: Compile win64
|
||||
shell: bash
|
||||
env:
|
||||
@@ -79,19 +69,17 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external native/external
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
- name: Generate bindings
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python3 -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python3 ./native/tools/tojs/genbindings.py
|
||||
rm ./native/tools/tojs/userconf.ini
|
||||
cd ./native/tools/swig-config
|
||||
node genbindings.js
|
||||
git status
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
@@ -141,19 +129,18 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external native/external
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
- name: Generate bindings
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python3 -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python3 ./native/tools/tojs/genbindings.py
|
||||
rm ./native/tools/tojs/userconf.ini
|
||||
cd ./native/tools/swig-config
|
||||
node genbindings.js
|
||||
git status
|
||||
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
@@ -203,26 +190,17 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- 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-creator/engine-native-external native/external
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
|
||||
- name: Generate bindings
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python ./native/tools/tojs/genbindings.py
|
||||
rm ./native/tools/tojs/userconf.ini
|
||||
cd ./native/tools/swig-config
|
||||
node genbindings.js
|
||||
git status
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
@@ -265,26 +243,16 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- 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-creator/engine-native-external native/external
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- name: Generate bindings
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python ./native/tools/tojs/genbindings.py
|
||||
rm ./native/tools/tojs/userconf.ini
|
||||
cd ./native/tools/swig-config
|
||||
node genbindings.js
|
||||
git status
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
@@ -328,26 +296,16 @@ jobs:
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- 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-creator/engine-native-external native/external
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- name: Generate bindings
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python ./native/tools/tojs/genbindings.py
|
||||
rm ./native/tools/tojs/userconf.ini
|
||||
cd ./native/tools/swig-config
|
||||
node genbindings.js
|
||||
git status
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
@@ -401,7 +359,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external native/external
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external
|
||||
- name: Setup Emscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git ../emsdk
|
||||
|
||||
Reference in New Issue
Block a user