Commit Graph

395 Commits

Author SHA1 Message Date
Viktor Szakats
67b0692f09
GHA: enable tests 1139, 1177, 1477 on Windows
These exclusions came from the AppVeyor CI config, but they do pass now
and they are static tests with no flakiness risk.

Follow-up to 0914d8aadd #13759
Closes #13817
2024-05-28 21:20:12 +02:00
Dan Fandrich
2368e22373 CI: Improve labeler tag detection
Also, simplify patterns with a single glob.
2024-05-28 11:49:31 -07:00
Viktor Szakats
def7d05382
GHA: disable TFTP tests in Windows jobs
Shot in the dark trying to find out which tests are
hanging / going to an infinite loop.

The ones failing after 45 minutes (mingw-w64) or 30 minutes (MSVC).

Ref: https://github.com/curl/curl/pull/13599#issuecomment-2119372376
2024-05-28 13:13:40 +02:00
renovate[bot]
bb9110a997
ci: update vmactions/omnios-vm digest to a61ca1e
Closes #13801
2024-05-28 10:41:23 +02:00
Viktor Szakats
59dc9f7e69
build: untangle CURLDEBUG and DEBUGBUILD macros
`CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases,
it was protecting debug features that were supposed to be guarded with
`DEBUGBUILD`.

Replace these uses with `DEBUGBUILD`.

This leaves `CURLDEBUG` uses solely for its intended  purpose: to enable
the memory tracking debug feature.

Also:
- autotools: rely on `DEBUGBUILD` to enable `checksrc`.
  Instead of `CURLDEBUG`, which worked in most cases because debug
  builds enable `CURLDEBUG` by default, but it's not accurate.
- include `lib/easyif.h` instead of keeping a copy of a declaration.
- add CI test jobs for the build issues discovered.

Ref: https://github.com/curl/curl/pull/13694#issuecomment-2120311894
Closes #13718
2024-05-28 08:12:00 +02:00
Viktor Szakats
0fd794df35
cmake: fix -Wredundant-decls in unity/mingw-w64/gcc/curldebug/DLL builds
It affected cmake-unity shared-curltool curldebug mingw-w64 gcc builds
when building the `testdeps` target.

Apply the solution already used in `lib/base64.c` and `lib/dynbuf.c`
to fix it.

Also update an existing GHA CI job to test the issue fixed.

```
In file included from curl/lib/version_win32.c:35,
                 from curl/_bld/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:145:
curl/lib/memdebug.h:52:14: error: redundant redeclaration of 'curl_dbg_logfile' [-Werror=redundant-decls]
   52 | extern FILE *curl_dbg_logfile;
      |              ^~~~~~~~~~~~~~~~
In file included from curl/src/slist_wc.c:32,
                 from curl/_bld/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:4:
curl/lib/memdebug.h:52:14: note: previous declaration of 'curl_dbg_logfile' with type 'FILE *' {aka 'struct _iobuf *'}
   52 | extern FILE *curl_dbg_logfile;
      |              ^~~~~~~~~~~~~~~~
