curl/tests/CI.md
Viktor Szakats e53523fef0
CI: move Azure jobs to GHA, fix fallouts, sshserver, runtests tweaks
CI:

- GHA/windows: enable OpenSSH server, SysInternals `handle`, `impacket`.
  Skip `impacket` on MSYS2 due to install failure.
  Skip OpenSSH server for old/standalone mingw-w64 (building curl
  without SSH there.)
- GHA/windows: make test tool installs a separate step.
- GHA/cygwin: enable OpenSSH server.
  Skip `impacket`: it's compiling for 7 minutes then breaks.
  Skip `stunnel` due to sluggish test run performance.
  (This update is unrelated to Azure jobs.)
- GHA/linux: migrate Linux jobs from Azure CI.
- GHA/linux: migrate scanbuild job from Azure CI.
- GHA/linux: enable libssh2 in a job. Also enable valgrind.
- CI/windows: enable SSPI in two jobs.
- CI/windows: disable zlib in one more job.
- CI/windows: improve `if` condition checking GnuTLS.
- CI/windows: ignore SFTP/SCP tests as necessary.
  - universally ignore SCP tests, they fail everywhere.
  - ignore test 612.
  - ignore test 613 616 618 with MSYS2 mingw-w64.
  - ignore test 614 with libssh.
  - ignore all SFTP with MSYS2 native.
  - ignore all SFTP with vcpkg with `libssh2[core,zlib]`.
  - ignore a couple of SFTP tests with MSYS2 mingw-w64.
  (This matches settings on Azure CI.)
- GHA/windows: ignore failing 1451 'Basic SMB request' test for
  old mingw-w64 7.3.0 (but not for 9.5.0!):
  ```
  2024-09-11 21:45:59,738 ERROR smbComNegotiate: b'NT LM 0.12\x00' is not in list
  [...]
  curl: (7) Could not connect to server
  [...]
  FAIL 1451: 'Basic SMB request' SMB
  ```
  Ref: https://github.com/curl/curl/actions/runs/10816280746/job/30007130770#step:13:3546
- CI/Azure: delete, now moved to GHA.

sshserver:

- sshserver: fix permissions for SSH host key on Windows, allowing sshd
  to launch.
- sshserver: fix initializing config paths with Cygwin/MSYS2 sshd.
- sshserver: fix initializing config paths in parallel builds.
- sshserver: delete redundant `DenyUsers`. This also opens the way
  to allow multiple usernames.
- sshserver: fix `AllowUsers` for GHA/windows, by allowing the
  domainless username again.
  Follow-up to 3ee7c676ec #5721
- sshserver: fix `Deprecated option` warnings in `sshd_config`:
  ```
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 7: Deprecated option AuthorizedKeysFile2
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 25: Deprecated option KeyRegenerationInterval
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 35: Deprecated option RhostsRSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 36: Deprecated option RSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 37: Deprecated option ServerKeyBits
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 41: Deprecated option UseLogin
  ```
- sshserver: fix `Deprecated option` warnings in `ssh_config` with
  Cygwin/MSYS2.
- sshserver: fix dumping config files due to the filenames missing their
  full paths.
- sshserver: add workaround to make `logmsg` messages visible.
  Before this patch they only went to a file and never shown.

runtests:

- runtests: log details when these Windows commands are called:
  `handle`, `taskkill`, `tasklist`.
- runtests: add documentation links to Windows tools:
  `handle`, `taskkill`, `tasklist`, `icacls`.
- runtests: add `-t` (kill whole tree) option to `taskkill` in
  `servers.pm`, syncing it with the other `taskkill` call.
  Follow-up to bc72a78a11 #14488
- runtests: show warning if Sysinternals `handle` tool is missing.
- runtests: drop Windows XP Home compatibility `tskill` call.
  The call was made on all Windows versions. It's possibly overkill to
  do this, because XP Home is probably rarely used for running curl
  tests these days. In case it's needed, it'd be better to put it under
  an explicit option.
- runtests: show Perl version and path.

Fix/silence fallouts:

- unit2603: fix building with disabled HTTP support.
- unit2604: silence `-Woverlength-strings` warnings in C89 mode.
- test437, test1614: fix to pass with no-IPv6 builds.

Closes #14859
2024-09-16 10:00:17 +02:00

3.7 KiB

Continuous Integration for curl

Curl runs in many different environments, so every change is run against a large number of test suites.

Every pull request is verified for each of the following:

  • ... it still builds, warning-free, on Linux and macOS, with both clang and gcc
  • ... it still builds fine on Windows with several MSVC versions
  • ... it still builds with cmake on Linux, with gcc and clang
  • ... it follows rudimentary code style rules
  • ... the test suite still runs 100% fine
  • ... the release tarball (the "dist") still works
  • ... it builds fine in-tree as well as out-of-tree
  • ... code coverage does not shrink drastically
  • ... different TLS backends still compile and pass tests

If the pull-request fails one of these tests, it shows up as a red X and you are expected to fix the problem. If you do not understand when the issue is or have other problems to fix the complaint, just ask and other project members can likely help out.

Consider the following table while looking at pull request failures:

CI platform as shown in PR State What to look at next
CI / codeql stable quality check results
CI / fuzzing stable fuzzing results
CI / macos ... stable all errors and failures
Code scanning results / CodeQL stable quality check results
FreeBSD FreeBSD: ... stable all errors and failures
LGTM analysis: Python stable new findings
LGTM analysis: C/C++ stable new findings
buildbot/curl_winssl_ ... stable all errors and failures
AppVeyor flaky all errors and failures
curl.curl (linux ...) stable all errors and failures
curl.curl (windows ...) flaky repetitive errors/failures
CodeQL stable new findings

Sometimes the tests fail due to a dependency service temporarily being offline or otherwise unavailable, for example package downloads. In this case you can just try to update your pull requests to rerun the tests later as described below.

CI servers

Here are the different CI environments that are currently in use, and how they are configured:

GitHub Actions

GitHub Actions runs the following tests:

These are each configured in different files in .github/workflows.

Azure

Not used anymore.

AppVeyor

AppVeyor runs a variety of different Windows builds, with different compilation options.

As of November 2021 @bagder, @mback2k, @jay, @vszakats, @dfandrich and @danielgustafsson have administrator access to the AppVeyor CI environment. Additional admins/group members can be added on request.

The tests are configured in appveyor.yml.

Zuul

Not used anymore.

Circle CI

Circle CI runs a basic Linux test suite on Ubuntu for both x86 and ARM processors. This is configured in .circleci/config.yml.

You can view the full list of CI jobs on Circle CI's website.

@bagder has access to edit the "Project Settings" on that page. Additional admins/group members can be added on request.

Cirrus CI

Not used anymore.