From 614a5234051649136726d3790c272b4530a7a7e1 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:08:43 +0800 Subject: [PATCH 01/13] Add verify app ci --- .github/workflows/veirfy-app.yml | 148 +++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/veirfy-app.yml diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml new file mode 100644 index 00000000000..dc912d11b12 --- /dev/null +++ b/.github/workflows/veirfy-app.yml @@ -0,0 +1,148 @@ +name: verify-app + +on: + workflow_dispatch: + inputs: + pr_id: + # actions run ID + description: 'Please input release version, example: 2426' + # Default value if no value is explicitly provided + default: '' + # Input has to be provided for the workflow to run + required: false +env: + pr_id: ${{ github.event.inputs }} + +jobs: + win32: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -d HelloCpp + winuwp: + # build uwp debug avoid github CI fail with memory issue + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -d HelloCpp -p winuwp + win32-clang: + runs-on: windows-latest + env: + # Test winsdk < 10.0.22000.0 (missing C11 standard stdalign.h), axmol will auto fallback to C99 for resolving compiling issue. + WINSDK_VER: '10.0.19041.0' + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -d HelloCpp -cc clang + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Merge PR + shell: pwsh + run: if ($pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + - name: Install deps + run: | + echo -e "y" | pwsh ./setup.ps1 + - name: Build + shell: pwsh + run: | + axmol new HelloCpp + axmol -d HelloCpp + osx-arm64: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -d HelloCpp + osx-x64: + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -d HelloCpp + android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -p android -d HelloCpp + ios: + runs-on: macos-latest + strategy: + matrix: + target_os: + - ios + - tvos + env: + TARGET_OS: ${{ matrix.target_os }} + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -p $env:TARGET_OS -a x64 -d HelloCpp + wasm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: | + if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } + ./setup.ps1 + axmol new HelloCpp + axmol -p wasm -d HelloCpp From 415f5292e7bba8b3f058b2a56f2c87d677856485 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:19:09 +0800 Subject: [PATCH 02/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 937265f3636..d64bbe6d269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## axmol-2.4.0 Feb.23 2025 +## axmol-2.4.0 Feb.23 2025 test ### Bug fixes From a4ce239afd87cee22483833b4f7f44b0752ef8f5 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:21:40 +0800 Subject: [PATCH 03/13] fixup [skip ci] --- .github/workflows/veirfy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index dc912d11b12..381f4871885 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -11,7 +11,7 @@ on: # Input has to be provided for the workflow to run required: false env: - pr_id: ${{ github.event.inputs }} + pr_id: ${{ github.event.inputs.pr_id }} jobs: win32: From 0c2e84b54a32aa2cacbcf712f17c3ed5263abe88 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:26:03 +0800 Subject: [PATCH 04/13] fixup [skip ci] --- .github/workflows/veirfy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 381f4871885..4c1b911819d 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -11,7 +11,7 @@ on: # Input has to be provided for the workflow to run required: false env: - pr_id: ${{ github.event.inputs.pr_id }} + pr_id: '${{ github.event.inputs.pr_id }}' jobs: win32: From 88ea0e05a17da73f1ba2d9c9e48f84269c76461f Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:30:40 +0800 Subject: [PATCH 05/13] fixup [skip ci] --- .github/workflows/veirfy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 4c1b911819d..db98ec1529a 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -11,7 +11,7 @@ on: # Input has to be provided for the workflow to run required: false env: - pr_id: '${{ github.event.inputs.pr_id }}' + pr_id: ${{ inputs.pr_id }} jobs: win32: From ad3c7d27311989348fc921f902617b7ca1e66f88 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:35:03 +0800 Subject: [PATCH 06/13] Update veirfy-app.yml [skip ci] From 1f3167c38357f86a92cb896653851e310b3b02e2 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:36:01 +0800 Subject: [PATCH 07/13] Update veirfy-app.yml [skip ci] --- .github/workflows/veirfy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index db98ec1529a..51a779926b6 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -11,7 +11,7 @@ on: # Input has to be provided for the workflow to run required: false env: - pr_id: ${{ inputs.pr_id }} + pr_id: 1 jobs: win32: From e377409a84c601b3a1175a397ffffadb3ea681a6 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:36:55 +0800 Subject: [PATCH 08/13] Update veirfy-app.yml [skip ci] --- .github/workflows/veirfy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 51a779926b6..02e5a1b2be0 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -11,7 +11,7 @@ on: # Input has to be provided for the workflow to run required: false env: - pr_id: 1 + __CXXSTD: "23" jobs: win32: From f426b0aba859f98776f18be199526cf2557ee00d Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:38:12 +0800 Subject: [PATCH 09/13] Update veirfy-app.yml --- .github/workflows/veirfy-app.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 02e5a1b2be0..03a37c6d01d 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -4,14 +4,14 @@ on: workflow_dispatch: inputs: pr_id: - # actions run ID - description: 'Please input release version, example: 2426' - # Default value if no value is explicitly provided - default: '' - # Input has to be provided for the workflow to run - required: false + # actions run ID + description: 'Please input release version, example: 2426' + # Default value if no value is explicitly provided + default: '' + # Input has to be provided for the workflow to run + required: false env: - __CXXSTD: "23" + pr_id: "1" jobs: win32: From c32f16bee67090366471b978b66f3a95fca9ea53 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:40:45 +0800 Subject: [PATCH 10/13] Update veirfy-app.yml [skip ci] --- .github/workflows/veirfy-app.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 03a37c6d01d..f24eea48777 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -2,17 +2,10 @@ name: verify-app on: workflow_dispatch: - inputs: - pr_id: - # actions run ID - description: 'Please input release version, example: 2426' - # Default value if no value is explicitly provided - default: '' - # Input has to be provided for the workflow to run - required: false -env: - pr_id: "1" +env: + __1K_CXXSTD: '23' + jobs: win32: runs-on: windows-latest From 1962733349ecadb2148e4bc862efc0edc961512a Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:42:28 +0800 Subject: [PATCH 11/13] Update veirfy-app.yml [skip ci] --- .github/workflows/veirfy-app.yml | 152 +++++++++++++++++-------------- 1 file changed, 85 insertions(+), 67 deletions(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index f24eea48777..700df4321c7 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -1,11 +1,11 @@ -name: verify-app +name: build on: workflow_dispatch: env: __1K_CXXSTD: '23' - + jobs: win32: runs-on: windows-latest @@ -15,58 +15,58 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -d HelloCpp - winuwp: - # build uwp debug avoid github CI fail with memory issue - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 + run: .\tools\cmdline\axmol -p win32 -a x64 && .\tools\cmdline\axmol run -p win32 -a x64 -t unit-tests + - uses: actions/upload-artifact@v4 with: - submodules: 'recursive' - - name: Build - shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -d HelloCpp -p winuwp + name: windows_x64 + path: | + build/bin/cpp-tests/**/* + win32-dll: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: .\tools\cmdline\axmol -p win32 -a x64 -dll + winuwp: + # build uwp debug avoid github CI fail with memory issue + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: .\tools\cmdline\axmol -p winuwp -a x64 -O0 win32-clang: - runs-on: windows-latest - env: - # Test winsdk < 10.0.22000.0 (missing C11 standard stdalign.h), axmol will auto fallback to C99 for resolving compiling issue. - WINSDK_VER: '10.0.19041.0' - steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Build - shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -d HelloCpp -cc clang + runs-on: windows-latest + env: + # Test winsdk < 10.0.22000.0 (missing C11 standard stdalign.h), axmol will auto fallback to C99 for resolving compiling issue. + WINSDK_VER: '10.0.19041.0' + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: .\tools\cmdline\axmol -p win32 -a 'x64' -cc clang -sdk $env:WINSDK_VER linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: 'recursive' - - name: Merge PR - shell: pwsh - run: if ($pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - - name: Install deps + + - name: Install dependencies run: | - echo -e "y" | pwsh ./setup.ps1 + AX_ROOT=`pwd` + echo -e "y" | pwsh $AX_ROOT/setup.ps1 + - name: Build shell: pwsh - run: | - axmol new HelloCpp - axmol -d HelloCpp + run: ./tools/cmdline/axmol -p linux -a x64 -t 'cpp-tests,lua-tests' && ./tools/cmdline/axmol run -p linux -a x64 -t unit-tests -wait osx-arm64: runs-on: macos-latest steps: @@ -75,11 +75,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -d HelloCpp + run: ./tools/cmdline/axmol -p osx && ./tools/cmdline/axmol run -p osx -t unit-tests osx-x64: runs-on: macos-13 steps: @@ -88,13 +84,18 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -d HelloCpp + run: ./tools/cmdline/axmol -p osx && ./tools/cmdline/axmol run -p osx -t unit-tests android: runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armv7 + - arm64 + - x86 + - x64 + env: + BUILD_ARCH: ${{ matrix.arch }} steps: - uses: actions/checkout@v4 with: @@ -102,10 +103,14 @@ jobs: - name: Build shell: pwsh run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -p android -d HelloCpp + $AX_ROOT = $(Get-Location).Path + ./tools/cmdline/axmol -p android -a $env:BUILD_ARCH + - uses: actions/upload-artifact@v4 + with: + name: android_${{ matrix.arch }} + path: | + templates/**/*.apk + tests/**/*.apk ios: runs-on: macos-latest strategy: @@ -121,11 +126,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -p $env:TARGET_OS -a x64 -d HelloCpp + run: ./tools/cmdline/axmol -p $env:TARGET_OS -a 'x64' wasm: runs-on: ubuntu-latest steps: @@ -134,8 +135,25 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - if ($env:pr_id) { git pull origin pull/$env:pr_id/head --rebase ; echo "commits=$(git rev-list --count HEAD)" } - ./setup.ps1 - axmol new HelloCpp - axmol -p wasm -d HelloCpp + run: ./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -t 'cpp-tests,fairygui-tests,lua-tests' + - uses: actions/upload-artifact@v4 + with: + name: wasm + path: build_wasm/bin/**/* + if-no-files-found: error + - name: Repository Dispatch + if: ${{ github.repository == 'axmolengine/axmol' && github.event_name != 'pull_request' }} + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.AX_TRIGGER_SITE_TOKEN }} + repository: axmolengine/axmol.dev + event-type: forward-push + wasm64: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Build + shell: pwsh + run: ./tools/cmdline/axmol -p wasm64 -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -t 'cpp-tests,fairygui-tests,lua-tests' From 2e8d63caf64e3cac0a38a37c074f3733adec9318 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:43:32 +0800 Subject: [PATCH 12/13] Update veirfy-app.yml [skip ci] --- .github/workflows/veirfy-app.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 700df4321c7..2be5feb0dcf 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -1,7 +1,20 @@ name: build on: - workflow_dispatch: + push: + branches: dev + paths-ignore: + - '**.md' + - '**/*.md.in' + - 'docs/**' + - '.github/workflows/publish.yml' + - 'tools/ci/make-pkg.ps1' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - '**.md' + - '**/*.md.in' + - 'docs/**' env: __1K_CXXSTD: '23' From 71a4f79cfbbf52de99be5ae6d317c3bf20d2ba73 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 6 Mar 2025 00:44:41 +0800 Subject: [PATCH 13/13] Update veirfy-app.yml --- .github/workflows/veirfy-app.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/veirfy-app.yml b/.github/workflows/veirfy-app.yml index 2be5feb0dcf..012469279b3 100644 --- a/.github/workflows/veirfy-app.yml +++ b/.github/workflows/veirfy-app.yml @@ -16,9 +16,6 @@ on: - '**/*.md.in' - 'docs/**' -env: - __1K_CXXSTD: '23' - jobs: win32: runs-on: windows-latest