curl/lib/memdebug.h:55:44: error: redundant redeclaration of 'curl_dbg_malloc' [-Werror=redundant-decls]
   55 | CURL_EXTERN ALLOC_FUNC ALLOC_SIZE(1) void *curl_dbg_malloc(size_t size,
      |                                            ^~~~~~~~~~~~~~~
curl/lib/memdebug.h:55:44: note: previous declaration of 'curl_dbg_malloc' with type 'void *(size_t,  int,  const char *)' {aka 'void *(long long unsigned int,  int,  const char *)'}
   55 | CURL_EXTERN ALLOC_FUNC ALLOC_SIZE(1) void *curl_dbg_malloc(size_t size,
      |                                            ^~~~~~~~~~~~~~~
[...]
curl/lib/memdebug.h:110:17: error: redundant redeclaration of 'curl_dbg_fclose' [-Werror=redundant-decls]
  110 | CURL_EXTERN int curl_dbg_fclose(FILE *file, int line, const char *source);
      |                 ^~~~~~~~~~~~~~~
curl/lib/memdebug.h:110:17: note: previous declaration of 'curl_dbg_fclose' with type 'int(FILE *, int,  const char *)' {aka 'int(struct _iobuf *, int,  const char *)'}
  110 | CURL_EXTERN int curl_dbg_fclose(FILE *file, int line, const char *source);
      |                 ^~~~~~~~~~~~~~~
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49840554/job/a4aoet17e9qnqx1a#L362

After: https://ci.appveyor.com/project/curlorg/curl/builds/49843735/job/hbo2uah2vj0ns523

Ref: #13689 (CI testing this PR with `DEBUGBUILD`/`CURLDEBUG`/shared-static combinations)
Depends-on: #13694
Depends-on: #13800
Closes #13705
2024-05-27 22:56:13 +02:00
Viktor Szakats
4521eac45a
CI: disable dependency tracking in most autotools builds
For better build performance. Dependency tracking causes a build
overhead while compiling to help a subsequent build, but in CI there is
never one and the extra work is discarded.

Closes #13794
2024-05-27 22:25:14 +02:00
Viktor Szakats
8373783098
GHA: ignore flaky MQTT and FTP test results [ci skip]
MQTT / OmniOS:
```
TESTFAIL: These test cases failed: 1190 1198 3017
```
Ref: https://github.com/curl/curl/actions/runs/9258522297/job/25468730731?pr=13694#step:3:10251

MQTT / OmniOS:
```
TESTFAIL: These test cases failed: 1194 2200 2203 2205
```
Ref: https://github.com/curl/curl/actions/runs/9150523540/job/25155409832#step:3:10233

FTP / OmniOS:
```
TESTFAIL: These test cases failed: 1096
```
Ref: https://github.com/curl/curl/actions/runs/9150702711/job/25155793948#step:3:10247

FTP / OmniOS:
```
TESTFAIL: These test cases failed: 381
```
Ref: https://github.com/curl/curl/actions/runs/9163863822/job/25193897640#step:3:10230

FTP / OmniOS:
```
TESTFAIL: These test cases failed: 340
```
Ref: https://github.com/curl/curl/actions/runs/9233804752/job/25406671742?pr=13771#step:3:10245

Ref: https://github.com/curl/curl/pull/13583#issuecomment-2119376898
2024-05-27 19:56:45 +02:00
Viktor Szakats
c29a20d465
CI: tidy up skipping tests build/run in Windows jobs
Simplify controlling whether to build and/run tests in a CI job.

Apply the TFLAGS='skipall' (do not build nor run tests) or
'skiprun' (build, but do not run) method already used with old-mingw-w64
and msvc jobs to existing Windows jobs in GHA and AppVeyor.

Also:
- add Cygwin/cmake test build and run steps while here.
- replace `DISABLED_TESTS` with `TFLAGS` in AppVeyor.

Closes #13796
2024-05-27 19:26:51 +02:00
Viktor Szakats
ea98445680
cmake: ENABLE_DEBUG=ON to always set -DDEBUGBUILD
Before this patch `ENABLE_DEBUG=ON` always enabled the TrackMemory
(aka `ENABLE_CURLDEBUG=ON`) feature, but required the `Debug` CMake
configration to actually enable curl debug features
(aka `-DDEBUGBUILD`).

Curl debug features do not require compiling with C debug options. This
also made enabling debug features unintuitive and complicated to use.
Due to other issues (subject to PR #13694) it also caused an error in
default (and `Release`/`MinSizeRel`/`RelWithDebInfo`) configs, when
building the `testdeps` target:
```
ld: CMakeFiles/unit1395.dir/unit1395.c.o: in function `test':
unit1395.c:(.text+0x1a0): undefined reference to `dedotdotify'
```
Ref: https://github.com/curl/curl/actions/runs/9037287098/job/24835990826#step:3:2483

Fix it by always defining `DEBUGBUILD` when setting `ENABLE_DEBUG=ON`.
Decoupling this option from the selected CMake configuration.

Note that after this patch `ENABLE_DEBUG=ON` unconditionally enables
curl debug features. These features are insecure and unsuited for
production. Make sure to omit this option when building for production
in default, `Release` (and other not-`Debug`) modes.

Also delete a workaround no longer necessary in GHA CI jobs.

Ref: 1a62b6e68c (2015-03-03)
Ref: #13583
Closes #13592
2024-05-27 17:57:52 +02:00
Viktor Szakats
d3dbaac3ea
GHA: add autotools mingw-64, build-only job
Cherry-picked from #13718
Closes #13793
2024-05-27 15:48:54 +02:00
Viktor Szakats
c8f61dbba6
GHA: add three MSVC jobs
Continuing the theme, add 3 MSVC jobs with tests, matching
configurations used on AppVeyor. MSVC versions are identical:
19.39.33523.0 + Windows SDK 10.0.22621.0.

Also enable websockets, and build examples. Tests are run in parallel
(`-j14`), with improved performance.

Job performance:
```
                                                       AppVeyor  GHA
                                                                 w/examples
                                                       --------  ----------
CMake, VS2022, Debug, x64, Schannel, Static, Unicode   38m 4s    11m57s
CMake, VS2022, Debug, x64, no SSL, Static              35m15s    12m 6s
CMake, VS2022, Debug, x64, no SSL, Static, HTTP only   25m25s    10m36s
```
Based on these runs:
https://ci.appveyor.com/project/curlorg/curl/builds/49884748
https://github.com/curl/curl/actions/runs/9229448468

This is the first time examples are built in CI with MSVC: Fix all
warnings and errors that came up via
d4b8589055 #13771.

Closes #13766
2024-05-27 13:32:28 +02:00
Viktor Szakats
0914d8aadd
GHA: add three old (gcc 6, 7, 9) mingw-w64 jobs
Re-implement old mingw-w64 jobs in GHA. This allows to use the latest
Windows runners, replacing Windows Server 2012 R2 (gcc 6) and Windows
Server 2016 (gcc 7, 9) with Windows Server 2022.

GHA runners are also significantly faster, and allow running tests in
parallel (`-j14`). It also offloads 3 more long-running jobs from
AppVeyor CI.

These jobs download (then cache) the mingw-w64 packages from their
original location, which allows flexibility in choosing which versions
and flavours (win32/POSIX, SEH/DWARF, 64/32-bit) we want to test in CI.
The new jobs use these distros:
- https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/ (for gcc 7, same as on AppVeyor)
- https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/ (for gcc 6, same as on AppVeyor)
- https://winlibs.com/ (for gcc 9)

I matched existing AppVeyor job configs, with these differences:
- gcc 6.4.0 instead of 6.3.0.
  (same distro as on AppVeyor, but the latest bugfix release)
- gcc 9.5.0 instead of 9.1.0 and a different (but compatible) binary distro.
  (in AppVeyor this relies on an old MSYS2 pre-installed on the runner)
- using win32 builds instead of posix for gcc 6.4.0 and 7.3.0.
- websockets enabled.
- always build examples.
- always build tests (this wasn't done for 6.4.0 with AppVeyor CI).

I did not replicate existing test exclusions, and oddly enough the few
failures (so far) were different from MSYS2 jobs and also from their
AppVeyor CI counterparts.

Also:
- delete redundant (default) `-u` option from `cygpath` calls.
- allow matrix options to override default ones in CMake.
- detect and use Windows-supplied curl for `TFLAGS` `-ac` option.
  (it's available in modern runners.)
- delete the 3 AppVeyor CI jobs now replicated in GHA.
- appveyor: prefer `SYSTEMROOT` over `WINDIR`.
- tidy-up quotes.

Job performance:
```
                                                                 AppVeyor  GHA
                                                                           w/examples
                                                                           w/tests
                                                                 --------  ----------
CMake, mingw-w64, gcc 6, Debug, x86, Schannel, Static, no-unity   1m25s     8m50s
CMake, mingw-w64, gcc 7, Debug, x64, Schannel, Static, Unicode   31m45s     9m39s
CMake, mingw-w64, gcc 9, Debug, x64, Schannel, Static            28m25s    13m38s
```
Based on these runs:
https://ci.appveyor.com/project/curlorg/curl/builds/49880799
https://github.com/curl/curl/actions/runs/9218292508

Notice that building examples and tests is time consuming.

We can tweak any build parameter as necessary to make them more useful
and/or without clogging the job queue or introducing flakiness.

Closes #13759
2024-05-27 12:15:41 +02:00
renovate[bot]
2fec5cd510
ci: update dependency awslabs/aws-lc to v1.28.0
Closes #13770
2024-05-25 23:44:36 +02:00
Viktor Szakats
b3f23f2084
GHA: ignore flaky test 3017 (MQTT) on OpenBSD
```
TESTFAIL: These test cases failed: 3017
```
Ref: https://github.com/curl/curl/actions/runs/9223543272/job/25376999226?pr=13759#step:3:16326
Ref: https://github.com/curl/curl/actions/runs/9230183764/job/25397883193?pr=13766#step:3:16345

Ref: https://github.com/curl/curl/pull/13583#issuecomment-2119376898
2024-05-24 23:47:21 +02:00
Viktor Szakats
4a198a50db
GHA: stop deleting curl in non-native workflows
We do it in Cirrus CI, but for some platforms it's not possible to
delete it and tests work anyway.

The test runner also runs `../src/curl` by default, which is always the
one freshly built. The runner may also need the system curl to talk to
APIs when needed.

Also:
- stop setting `CURL` env. This isn't picked up by the runners,
  and works out of the box anyway.
- quote an option just in case.

Follow-up to 90e644f944 #13583
Closes #13765
2024-05-24 22:13:18 +02:00
renovate[bot]
86cb12a400
ci: update github/codeql-action digest to 9fdb3e4
Closes #13726
2024-05-24 00:02:03 +02:00
Stefan Eissing
c5e322fb50
CI GHA: add vsftpd to ngtcp2-linux runs
- not using HTTP/3, but gnutls does not seem to run
  somewhere else right now

Closes #13760
2024-05-23 23:46:06 +02:00
Orgad Shaneh
cc383ee237
GHA: increase timeout for Cygwin autotools build tests step
Apparently 10 minutes are not (always) enough:
https://github.com/curl/curl/actions/runs/9197003907/job/25296439556#step:8:1936

Closes #13753
2024-05-23 13:29:47 +02:00
dependabot[bot]
ac68a2dd85
GHA: bump actions/checkout from 4.1.4 to 4.1.6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](0ad4b8fada...a5ac7e51b4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Closes #13720
2024-05-22 09:14:10 +02:00
Viktor Szakats
dbd626ab82
tests: fix TFTP test 2305 on Windows
Ref: #13692
Closes #13724
2024-05-20 21:20:02 +02:00
renovate[bot]
bdfb41a04c
GHA: pin dependencies
Closes #13712
2024-05-19 23:37:59 +02:00
Tatsuhiro Tsujikawa
7e932fac94
GHA: bump nghttp2 to v1.62.1
Use gcc-12 explicitly to compile C++20 source files.

Closes #13702
2024-05-19 23:15:00 +02:00
Viktor Szakats
90e644f944
GHA: add NetBSD, OpenBSD, FreeBSD/arm64 and OmniOS jobs
Add these jobs to GHA:
- NetBSD, cmake-unity, clang, OpenSSL, x86_64, with tests, w/o python,
  no parallelism (was flaky sometimes)
- OpenBSD, cmake-unity, clang, LibreSSL, x86_64, with tests,
  with python, -j8, TFTP results ignored due to #13623.
- FreeBSD, cmake-unity and autotools, clang, OpenSSL, arm64
  (Tests disabled for arm64, because they are slow. It's available for
  x86_64 with python, -j12.)
  Configuration matches our existing Cirrus CI one.
- OmniOS, autotools, gcc, OpenSSL, x86_64, with tests, -j12.

All build with websockets and examples.

Closes #13583
2024-05-19 23:06:54 +02:00
Viktor Szakats
df3f4340f2
GHA: disable TFTP test on native Windows
Some TFTP tests seem to enter into a loop and maybe hang?

E.g. 1007, 1009, 1238

Try fixing it by skipping all TFTP tests.

Ref: https://github.com/curl/curl/actions/runs/9141987545/job/25137038249?pr=13698

Also drop mingw-w64 test exclusions copy-pasted from MSYS jobs.

Possibly related: cffbcc3110 #5364

Close #13699
2024-05-19 13:02:51 +02:00
renovate[bot]
7c44d64a80
GHA: pin dependencies
Closes #13691
2024-05-18 22:52:10 +02:00
Viktor Szakats
00560b95b4
GHA: ignore flaky test2302 results on Windows
WebSockets:
```
TESTFAIL: These test cases failed: 2302
```
Ref: https://github.com/curl/curl/actions/runs/9139155361/job/25131144383?pr=13689#step:14:9892

Follow-up to 36fd2dd6ee #13599
Ref: #13692
Closes #13696
2024-05-18 19:58:03 +02:00
Viktor Szakats
36fd2dd6ee
GHA: add MSYS, mingw-w64, Cygwin jobs
- re-implement autotools MSYS and Cygwin AppVeyor jobs in GHA.
  Now build with SSL and PSL to improve test coverage.
- re-implement MSYS2 mingw-w64 gcc 13 AppVeyor job in GHA.
  `CMake, mingw-w64, gcc 13, Debug, x64, Schannel, Static, Unicode`
- add new cmake Cygwin job (build-only).
- enable `-j14` parallelism when running tests.
- delete the 5 migrated jobs from AppVeyor CI.
- add 2 build-only mingw-w64 builds, gcc Release and clang OpenSSL.
- also enable brotli, libssh2, nghttp2 for more test coverage.

These jobs offer better performance, more flexibility and
parallelization compared to the AppVeyor ones they replace. It also
offloads AppVeyor, allowing to iterate faster. They also appear more
reliable than e.g. Azure Windows jobs, where runners are prone to fail
[1].

Closes #13599

[1]:
`Exit code 143 returned from process: file name 'C:\Windows\system32\docker.EXE',
arguments 'exec -i   6b13a669c6dfe7fb9f59414369872fd64d61c7182f880c3d39c135cb4c115c8f
C:\__a\externals\node\bin\node.exe C:\__w\_temp\containerHandlerInvoker.js'.`
2024-05-18 00:30:36 +02:00
Stefan Eissing
345557248e
pytest: fixes for recent python, add FTP tests
Fixes:
- in uds tests, abort also silently on os errors
- be conservative on the h3 goaway duration
- detect curl debug build and use in checks
- fix caddy version check for slight difference under linux
- set caddy default path fitting for linux
- fix deprecation warnings in valid time checks

FTP tests:
- add '--with-test-vsftpd=path' to configure
- use vsftpd default path suitable for linux
- add test_30 with plain FTP tests
- add test_31 with --ssl-reqd FTP tests
- add vsftpd to linux GHA for pytest workflows

Closes #13661
2024-05-17 16:53:17 +02:00
renovate[bot]
7ec3db1d36
GHA: update awslabs/aws-lc to v1.27.0
Closes #13667
2024-05-16 08:30:45 +02:00
renovate[bot]
7398037abe
GHA: pin dependencies
Closes #13628
2024-05-15 13:35:45 +02:00
renovate[bot]
6ce1d6f816
CI: renovate updates
- GHA: update actions/checkout action to v4
- GHA: update wolfSSL/wolfssh to v1.4.17
- GHA: update wolfSSL/wolfssl to v5.7.0
- Update the regex config in renovate.json

Closes #13632
Closes #13641
Closes #13658
Closes #13659
2024-05-15 11:38:28 +02:00
Max Dymond
2f50b2d9da
ci: fix renovate config for WolfSSL/WolfSSH tagging scheme
WolfSSL/WolfSSH use a different versioning scheme;
stable builds end with `-stable`. Renovate requires
some extra configuration to extract the version
from these types of tags.

Closes #13644
2024-05-15 11:12:12 +02:00
Daniel Stenberg
49140cd188
Revert "ci: update nghttp2/nghttp2 to v1.62.0"
This reverts commit 14f2c76755.

We need to also upgrade the C++ compiler for that bump to work.

Closes #13656
2024-05-15 09:46:35 +02:00
renovate[bot]
72e65b22c1
ci: update gnutls/gnutls to v3.8.5
Closes #13640
2024-05-15 08:08:18 +02:00
renovate[bot]
70b83061b4
ci: update awslabs/aws-lc to v1.26.0
Closes #13647
2024-05-15 08:01:21 +02:00
renovate[bot]
65d387ad1d
ci: update cloudflare/quiche to v0.21.0
Closes #13648
2024-05-15 08:00:25 +02:00
renovate[bot]
7b4f80ebae
ci: update libressl-portable/portable to v3.9.2
Closes #13649
2024-05-15 07:59:01 +02:00
renovate[bot]
14f2c76755
ci: update nghttp2/nghttp2 to v1.62.0
Closes #13650
2024-05-15 07:57:39 +02:00
renovate[bot]
69af91b88b
ci: update ngtcp2/nghttp3 to v1.3.0
Closes #13651
2024-05-15 07:57:13 +02:00
renovate[bot]
65855676b6
ci: update ngtcp2/ngtcp2 to v1.5.0
Closes #13652
2024-05-15 07:56:01 +02:00
Max Dymond
599fe1e4c5 ci: handle git submodules for mbedTLS 2024-05-14 16:26:11 +01:00
Max Dymond
4f262ee0e1 Add the remainder of the workflows 2024-05-13 22:34:46 +01:00
Max Dymond
73a3602120 Add some basic versioning for some workflows to check whether this is detected properly 2024-05-13 22:34:46 +01:00
Daniel Stenberg
7d8d25174c
docs/cmdline-opts: mention STARTTLS for --ssl and --ssl-reqd
... since users might look for those terms in the manpage.

Closes #13590
2024-05-12 17:39:20 +02:00
Stefan Eissing
e1cf21b5c2
GHA: repair the linux-old job
package libc6_2.28-10+deb10u2_amd64.deb changed to
libc6_2.28-10+deb10u3_amd64.deb

Closes #13564
2024-05-08 23:40:33 +02:00
Viktor Szakats
dfdd978f7c
cmake: add BUILD_EXAMPLES option to build examples
You can enable it with `-DBUILD_EXAMPLES=ON`.

To match autotools' `make examples` feature.
Windows (static) builds not tested.

Also enable examples in a pair of CI jobs.

Apply related updates to the macOS CI workflow:
- drop unused `CXX` envs.
- drop no longer needed `-Wno-error=undef -Wno-error=conversion` flags.
- pass `-Wno-deprecated-declarations` to GCC too (for `BUILD_EXAMPLES`).
- document why `-Wno-deprecated-declarations` is necessary.

Closes #13491
2024-04-29 00:26:50 +02:00
Philip H.
303bb8785c
ci: remove microsoft-prod.list
This is added by default, and it is often broken, but we don't need
anything from it.

Closes #13473
2024-04-25 23:27:42 +02:00
Stefan Eissing
dd8ffa73ff
CI: macos fixes for new ARM GHA images
- based on #13478 with additions from #13476
- make homebrew install path flexible
- fix OpenSSL pkgconfig files libdir
- add path to --with-libssh2 target
- disable gcc securetransport due to linker
  errors (missing symbols), probably because
  the os version is no longer low enough

Assisted-by: Viktor Szakats

Closes #13479
2024-04-25 22:25:12 +02:00
Jan Venekamp
fba9afebba
mbedTLS: implement CURLOPT_SSL_CIPHER_LIST option
Use a lookup list to set the cipher suites, allowing the
ciphers to be set by either openssl or IANA names.

To keep the binary size of the lookup list down we compress
each entry in the cipher list down to 2 + 6 bytes using the
C preprocessor.

Closes #13442
2024-04-24 14:30:37 +02:00