]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: use more ninja, build examples in the last step, and more
authorViktor Szakats <commit@vsz.me>
Sat, 21 Sep 2024 01:37:54 +0000 (03:37 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 22 Sep 2024 09:30:49 +0000 (11:30 +0200)
- linux: bump up test parallelism for valgrind tests to `-j4`
  (from `-j2`). (EXPERIMENTAL)
- linux: drop `apt-get update` for the default architecture on the GHA
  native runner. It makes prereq install steps complete faster.
  The runner image gets weekly updates, and that should be enough to
  guarantee fresh packages in most cases:
  https://github.com/actions/runner-images/commits/main/images/ubuntu/Ubuntu2204-Readme.md
- aws-lc: use ninja with cmake.
- aws-lc: build examples with cmake.
- aws-lc: drop `apt update`.
- aws-lc, wolfssl, linux32, http3-linux: move building examples to
  the last step.
  Follow-up to 45202cbba4bb3d12b4469063864b57d2f8765d9c #14906
- windows: formatting.

Closes #14992

.github/workflows/awslc.yml
.github/workflows/checksrc.yml
.github/workflows/http3-linux.yml
.github/workflows/linux.yml
.github/workflows/linux32.yml
.github/workflows/windows.yml
.github/workflows/wolfssl.yml

index 742075561cc71bc4867f02b7318357014f5e01c9..d99928efb1805c4d382c108b0996512a0ed78ae0 100644 (file)
@@ -50,8 +50,6 @@ jobs:
 
     steps:
       - run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install --yes libtool autoconf automake pkgconf stunnel4 libpsl-dev
           # ensure we don't pick up openssl in this build
           sudo apt remove --yes libssl-dev
@@ -94,9 +92,6 @@ jobs:
       - run: make -C build V=1
         name: 'make'
 
-      - run: make -C build V=1 examples
-        name: 'make examples'
-
       - run: make -C build V=1 -C tests
         name: 'make tests'
 
@@ -104,6 +99,9 @@ jobs:
         name: 'run tests'
         timeout-minutes: 15
 
+      - run: make -C build V=1 examples
+        name: 'make examples'
+
   cmake:
     name: awslc (cmake)
     runs-on: 'ubuntu-latest'
@@ -111,9 +109,7 @@ jobs:
 
     steps:
       - run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
-          sudo apt-get install cmake stunnel4 libpsl-dev
+          sudo apt-get install cmake ninja-build stunnel4 libpsl-dev
           # ensure we don't pick up openssl in this build
           sudo apt remove --yes libssl-dev
           sudo python3 -m pip install impacket
@@ -136,14 +132,14 @@ jobs:
           tar xzf v${{ env.awslc-version }}.tar.gz
           mkdir aws-lc-${{ env.awslc-version }}-build
           cd aws-lc-${{ env.awslc-version }}-build
-          cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
+          cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
           cmake --build . --parallel
           cmake --install .
 
       - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
 
       - run: |
-          cmake -B build -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
+          cmake -B build -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
             -DOPENSSL_ROOT_DIR=$HOME/awslc -DBUILD_SHARED_LIBS=ON
         name: 'cmake generate out-of-tree'
 
@@ -155,3 +151,6 @@ jobs:
 
       - run: cmake --build build --parallel --target testdeps
         name: 'cmake build tests'
+
+      - run: cmake --build build --parallel --target curl-examples
+        name: 'cmake build examples'
index 87868b6318e04e25460262d764bb85a3048f85fb..a36140cdc1c9f78f856a727df2c523622290f925 100644 (file)
@@ -49,8 +49,6 @@ jobs:
 
       - name: install
         run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install codespell python3-pip
           python3 -m pip install cmakelint==1.4.3
 
index 8bd34ab05942e09a066d72751d71f481712e7edd..66a12420c331a175bb0f34e7f016653624303e78 100644 (file)
@@ -160,8 +160,6 @@ jobs:
       - name: install build prerequisites
         if: steps.settings.outputs.needs-build == 'true'
         run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install libtool autoconf automake pkgconf stunnel4 \
             libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
             nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
@@ -296,8 +294,6 @@ jobs:
 
     steps:
       - run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install libtool autoconf automake pkgconf stunnel4 \
             libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
             nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
@@ -457,9 +453,6 @@ jobs:
       - run: make V=1
         name: 'make'
 
-      - run: make V=1 examples
-        name: 'make examples'
-
       - run: make V=1 -C tests
         name: 'make tests'
 
@@ -473,3 +466,6 @@ jobs:
         env:
           TFLAGS: "${{ matrix.build.tflags }}"
           CURL_CI: github
+
+      - run: make V=1 examples
+        name: 'make examples'
index be96dd2e1b7b32cdac2365f6b75b55deeaf76e2a..221635816ebadae519347e6908e5b9dd0d00f653 100644 (file)
@@ -250,8 +250,6 @@ jobs:
     steps:
       - if: matrix.build.container == null
         run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install libtool autoconf automake pkgconf stunnel4 libpsl-dev libbrotli-dev libzstd-dev ${{ matrix.build.install_packages }}
           sudo python3 -m pip install impacket
         name: 'install prereqs and impacket'
@@ -550,6 +548,9 @@ jobs:
         timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 30 || 15 }}
         run: |
           export TFLAGS='${{ matrix.build.tflags }}'
