mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
Use swig to generate js bindings (#12410)
This commit is contained in:
@@ -22,27 +22,17 @@ jobs:
|
||||
working-directory: ${{github.workspace}}/native
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Downlad external libraties
|
||||
run: |
|
||||
npm install
|
||||
npm install gulp -g
|
||||
node ./utils/download-deps.js
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
- name: Generate bindings
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python ./tools/tojs/genbindings.py
|
||||
EXT_VERSION=`node ../.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external external
|
||||
- name: Generate bindings
|
||||
run: |
|
||||
cd ./tools/swig-config
|
||||
echo "Create auto-generated jsbinding glue codes."
|
||||
node genbindings.js &&
|
||||
git status
|
||||
|
||||
- name: Run Unit Tests
|
||||
shell: bash
|
||||
@@ -67,29 +57,18 @@ jobs:
|
||||
working-directory: ${{github.workspace}}/native
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Downlad external libraties
|
||||
run: |
|
||||
npm install
|
||||
npm install gulp -g
|
||||
node ./utils/download-deps.js
|
||||
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
add-to-path: false
|
||||
- name: Generate bindings
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python -m pip install PyYAML==5.4.1 Cheetah3
|
||||
python ./tools/tojs/genbindings.py
|
||||
EXT_VERSION=`node ../.github/workflows/get-native-external-version.js`
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external external
|
||||
|
||||
- name: Generate bindings
|
||||
run: |
|
||||
cd ./tools/swig-config
|
||||
echo "Create auto-generated jsbinding glue codes."
|
||||
node genbindings.js
|
||||
git status
|
||||
- name: Run Sebind Tests
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -121,12 +100,12 @@ 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: Generate bindings
|
||||
# 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: Install dependencies
|
||||
# run: |
|
||||
# sudo apt install libx11-dev -y
|
||||
|
||||
Reference in New Issue
Block a user