mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
0e29467a3d
* reopen mac os simulator check ci
107 lines
3.0 KiB
YAML
107 lines
3.0 KiB
YAML
name: <Native> Simulator
|
|
|
|
#on: [pull_request]
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'native/**'
|
|
|
|
# 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:
|
|
win_gen_simulator:
|
|
runs-on: windows-2019
|
|
if:
|
|
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration'))
|
|
name: Windows
|
|
defaults:
|
|
run:
|
|
working-directory: ${{github.workspace}}/native
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: npm install
|
|
run: |
|
|
npm install
|
|
- name: download external libraries
|
|
run: |
|
|
node ./utils/download-deps.js
|
|
- name: install vulkan-sdk
|
|
run: |
|
|
choco install vulkan-sdk
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r21e
|
|
add-to-path: false
|
|
- name: pip install
|
|
run: |
|
|
python -m pip install PyYAML==5.4.1 Cheetah3
|
|
- name: generate bindings glue codes
|
|
shell: bash
|
|
env:
|
|
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
run: |
|
|
python -V
|
|
cd ./tools/tojs
|
|
echo "Create auto-generated jsbinding glue codes."
|
|
python ./genbindings.py
|
|
rm userconf.ini
|
|
- name: gen simulator
|
|
run: |
|
|
gulp gen-simulator
|
|
- name: check result
|
|
run: |
|
|
Get-ChildItem ./simulator/Release -Name SimulatorApp-Win32.exe
|
|
if(Test-Path ./simulator/Release/SimulatorApp-Win32.exe) {exit 0} else {exit 1}
|
|
|
|
mac_gen_simulator:
|
|
runs-on: macos-latest
|
|
name: MacOS
|
|
defaults:
|
|
run:
|
|
working-directory: ${{github.workspace}}/native
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
- name: npm install
|
|
run: |
|
|
npm install
|
|
npm install gulp -g
|
|
- name: pip install
|
|
run: |
|
|
python -m pip install PyYAML Cheetah3
|
|
- name: Download external libraries
|
|
run: |
|
|
node ./utils/download-deps.js
|
|
- 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: |
|
|
python -m pip install PyYAML==5.4.1 Cheetah3
|
|
cd ./tools/tojs
|
|
echo "Create auto-generated jsbinding glue codes."
|
|
python ./genbindings.py
|
|
rm userconf.ini
|
|
- name: gen simulator
|
|
run: |
|
|
gulp gen-simulator-release
|
|
- name: check result
|
|
run: |
|
|
find ./ -name SimulatorApp-Mac
|
|
[ -f ./simulator/Release/SimulatorApp-Mac.app/Contents/MacOS/SimulatorApp-Mac ] && exit 0 || exit 1
|