mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
78dfe5b00c
* specify android ndk version (#11425) * ndk 21 (#11432) * fix unit test
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: <Native> Run Tests
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
unit-test-with-cmake:
|
|
name: "Run on windows"
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
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
|
|
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
|
|
|
|
- name: Run Unit Tests
|
|
shell: bash
|
|
run: |
|
|
cmake -B tests/unit-test/build -S tests/unit-test
|
|
cmake --build tests/unit-test/build --config Release
|
|
./tests/unit-test/build/src/Release/CocosTest.exe
|
|
|
|
#### TODO(PatriceJiang): model split
|
|
# - name: Run Module Tests
|
|
# shell: bash
|
|
# run: |
|
|
# cd tests/module-tests
|
|
# bash run-test-windows.sh
|