]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/linux: merge torture jobs into the main workflow
authorViktor Szakats <commit@vsz.me>
Tue, 22 Oct 2024 12:41:55 +0000 (14:41 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 22 Oct 2024 18:20:42 +0000 (20:20 +0200)
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
.github/workflows/torture.yml [deleted file]
tests/CMakeLists.txt
tests/Makefile.am

index 15955bc88a6a91c8a1798dadab146fd14eb2057d..b06ea9d5e79453383ed12b253ed1697ed466b845 100644 (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'
diff --git a/.github/workflows/torture.yml b/.github/workflows/torture.yml
deleted file mode 100644 (file)
index eb127dd..0000000
+++ /dev/null
@@ -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 }}'
index ff7e1159359e89dcb76424d70c250ae933dc6990..9be4312501d26272c470a947a42ec17fed181a3e 100644 (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      "")
index ae970074b2025ba0bcdfe04cb01b056cc0bdc8f8..56329f4a8aae96d32b62ef1ed8ba2f21faf4ea2e 100644 (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