GHA: use more ninja, build examples in the last step, and more

- 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 45202cbba4 #14906
- windows: formatting.

Closes #14992
This commit is contained in:
Viktor Szakats 2024-09-21 03:37:54 +02:00
parent 4b378ea439
commit 1b8449674a
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
7 changed files with 22 additions and 31 deletions

View 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'

View 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

View 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'

View 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

View 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'

View 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 \

View 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'