+          if [[ '${{ matrix.build.install_packages }}' = *'valgrind'* ]]; then
+            TFLAGS+=' -j4'
+          fi
           if [[ '${{ matrix.build.install_packages }}' = *'heimdal-dev'* ]]; then
             TFLAGS+=' ~2077 ~2078'  # valgrind errors
           fi
index 14380450d9e2493d2c501611d1c0096bc3f3a81a..e89130356a84750fcf568a4d95d3b8a9030341ee 100644 (file)
@@ -80,9 +80,6 @@ jobs:
       - run: ./src/curl -V
         name: 'check curl -V output'
 
-      - run: make V=1 examples
-        name: 'make examples'
-
       - run: make V=1 -C tests
         name: 'make tests'
 
@@ -90,3 +87,6 @@ jobs:
         name: 'run tests'
         env:
           TFLAGS: "${{ matrix.build.tflags }}"
+
+      - run: make V=1 examples
+        name: 'make examples'
index 7787dc953d6638fce89bb426e4536c821f7e5b2e..e17651674cb5ccad76309d0bc8c3c7226357e914 100644 (file)
@@ -325,8 +325,7 @@ jobs:
           PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
           [ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
           [ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
-          cmake -B bld ${options} \
-            '-GMSYS Makefiles' \
+          cmake -B bld ${options} -G 'MSYS Makefiles' \
             -DCMAKE_C_COMPILER=gcc \
             '-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
             -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
index 49b1bd91740294cbd40dc9624aa5ac0f21b9a9a3..306fd7417683c1871f6bfa4eab0fdb72ac53725c 100644 (file)
@@ -63,8 +63,6 @@ jobs:
 
     steps:
       - run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update
           sudo apt-get install libtool autoconf automake pkgconf stunnel4 libpsl-dev ${{ matrix.build.install }}
           sudo python3 -m pip install impacket
         name: 'install prereqs and impacket'
@@ -90,9 +88,6 @@ jobs:
       - run: make V=1
         name: 'make'
 
-      - run: make V=1 examples
-        name: 'make examples'
-
       - run: make V=1 -C tests
         name: 'make tests'
 
@@ -101,3 +96,6 @@ jobs:
         timeout-minutes: ${{ contains(matrix.build.install, 'valgrind') && 30 || 15 }}
         env:
           TFLAGS: "${{ matrix.build.tflags }}"
+
+      - run: make V=1 examples
+        name: 'make examples'