GHA/linux: merge torture jobs into the main workflow

They complete in 4 and 7 minutes, and do not hold back the main Linux
workflow.

Also:
- bump default parallelism for `test-torture` target to `-j20`
  (was: `-j2`).
- drop redundant package install from `rustls` jobs.

Closes #15360
This commit is contained in:
Viktor Szakats 2024-10-22 14:41:55 +02:00
parent 52851d3256
commit b6219cd932
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
4 changed files with 24 additions and 106 deletions

View File

@ -185,6 +185,18 @@ jobs:
--disable-rtmp --disable-rtsp
--disable-scp --disable-sftp --disable-tftp --disable-ftp --disable-file --disable-smb
- name: openssl torture !FTP
install_packages: zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=25 !FTP
torture: true
- name: openssl torture FTP
install_packages: zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=20 FTP
torture: true
- name: '!ssl !http !smtp !imap'
configure: --without-ssl --enable-debug --disable-http --disable-smtp --disable-imap --disable-unity
@ -229,12 +241,11 @@ jobs:
tflags: -n -e '!TLS-SRP'
- name: rustls valgrind
install_packages: libpsl-dev valgrind
install_packages: valgrind
install_steps: rust rustls pytest
configure: --with-rustls=$HOME/rustls --enable-debug
- name: rustls
install_packages: libpsl-dev
install_steps: rust rustls skipall
PKG_CONFIG_PATH: '$HOME/rustls/lib/pkgconfig' # Not built as of v0.14.0
generate: -DCURL_USE_RUSTLS=ON -DRUSTLS_INCLUDE_DIR=$HOME/rustls/include -DRUSTLS_LIBRARY=$HOME/rustls/lib/librustls.a -DENABLE_DEBUG=ON
@ -586,16 +597,18 @@ 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+=' -j6'
fi
if [[ '${{ matrix.build.install_packages }}' = *'heimdal-dev'* ]]; then
TFLAGS+=' ~2077 ~2078' # valgrind errors
if [ -z '${{ matrix.build.torture }}' ]; then
if [[ '${{ matrix.build.install_packages }}' = *'valgrind'* ]]; then
TFLAGS+=' -j6'
fi
if [[ '${{ matrix.build.install_packages }}' = *'heimdal-dev'* ]]; then
TFLAGS+=' ~2077 ~2078' # valgrind errors
fi
fi
if [ -n '${{ matrix.build.generate }}' ]; then
cmake --build . --verbose --target test-ci
cmake --build . --verbose --target ${{ matrix.build.torture && 'test-torture' || 'test-ci' }}
else
make V=1 test-ci
make V=1 ${{ matrix.build.torture && 'test-torture' || 'test-ci' }}
fi
- name: 'install pytest prereqs'

View File

@ -1,95 +0,0 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: Linux torture
'on':
push:
branches:
- master
- '*/ci'
paths-ignore:
- '**/*.md'
- '**/CMakeLists.txt'
- '.circleci/**'
- 'appveyor.*'
- 'CMake/**'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
- 'winbuild/**'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/CMakeLists.txt'
- '.circleci/**'
- 'appveyor.*'
- 'CMake/**'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
- 'winbuild/**'
concurrency:
# Hardcoded workflow filename as workflow name above is just Linux again
group: torture-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
cmake:
name: '${{ matrix.build.name }}'
runs-on: 'ubuntu-24.04'
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
build:
- name: 'OpenSSL torture !FTP'
install: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=25 !FTP
- name: 'OpenSSL torture FTP'
install: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=20 FTP
steps:
- run: |
sudo apt-get install cmake ninja-build pkgconf stunnel4 ${{ matrix.build.install }}
name: 'install prereqs'
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: |
cmake -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
-DCURL_BROTLI=ON -DCURL_ZSTD=ON \
${{ matrix.build.generate }}
name: 'cmake configure'
- name: 'cmake curl_config.h'
run: |
echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::'
grep -F '#define' lib/curl_config.h | sort || true
- run: cmake --build . --verbose
name: 'cmake build'
- run: ./src/curl -V
name: 'check curl -V output'
- run: cmake --build . --verbose --target testdeps
name: 'build tests'
- name: 'install test prereqs'
run: |
python3 -m pip install --break-system-packages -r tests/requirements.txt
- run: cmake --build . --verbose --target test-torture
name: 'run tests'
env:
TFLAGS: '-j10 ${{ matrix.build.tflags }}'

View File

@ -105,7 +105,7 @@ add_runtests(test-full "-a -p -r")
# ~flaky means that it ignores results of tests using the flaky keyword
add_runtests(test-nonflaky "-a -p ~flaky ~timing-dependent")
add_runtests(test-ci "-a -p ~flaky ~timing-dependent -r -rm -j20")
add_runtests(test-torture "-a -t -j2")
add_runtests(test-torture "-a -t -j20")
add_runtests(test-event "-a -e")
add_pytest(curl-pytest "")

View File

@ -132,7 +132,7 @@ TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl $(TEST_COMMON
TEST_Q = -a -s
TEST_AM = -a -am
TEST_F = -a -p -r
TEST_T = -a -t -j2
TEST_T = -a -t -j20
TEST_E = -a -e
# ~<keyword> means that it will run all tests matching the keyword, but will