-
Notifications
You must be signed in to change notification settings - Fork 2.1k
73 lines (66 loc) · 2.25 KB
/
native-simulator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: <Native> Simulator
#on: [pull_request]
on:
pull_request:
paths:
- 'native/**'
- '.github\workflows\native-simulator.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:
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
- name: npm install
run: |
npm install
- 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 external
- name: Install deps
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.2.189.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: gen simulator
run: |
npx 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
- name: npm install
run: |
npm install
npm install gulp -g
- name: Download external libraries
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 external
- name: gen simulator
run: |
npx 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