From 82cd89d2606ffba6ad02dc60caf8b80fcc1f7d32 Mon Sep 17 00:00:00 2001 From: fish9167 <674821954@qq.com> Date: Wed, 16 Mar 2022 16:00:23 +0800 Subject: [PATCH] Update native-compile-platforms.yml (#10362) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update native-compile-platforms.yml 更新 windows 镜像版本 限制任务触发条件(native 目录下有文件修改才会触发该任务) * Update automation_labels.yml 组织名称修改 * change Visual Studio version 修改 Visual Studio 版本(2017-->2019) * Update native-simulator.yml 更新 windows 镜像版本 限制任务触发条件(native 目录下有文件修改才会触发该任务) --- .github/workflows/automation_labels.yml | 2 +- .github/workflows/native-compile-platforms.yml | 14 +++++++------- .github/workflows/native-simulator.yml | 12 +++++++----- native/gulpfile.js | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/automation_labels.yml b/.github/workflows/automation_labels.yml index c3528a07c0..fe3642ff06 100644 --- a/.github/workflows/automation_labels.yml +++ b/.github/workflows/automation_labels.yml @@ -14,7 +14,7 @@ jobs: - name: Check organization id: get_check_code run: | - http_code=`curl -s --head -I -H "Authorization: token ${{ secrets.LABEl_TOKEN }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/orgs/cocos-creator/members/${{ github.event.pull_request.user.login }} | awk '/HTTP/{print $2}'` + http_code=`curl -s --head -I -H "Authorization: token ${{ secrets.LABEl_TOKEN }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/orgs/cocos/members/${{ github.event.pull_request.user.login }} | awk '/HTTP/{print $2}'` echo "::set-output name=http_code::${http_code}" - name: Echo username organization run: | diff --git a/.github/workflows/native-compile-platforms.yml b/.github/workflows/native-compile-platforms.yml index ca21621fa4..c252b4d3bd 100644 --- a/.github/workflows/native-compile-platforms.yml +++ b/.github/workflows/native-compile-platforms.yml @@ -1,14 +1,14 @@ name: Compile -on: [pull_request] +#on: [pull_request] +on: + pull_request: + paths: + - 'native/**' jobs: compile_windows: - # windows 2019, Visual Studio Enterprise 2019 - # windows 2016, Visual Studio Enterprise 2017 - #runs-on: windows-latest - # runs-on: windows-2019 - runs-on: windows-2016 + runs-on: windows-2019 name: "Windows" steps: @@ -47,7 +47,7 @@ jobs: cd build-win32 RES_DIR=${GITHUB_WORKSPACE//\\//}/native/templates/windows/build-win32 COCOS_X_PATH=${GITHUB_WORKSPACE//\\//}/native - cmake ../ -G"Visual Studio 15 2017" -DRES_DIR=$RES_DIR -DCOCOS_X_PATH=$COCOS_X_PATH -Awin32 + cmake ../ -G"Visual Studio 16 2019" -DRES_DIR=$RES_DIR -DCOCOS_X_PATH=$COCOS_X_PATH -Awin32 cmake --build . --config Release echo "Compile Win32 Release Done!" diff --git a/.github/workflows/native-simulator.yml b/.github/workflows/native-simulator.yml index a7ba0df235..6f80b63b03 100644 --- a/.github/workflows/native-simulator.yml +++ b/.github/workflows/native-simulator.yml @@ -1,13 +1,14 @@ name: Simulator -on: [pull_request] +#on: [pull_request] +on: + pull_request: + paths: + - 'native/**' jobs: win_gen_simulator: - # windows 2019, Visual Studio Enterprise 2019 - # windows 2016, Visual Studio Enterprise 2017 - #runs-on: windows-latest - runs-on: windows-2016 + runs-on: windows-2019 name: Windows defaults: run: @@ -46,6 +47,7 @@ jobs: run: | Get-ChildItem ./simulator/Debug -Name SimulatorApp-Win32.exe if(Test-Path ./simulator/Debug/SimulatorApp-Win32.exe) {exit 0} else {exit 1} + # mac_gen_simulator: # runs-on: macos-latest # name: MacOS diff --git a/native/gulpfile.js b/native/gulpfile.js index 9dbe81e081..dc078089cc 100644 --- a/native/gulpfile.js +++ b/native/gulpfile.js @@ -164,7 +164,7 @@ gulp.task('gen-simulator', async function () { var args = []; args.push('-G'); if (isWin32) { - args.push('Visual Studio 15 2017','-A','x64'); + args.push('Visual Studio 16 2019','-A','x64'); } else { args.push('Xcode');