name: 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/setup-vulkan-sdk@v1.2.0 with: vulkan-query-version: 1.2.189.0 vulkan-components: Vulkan-Headers, Vulkan-Loader vulkan-use-cache: true - 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 - 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: | 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