]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/non-native: improve, migrate x86_64 FreeBSD with tests from Cirrus CI
authorViktor Szakats <commit@vsz.me>
Sat, 20 Jul 2024 11:31:45 +0000 (13:31 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 29 Jul 2024 18:46:40 +0000 (20:46 +0200)
- run tests via `make test-ci` instead of `make check` with autotools.
- add `x86_64` job for FreeBSD, with tests.
  It matches the existing Cirrus CI job, with these differences:
  - finishes 3x faster (thanks to parallel tests enabled).
  - librtmp is not enabled because it's slated for removal by FreeBSD.
    (already past the removal deadline, thought the package still
    installs.)
  - DICT and TELNET servers fail to start. Couldn't figure out why.
    It means skipping test 1450 and 1452.
  - it runs more tests, e.g. websockets and ip6-localhost.
  - no `pkg update -f`.
  - it misses the `CRYPTOGRAPHY_DONT_BUILD_RUST=1`, `pkg delete curl`,
    `chmod 777`, `sudo -u nobody` and `sysctl net.inet.tcp.blackhole`
    tricks. The latter is the default in these runners, the others did
    not affect results.
- set `-j0` for tests in the NetBSD job. Flaky otherwise.

Closes #14244

18 files changed:
.azure-pipelines.yml
.cirrus.yml [deleted file]
.github/labeler.yml
.github/workflows/awslc.yml
.github/workflows/codeql-analysis.yml
.github/workflows/curl-for-win.yml
.github/workflows/fuzz.yml
.github/workflows/http3-linux.yml
.github/workflows/linux-old.yml
.github/workflows/linux.yml
.github/workflows/linux32.yml
.github/workflows/macos.yml
.github/workflows/non-native.yml
.github/workflows/torture.yml
.github/workflows/windows.yml
.github/workflows/wolfssl.yml
appveyor.yml
tests/CI.md

index 08744e15d0aa80f63b71547dd94e93506d80a3fd..96c36933e6606a1f4bcdfe9063bfd5f9bd43cb57 100644 (file)
@@ -34,7 +34,6 @@ trigger:
   paths:
     exclude:
       - '.circleci/*'
-      - '.cirrus.yml'
       - '.github/*'
       - '.github/workflows/*'
       - 'appveyor.*'
@@ -48,7 +47,6 @@ pr:
   paths:
     exclude:
       - '.circleci/*'
-      - '.cirrus.yml'
       - '.github/*'
       - '.github/workflows/*'
       - 'appveyor.*'
diff --git a/.cirrus.yml b/.cirrus.yml
deleted file mode 100644 (file)
index 6336ff6..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#***************************************************************************
-#                                  _   _ ____  _
-#  Project                     ___| | | |  _ \| |
-#                             / __| | | | |_) | |
-#                            | (__| |_| |  _ <| |___
-#                             \___|\___/|_| \_\_____|
-#
-# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at https://curl.se/docs/copyright.html.
-#
-# You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# copies of the Software, and permit persons to whom the Software is
-# furnished to do so, under the terms of the COPYING file.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-# SPDX-License-Identifier: curl
-#
-###########################################################################
-# https://cirrus-ci.com/github/curl/curl
-#
-# Cirrus CI configuration:
-#   https://cirrus-ci.org/guide/writing-tasks/
-# Used/remaining credits (must be logged in):
-#   https://cirrus-ci.com/settings/github/curl
-
-freebsd_task:
-  skip: "changesIncludeOnly(
-    '**/CMakeLists.txt',
-    '.azure-pipelines.yml',
-    '.circleci/**',
-    '.github/**',
-    'appveyor.*',
-    'CMake/**',
-    'packages/**',
-    'plan9/**',
-    'projects/**',
-    'winbuild/**'
-    )"
-
-  name: FreeBSD
-
-  matrix:
-    - name: FreeBSD 14.0
-      freebsd_instance:
-        image_family: freebsd-14-0
-        memory: 1600M
-
-  env:
-    CIRRUS_CLONE_DEPTH: 10
-    CRYPTOGRAPHY_DONT_BUILD_RUST: 1
-    MAKEFLAGS: -j 3
-
-  pkginstall_script:
-    - pkg update -f
-    - pkg install -y autoconf automake libtool pkgconf brotli openldap26-client heimdal libpsl libssh2 libidn2 librtmp libnghttp2 nghttp2 stunnel py311-openssl py311-impacket py311-cryptography libpsl
-    - pkg delete -y curl
-  configure_script:
-    - autoreconf -fi
-    # Building with the address sanitizer is causing unexplainable test issues due to timeouts
-    # - case `uname -r` in
-    #     12.2*)
-    #     export CC=clang;
-    #     export CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
-    #     export CXXFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
-    #     export LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer" ;;
-    #   esac
-    - ./configure --prefix="${HOME}"/install --disable-dependency-tracking --enable-debug --with-openssl --with-libssh2 --with-brotli --with-gssapi --with-libidn2 --enable-manual --enable-ldap --enable-ldaps --with-librtmp --with-libpsl --with-nghttp2 || { tail -300 config.log; false; }
-  compile_script:
-    - make V=1 && make V=1 examples && cd tests && make V=1
-  test_script:
-    # blackhole?
-    - sysctl net.inet.tcp.blackhole
-    # make sure we don't run blackhole != 0
-    - sudo sysctl net.inet.tcp.blackhole=0
-    # Some tests won't run if run as root so run them as another user.
-    # Make directories world writable so the test step can write wherever it needs.
-    - find . -type d -exec chmod 777 {} \;
-    # The OpenSSH server instance for the testsuite cannot be started on FreeBSD,
-    # therefore the SFTP and SCP tests are disabled right away from the beginning.
-    - sudo -u nobody make V=1 TFLAGS="-n !SFTP !SCP" test-ci
-  install_script:
-    - make V=1 install
index 7f98b8ffabb05c44a3ee78d616b881bf60a230db..43d42808f3354f511c8b33f1dca702ecb2464021 100644 (file)
@@ -44,7 +44,6 @@ CI:
           - any-glob-to-any-file:
               - '.azure-pipelines.yml'
               - '.circleci/**'
