Use CMake for building curl in CI_build #170
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI_build | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| 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: Archive artifacts for x64 | |
| if: matrix.build_platform == 'x64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gup_exe_x64 | |
| path: bin64\ | |
| - name: Archive artifacts for x86 | |
| if: matrix.build_platform == 'x86' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gup_exe_x86 | |
| path: bin\ | |
| - name: Archive artifacts for ARM64 | |
| if: matrix.build_platform == 'ARM64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gup_exe_arm64 | |
| path: binarm64\ |