From b6219cd9320699053714d6483efabb02613cbba4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 22 Oct 2024 14:41:55 +0200 Subject: [PATCH] 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 --- .github/workflows/linux.yml | 31 ++++++++---- .github/workflows/torture.yml | 95 ----------------------------------- tests/CMakeLists.txt | 2 +- tests/Makefile.am | 2 +- 4 files changed, 24 insertions(+), 106 deletions(-) delete mode 100644 .github/workflows/torture.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 15955bc88a..b06ea9d5e7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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' diff --git a/.github/workflows/torture.yml b/.github/workflows/torture.yml deleted file mode 100644 index eb127dd28b..0000000000 --- a/.github/workflows/torture.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) Daniel Stenberg, , 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 }}' diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ff7e115935..9be4312501 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 "") diff --git a/tests/Makefile.am b/tests/Makefile.am index ae970074b2..56329f4a8a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 # ~ means that it will run all tests matching the keyword, but will