-              - '.cirrus.yml'
               - '.github/**'
               - 'appveyor.*'
               - 'scripts/ci*'
index 4921200ec937e7291465c42cf02cb4165111abd1..a45ef7d65f5072caf3e92080ef604e2d42619948 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index eb9851893e642e9afea240742c124d9d3ffcb207..f0e109f81e9c6afab92dca2181a04feb4351863a 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'docs/**'
       - 'packages/**'
@@ -28,7 +27,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'docs/**'
       - 'packages/**'
index d6c4f83bca37b918509ca03ebe4f638a078b460f..87927278c48c26c5108e41368fee19edae4f1c02 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index 247a1c0abe460a95bc9be930acd049c39aeed44d..20774292b6285d856264f56a59a29e28f47f273e 100644 (file)
@@ -14,7 +14,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
@@ -30,7 +29,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
index d38561e9ebf432f579e70d33f819f3f27a707367..618f3769c33b2e4c6a57153ae1314384aa90eefe 100644 (file)
@@ -14,7 +14,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
@@ -29,7 +28,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
index f143a5ea349d2f9d6ca1c97b9a12ae1e52a3ab0d..ecb5968f47840b8ef0655ae1b6d609f71012e4cd 100644 (file)
@@ -27,7 +27,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -40,7 +39,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index 140a531a7f0786a2be9cc7af5a36258d0fbb3382..bde8fb60aae9964e5058d8dcb20901cb445a8412 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index 7500f2c8d4712561f4b78e5f12afa5d063cd1bbc..eb7cb8ac87e2527dbae27e467091ff31bb029e34 100644 (file)
@@ -14,7 +14,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
@@ -29,7 +28,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
index 947ee2b49123f44bafc93e7a2784be42653016e9..c5e8e4535fac96a99b17247edc51782751f84dd0 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index 94dd301b955e7d3e078cb45e9372c6d57ff9c761..95a6d466faa06adaf1e621e8c4c2b294b50f6446 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -71,6 +69,7 @@ jobs:
             bld/src/curl --disable --version
             if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
               cmake --build bld --config Debug --parallel 3 --target testdeps
+              export TFLAGS='-j0'  # flakies: ~389 ~392 ~TFTP and more
               cmake --build bld --config Debug --target test-ci
             fi
 
@@ -116,6 +115,7 @@ jobs:
     strategy:
       matrix:
         include:
+          - { build: 'autotools', arch: 'x86_64', compiler: 'clang' }
           - { build: 'autotools', arch: 'arm64', compiler: 'clang' }
           - { build: 'cmake'    , arch: 'arm64', compiler: 'clang' }
       fail-fast: false
@@ -130,7 +130,13 @@ jobs:
           architecture: ${{ matrix.arch }}
           run: |
             # https://ports.freebsd.org/
