]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: replace make with ninja in Cygwin, MSYS2 and mingw-w64 cmake jobs
authorViktor Szakats <commit@vsz.me>
Sun, 15 Sep 2024 02:32:17 +0000 (04:32 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 15 Sep 2024 11:57:21 +0000 (13:57 +0200)
Speed-ups:
- cygwin build: 47s -> 29s
- cygwin build tests: 3m12 -> 2m32
- MSYS2 native build: 29s -> 16s
- MSYS2 native build tests: 2m24 -> 1m52
- MSYS2/mingw-w64: already had ninja installed and used implicitly.
- linux-mingw-w64-cross: 31s -> 25s

before:
cygwin: https://github.com/curl/curl/actions/runs/10866939355/job/30155134299
windows: https://github.com/curl/curl/actions/runs/10866939361

after:
cygwin: https://github.com/curl/curl/actions/runs/10867861215/job/30157121784
windows: https://github.com/curl/curl/actions/runs/10867861208?pr=14914

Closes #14914

.github/workflows/cygwin.yml
.github/workflows/windows.yml

index 44d575751c074f7ccb014b27c38b4a2bf2beabc5..1a16f0aa77f19fd9ceb6d4074ff7e6baaf14cd88 100644 (file)
@@ -61,7 +61,7 @@ jobs:
         with:
           platform: ${{ matrix.platform }}
           # https://cygwin.com/cgi-bin2/package-grep.cgi
-          packages: autoconf libtool ${{ matrix.build }} gcc-core gcc-g++ binutils make libssl-devel zlib-devel libbrotli-devel libnghttp2-devel libpsl-devel libssh2-devel
+          packages: autoconf libtool ${{ matrix.build }} gcc-core gcc-g++ binutils make ninja libssl-devel zlib-devel libbrotli-devel libnghttp2-devel libpsl-devel libssh2-devel
           site: https://mirrors.kernel.org/sourceware/cygwin/
 
       - name: 'autotools autoreconf'
@@ -131,7 +131,7 @@ jobs:
         timeout-minutes: 5
         run: |
           PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
-          cmake -B bld ${options} \
+          cmake -B bld -G Ninja ${options} \
             -DCMAKE_UNITY_BUILD=ON \
             -DCURL_WERROR=ON \
             -DBUILD_EXAMPLES=ON \
index 9b511e95bed86c8f1e4c2cc790abed6033013a5c..2a259ba156b01b2e39fe0e8e5dd62f380458142f 100644 (file)
@@ -69,14 +69,14 @@ jobs:
         with:
           msystem: ${{ matrix.sys }}
           # https://packages.msys2.org/search
-          install: gcc ${{ matrix.build }} make openssl-devel zlib-devel brotli-devel libnghttp2-devel libpsl-devel libssh2-devel
+          install: gcc ${{ matrix.build }} ${{ matrix.build == 'autotools' && 'make' || 'ninja' }} openssl-devel zlib-devel brotli-devel libnghttp2-devel libpsl-devel libssh2-devel
       - uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2
         if: ${{ matrix.sys != 'msys' }}
         with:
           msystem: ${{ matrix.sys }}
           install: >-
             mingw-w64-${{ matrix.env }}-cc
-            mingw-w64-${{ matrix.env }}-${{ matrix.build }} make
+            mingw-w64-${{ matrix.env }}-${{ matrix.build }} ${{ matrix.build == 'autotools' && 'make' || '' }}
             mingw-w64-${{ matrix.env }}-openssl
             mingw-w64-${{ matrix.env }}-libssh2
             mingw-w64-${{ matrix.env }}-libpsl
@@ -171,7 +171,7 @@ jobs:
           fi
           [ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
           [ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
-          cmake -B bld ${options} \
+          cmake -B bld -G Ninja ${options} \
             "-DCMAKE_C_FLAGS=${cflags}" \
             "-DCMAKE_RC_COMPILE_OBJECT=${rcopts}" \
             '-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
@@ -358,7 +358,7 @@ jobs:
       TRIPLET: 'x86_64-w64-mingw32'
     steps:
       - name: 'install packages'
-        run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
+        run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
 
       - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
 
@@ -388,7 +388,7 @@ jobs:
       - name: 'cmake configure'
         if: ${{ matrix.build == 'cmake' }}
         run: |
-          cmake -B bld \
+          cmake -B bld -G Ninja \
             -DCMAKE_SYSTEM_NAME=Windows \
             -DCMAKE_C_COMPILER_TARGET=${TRIPLET} \
             -DCMAKE_C_COMPILER=${TRIPLET}-gcc \