From 55c7fed138ad65c74e3561a209e4ed57b31e059d Mon Sep 17 00:00:00 2001 From: PeterCJ Date: Thu, 3 Sep 2026 16:21:47 -0700 Subject: [PATCH] Add debug builds to push, pull, and release - edit the existing CI_build to add debug artifacts to each push/pull(PR) build - replicate to CD_release and store those debug zips as Assets on the Release --- .github/workflows/CD_release.yml | 94 ++++++++++++++++++++++++++++++++ .github/workflows/CI_build.yml | 21 +++++++ 2 files changed, 115 insertions(+) create mode 100644 .github/workflows/CD_release.yml diff --git a/.github/workflows/CD_release.yml b/.github/workflows/CD_release.yml new file mode 100644 index 00000000..c6ccca65 --- /dev/null +++ b/.github/workflows/CD_release.yml @@ -0,0 +1,94 @@ +name: CD_release +on: + release: + types: [published] + +jobs: + build: + runs-on: windows-2022 + permissions: + contents: write + strategy: + fail-fast: false + matrix: + build_platform: [x64, x86, ARM64] + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Configure curl (${{ matrix.build_platform }}) + run: | + $arch = "${{ matrix.build_platform }}" -eq "x86" ? "Win32" : "${{ matrix.build_platform }}" + cmake curl -B curl/build/${{ matrix.build_platform }} -A $arch ` + -DBUILD_SHARED_LIBS=OFF ` + -DCURL_STATIC_CRT=ON ` + -DBUILD_CURL_EXE=OFF ` + -DCURL_USE_SCHANNEL=ON ` + -DCURL_USE_OPENSSL=OFF ` + -DBUILD_TESTING=OFF ` + -DUSE_LIBPSL=OFF ` + -DCURL_USE_LIBPSL=OFF ` + -DUSE_NGHTTP2=OFF ` + -DUSE_LIBIDN2=OFF + + - name: Build curl Release (${{ matrix.build_platform }}) + run: cmake --build curl/build/${{ matrix.build_platform }} --config Release + + - name: Build curl Debug (${{ matrix.build_platform }}) + run: cmake --build curl/build/${{ matrix.build_platform }} --config Debug + + - name: Build GUP Release (${{ matrix.build_platform }}) + working-directory: vcproj + run: msbuild GUP.sln /m /p:configuration="Release" /p:platform="${{ matrix.build_platform }}" + + - name: Build GUP Debug (${{ matrix.build_platform }}) + working-directory: vcproj + run: msbuild GUP.sln /m /p:configuration="Debug" /p:platform="${{ matrix.build_platform }}" + + - name: build debug zipfile x64 + if: matrix.build_platform == 'x64' + run: Compress-Archive -Path ".\vcproj\x64\Debug\*" -DestinationPath "${{ github.workspace }}\gup_dbg_exe_x64.zip" + + - name: Store gup_dbg_exe_x64.zip as Release Asset + uses: svenstaro/upload-release-action@v2 + if: matrix.build_platform == 'x64' + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: gup_dbg_exe_x64.zip + asset_name: gup_dbg_exe_x64.zip + tag: ${{ github.ref }} + overwrite: true + body: ${{ github.event.release.body }} + + - name: build debug zipfile x86 + if: matrix.build_platform == 'x86' + run: Compress-Archive -Path ".\vcproj\Debug\*" -DestinationPath "${{ github.workspace }}\gup_dbg_exe_Win32.zip" + + - name: Store gup_dbg_exe_Win32.zip as Release Asset + if: matrix.build_platform == 'x86' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: gup_dbg_exe_Win32.zip + asset_name: gup_dbg_exe_Win32.zip + tag: ${{ github.ref }} + overwrite: true + body: ${{ github.event.release.body }} + + - name: build debug zipfile ARM64 + if: matrix.build_platform == 'ARM64' + run: Compress-Archive -Path ".\vcproj\ARM64\Debug\*" -DestinationPath "${{ github.workspace }}\gup_dbg_exe_ARM64.zip" + + - name: Store gup_dbg_exe_ARM64.zip as Release Asset + if: matrix.build_platform == 'ARM64' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: gup_dbg_exe_ARM64.zip + asset_name: gup_dbg_exe_ARM64.zip + tag: ${{ github.ref }} + overwrite: true + body: ${{ github.event.release.body }} diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 61127752..c1b6b7ef 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -50,6 +50,13 @@ jobs: name: gup_exe_x64 path: bin64\ + - name: Archive artifacts for x64_dbg + if: matrix.build_platform == 'x64' + uses: actions/upload-artifact@v4 + with: + name: gup_exe_x64_dbg + path: vcproj\x64\Debug\ + - name: Archive artifacts for x86 if: matrix.build_platform == 'x86' uses: actions/upload-artifact@v4 @@ -57,9 +64,23 @@ jobs: name: gup_exe_x86 path: bin\ + - name: Archive artifacts for x86_dbg + if: matrix.build_platform == 'x86' + uses: actions/upload-artifact@v4 + with: + name: gup_exe_x86_dbg + path: vcproj\Debug\ + - name: Archive artifacts for ARM64 if: matrix.build_platform == 'ARM64' uses: actions/upload-artifact@v4 with: name: gup_exe_arm64 path: binarm64\ + + - name: Archive artifacts for ARM64_dbg + if: matrix.build_platform == 'ARM64' + uses: actions/upload-artifact@v4 + with: + name: gup_exe_arm64_dbg + path: vcproj\ARM64\Debug\