-            sudo pkg install -y autoconf automake libtool pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py39-openssl py39-impacket py39-cryptography
+            pkgs='autoconf automake libtool pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel'
+            if [ '${{ matrix.arch }}' = 'x86_64' ]; then
+              pkgs="${pkgs} py311-openssl py311-impacket py311-cryptography"
+            else
+              pkgs="${pkgs} py39-openssl py39-impacket py39-cryptography"
+            fi
+            sudo pkg install -y ${pkgs}
             autoreconf -fi
             export CC='${{ matrix.compiler }}'
             mkdir bld && cd bld && ../configure --enable-debug --enable-warnings --enable-werror \
@@ -143,8 +149,10 @@ jobs:
             src/curl --disable --version
             make -j3 examples
             if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
-              export TFLAGS='-j12'
-              make check V=1
+              make -j3 -C tests
+              # The OpenSSH server instance for the testsuite cannot be started on FreeBSD,
+              # therefore the SFTP and SCP tests are disabled right away from the beginning.
+              make test-ci V=1 TFLAGS='-j12 !SFTP !SCP'
             fi
 
       - name: 'cmake'
@@ -156,7 +164,13 @@ jobs:
           architecture: ${{ matrix.arch }}
           run: |
             # https://ports.freebsd.org/
-            sudo pkg install -y cmake pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py39-openssl py39-impacket py39-cryptography
+            pkgs='cmake pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel'
+            if [ '${{ matrix.arch }}' = 'x86_64' ]; then
+              pkgs="${pkgs} py311-openssl py311-impacket py311-cryptography"
+            else
+              pkgs="${pkgs} py39-openssl py39-impacket py39-cryptography"
+            fi
+            sudo pkg install -y ${pkgs}
             cmake -B bld \
               '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \
               -DCMAKE_UNITY_BUILD=ON \
@@ -171,8 +185,9 @@ jobs:
             bld/src/curl --disable --version
             if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
               cmake --build bld --config Debug --parallel 3 --target testdeps
-              export TFLAGS='-j12'
-              cmake --build bld --config Debug --target test-ci
+              # The OpenSSH server instance for the testsuite cannot be started on FreeBSD,
+              # therefore the SFTP and SCP tests are disabled right away from the beginning.
+              make test-ci V=1 TFLAGS='-j12 !SFTP !SCP'
             fi
 
   omnios:
@@ -198,5 +213,5 @@ jobs:
             gmake -j3 install
             src/curl --disable --version
             gmake -j3 examples
-            export TFLAGS='-j12 ~MQTT ~FTP'
-            gmake check V=1
+            gmake -j3 -C tests
+            gmake test-ci V=1 TFLAGS='-j12 ~MQTT ~FTP'
index 51755cd89b470fa8d15b0092bacbfd23770fcc79..10bd34ce9c550ecce441552daa1ac08ac1b5e260 100644 (file)
@@ -14,7 +14,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
@@ -29,7 +28,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
index 0e5d5ca09521a52ab283328d1cd0a2e8397c6b40..fc314c49ee24735d4efb2f9e7d37849509700747 100644 (file)
@@ -13,7 +13,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
@@ -26,7 +25,6 @@ on:
       - '**/*.md'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'packages/**'
       - 'plan9/**'
index a8c5c04ebecc567efd62616f2f57e6332783564a..c4156497e28c0375b95328a59385d0241e36509e 100644 (file)
@@ -14,7 +14,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
@@ -29,7 +28,6 @@ on:
       - '**/CMakeLists.txt'
       - '.azure-pipelines.yml'
       - '.circleci/**'
-      - '.cirrus.yml'
       - 'appveyor.*'
       - 'CMake/**'
       - 'packages/**'
index 381d672869869e7906371c3f49c0375e65078425..bc0cb4a152beb00d982eacf0cf20f3ecfa10daac 100644 (file)
@@ -207,7 +207,6 @@ skip_commits:
   files:
     - '.azure-pipelines.yml'
     - '.circleci/*'
-    - '.cirrus.yml'
     - '.github/**/*'
     - 'packages/**/*'
     - 'plan9/**/*'
index 0d3d1108ef3f01a8f638f862552fbaf778f16f5a..1f60682f651013c9c90236814d5e37670cc1b789 100644 (file)
@@ -107,11 +107,4 @@ admins/group members can be added on request.
 
 ### Cirrus CI
 
-Cirrus CI runs a basic test suite on FreeBSD and Windows. This is configured in
-`.cirrus.yml`.
-
-You can [view the full list of CI jobs on Cirrus CI's
-website](https://cirrus-ci.com/github/curl/curl).
-
-`@bagder` has access to edit the "Project Settings" on that page. Additional
-admins/group members can be added on request.
+Not used anymore.