Commit Graph

164 Commits

Author SHA1 Message Date
Philip H
4397e41be0
CI: openssl-3.0.9+quic
Closes #11296
2023-06-12 16:24:52 +02:00
Daniel Stenberg
7630055a32
GHA: use nghttp2 1.54.0 for the ngtcp2 jobs 2023-06-09 20:50:31 +02:00
Philip H
32f103b0e9
GHA: ngtcp2: use 0.16.0 and nghttp3 0.12.0 2023-06-09 20:50:31 +02:00
Viktor Szakats
3f8fc25720
cmake: add support for "unity" builds
Aka "jumbo" or "amalgamation" builds. It means to compile all sources
per target as a single C source. This is experimental.

You can enable it by passing `-DCMAKE_UNITY_BUILD=ON` to cmake.
It requires CMake 3.16 or newer.

It makes builds (much) faster, allows for better optimizations and tends
to promote less ambiguous code.

Also add a new AppVeyor CI job and convert an existing one to use
"unity" mode (one MSVC, one MinGW), and enable it for one macOS CI job.

Fix related issues:
- add missing include guard to `easy_lock.h`.
- rename static variables and functions (and a macro) with names reused
  across sources, or shadowed by local variables.
- add an `#undef` after use.
- add a missing `#undef` before use.
- move internal definitions from `ftp.h` to `ftp.c`.
- `curl_memory.h` fixes to make it work when included repeatedly.
- stop building/linking curlx bits twice for a static-mode curl tool.
  These caused doubly defined symbols in unity builds.
- silence missing extern declarations compiler warning for ` _CRT_glob`.
- fix extern declarations for `tool_freq` and `tool_isVistaOrGreater`.
- fix colliding static symbols in debug mode: `debugtime()` and
  `statename`.
- rename `ssl_backend_data` structure to unique names for each
  TLS-backend, along with the `ssl_connect_data` struct member
  referencing them. This required adding casts for each access.
- add workaround for missing `[P]UNICODE_STRING` types in certain Windows
  builds when compiling `lib/ldap.c`. To support "unity" builds, we had
  to enable `SCHANNEL_USE_BLACKLISTS` for Schannel (a Windows
  `schannel.h` option) _globally_. This caused an indirect inclusion of
  Windows `schannel.h` from `ldap.c` via `winldap.h` to have it enabled
  as well. This requires `[P]UNICODE_STRING` types, which is apperantly
  not defined automatically (as seen with both MSVS and mingw-w64).
  This patch includes `<subauth.h>` to fix it.
  Ref: https://github.com/curl/curl/runs/13987772013
  Ref: https://dev.azure.com/daniel0244/curl/_build/results?buildId=15827&view=logs&jobId=2c9f582d-e278-56b6-4354-f38a4d851906&j=2c9f582d-e278-56b6-4354-f38a4d851906&t=90509b00-34fa-5a81-35d7-5ed9569d331c
- tweak unity builds to compile `lib/memdebug.c` separately in memory
  trace builds to avoid PP confusion.
- force-disable unity for test programs.
- do not compile and link libcurl sources to libtests _twice_ when libcurl
  is built in static mode.

KNOWN ISSUES:
- running tests with unity builds may fail in cases.
- some build configurations/env may not compile in unity mode. E.g.:
  https://ci.appveyor.com/project/curlorg/curl/builds/47230972/job/51wfesgnfuauwl8q#L250

Ref: https://github.com/libssh2/libssh2/issues/1034
Ref: https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html
Ref: https://en.wikipedia.org/wiki/Unity_build

Closes #11095
2023-06-07 13:06:08 +00:00
Daniel Stenberg
7a48ebc08f
workflows/macos: add a job using gcc + debug + secure transport 2023-05-21 14:02:31 +02:00
Daniel Stenberg
10998e3b89
ngtcp2: use 0.15.0
- nghttp3 0.11.0
- nghttp2 1.53.0

Adapt to new API calls

Closes #11031
2023-05-12 17:25:38 +02:00
Diogo Teles Sant'Anna
31303c34e9 CI: Set minimal permissions on workflow ngtcp2-quictls.yml
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>

Closes #11055
2023-04-28 11:50:30 -07:00
Viktor Szakats
b1ad4f1d5f
ci: -Wno-vla no longer necessary
We handle this issue in the source now.

Follow-up to b725fe1944

Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #11048
2023-04-28 11:02:33 +00:00
Dan Fandrich
9f241a85dc CI: switch the awslc builds to build out-of-tree
This is a common configuration that should be tested to avoid
regressions. The awsls cmake build was already out-of-tree so the
automake build now joins it.

Ref: #11006
2023-04-27 00:15:41 -07:00
Stefan Eissing
acd82c8bfd
tests/http: more tests with specific clients
- Makefile support for building test specific clients in tests/http/clients
- auto-make of clients when invoking pytest
- added test_09_02 for server PUSH_PROMISEs using clients/h2-serverpush
- added test_02_21 for lib based downloads and pausing/unpausing transfers

curl url parser:
- added internal method `curl_url_set_authority()` for setting the
  authority part of a url (used for PUSH_PROMISE)

http2:
- made logging of PUSH_PROMISE handling nicer

Placing python test requirements in requirements.txt files
- separate files to base test suite and http tests since use
  and module lists differ
- using the files in the gh workflows

websocket test cases, fixes for we and bufq
- bufq: account for spare chunks in space calculation
- bufq: reset chunks that are skipped empty
- ws: correctly encode frames with 126 bytes payload
- ws: update frame meta information on first call of collect
  callback that fills user buffer
- test client ws-data: some test/reporting improvements

Closes #11006
2023-04-26 23:24:46 +02:00
Dan Fandrich
fe61f015e5 CI: don't run CI jobs if only another CI was changed
A few paths were missed in the last commit, as well as a job added since
then.

Followup-to 395b9175
2023-04-24 20:46:09 -07:00
Philip H
314dc407d6
GHA: suppress git clone output
Follow-up: 8203aa6ed4

Closes #10949
2023-04-13 17:22:13 +02:00
Philip H
8203aa6ed4
GHA: suppress git clone output
Closes #10939
2023-04-13 08:56:48 +02:00
Dan Fandrich
aafb79de2a CI: retry failed downloads of aws-lc
Don't fail the build in case of a temporary server problem.
2023-04-10 12:19:11 -07:00
Philip H
67546aea90
GHA: update ngtcp2-*.yml to v0.10.0
Closes #10612
2023-03-30 15:43:07 +02:00
Jim King
34ef4fab22
openssl: interop with AWS-LC
* Configure changes to detect AWS-LC
* CMakeLists.txt changes to detect AWS-LC
* Compile-time branches needed to support AWS-LC
* Correctly set OSSL_VERSION and report AWS-LC release number
* GitHub Actions script to build with autoconf and cmake against AWS-LC

AWS-LC is a BoringSSL/OpenSSL derivative
For more information see https://github.com/awslabs/aws-lc/

Closes #10320
2023-03-30 10:56:14 +02:00
Philip H
3f3dfb4d0c
wolfssl.yml: bump to version 5.6.0
Closes #10843
2023-03-28 11:30:16 +02:00
Dan Fandrich
43e71fe0fc CI: skip some more builds when possible
When a commit only contains tests, documentation, or cmake files, skip
those builds that aren't affected by those.

The file filters available on the CI services don't seem to allow
skipping individual jobs, only the entire workflow, so we can't get any
more fine-grained than this.
2023-03-24 19:59:50 -07:00
Daniel Stenberg
d03c4dc165
GHA: add a memory-sanitizer job
Closes #10815
2023-03-24 11:04:59 +01:00
Dan Fandrich
6366a6f80f CI: fix brew retries on GHA
The fix in the previous commit was complete for Cirrus but accidentally
left off a part for GHA.

Follow-up to c2b7249d
2023-03-23 21:21:31 -07:00
Daniel Stenberg
caf92a57b0
GHA: run all linux test jobs with valgrind
Closes #10798
2023-03-22 13:51:28 +01:00
Daniel Stenberg
5bfe3dc3b6
GHA-linux: add an address-sanitizer build
Closes #10810
2023-03-22 13:37:49 +01:00
Stefan Eissing
7fa6e36583
tests/http: add pytest to GHA and improve tests
- added to: ngtcp2-quictls, ngtcp2-gnutls and the linux varians
  quiche, bearssl, libressl, mbedtls, openssl3, rustls
- added disabled in ngtcp2-wolfssl due to weird SSL_connect() errors
  not reproducable locally

Improvements on pytest:

-  handling of systems with nghttpx in $PATH
   - configure will seach $PATH got nghttpx used in pytest
   - pytest fixes for managing nghttpx without h3 support
   - ngtcp2-wolfssl: use a fully enabled wolfssl build

- lower parallel count for http/1.1 tests, since we do not
   want to test excessive connections.
- check built curl for HTTPS-proxy support in proxy tests
- bearssl does not like one of our critical cert extensions, making
  it non-critical now
- bearssl is too slow for test_12, skipping
- making sure we do h3 tests only when curl and server support is there

Closes #10699
2023-03-13 14:06:57 +01:00
Dan Fandrich
395b9175b7 CI: don't run CI jobs if only another CI was changed
Also skip builds on non-Windows platforms when only Windows build files
have changed.

This should reduce the number of useless builds and the associated
waiting time and chance of spurious failures, freeing resources for
new PRs.

Closes #10742
2023-03-11 18:59:45 -08:00
Dan Fandrich
c2b7249db2 CI: fix retrying on brew failures
The previous attempt didn't consider that the shell would exit
immediately after the false statement in the retry case.

Follow-up to dc141a37
2023-03-10 16:41:25 -08:00
Dan Fandrich
dc141a37d3 CI: retry a failed brew update too, not just brew install
Also, make sure an eventual failure ends up returning a failure code so
the job stops.
2023-03-10 09:55:11 -08:00
andy5995
ab456e4e50
GHA: minor improvements to spellcheck
Closes #10640
2023-03-09 00:16:04 +01:00
Daniel Stenberg
aa31f9a856
Revert "GHA: add Microsoft C++ Code Analysis"
This reverts commit e0db842b2a.

This tool seems very restricted in how often it might be used by a
project and thus very quickly start to report fails simply because it
refuses to run when "there are more runs than allowed".

Closes #10613
2023-02-26 23:05:12 +01:00
Philip H
4b3dc4b452
ngtcp2-gnutls.yml: bump to gnutls 3.8.0
Closes #10507
2023-02-25 00:12:44 +01:00
Philip H
8bd5a13dc3
CI: update ngtcp2 and nghttp2 for pytest
Follow-up: 5c9ee8cef4

Closes #10508
2023-02-25 00:11:46 +01:00
andy5995
8125822e6e
GHA: use same flags for Slackbuild as Slack package
Closes #10526
2023-02-25 00:10:25 +01:00
Daniel Stenberg
e0db842b2a
GHA: add Microsoft C++ Code Analysis
Closes #10583
2023-02-21 22:51:19 +01:00
Jacob Hoffman-Andrews
30411d7278
GHA: update rustls dependency to 0.9.2
This allows re-enabling test 312 for the rustls backend.

Closes #10553
2023-02-18 09:53:58 +01:00
Stefan Eissing
4437e3e344
test: add test for HTTP/2 corruption as reported in #10525
- adding test_02_20 for reproducing the situation
- using recently released mod_h2 Apache module
- skipping test if an older version is installed
- adding installation of current mod_h2 to github pytest workflow

This reproduces the error reliable (for me) on the lib/http2.c version
of curl 7.88.0. And passes with the recent curl master.

Closes #10534
2023-02-17 09:17:04 +01:00
Philip H
6f20596768
CI: update wolfssl / wolfssh to 5.5.4 / 1.4.12
Closes #10493
2023-02-13 17:13:32 +01:00
Tatsuhiro Tsujikawa
5c9ee8cef4
GHA: bump ngtcp2 workflow dependencies
Closes #10494
2023-02-13 17:07:49 +01:00
Philip H
82348603e8
Linux CI: Bump rustls-ffi to v0.9.1
Closes #10476
2023-02-12 12:36:25 +01:00
Philip H
bd12f27258
Linux CI: update some dependecies to latest tag
Closes #10458
2023-02-10 08:35:58 +01:00
Dan Fandrich
bfb9838380 CI: Retry failed downloads to reduce spurious failures
A temporary error with a remote server shouldn't cause a CI run to fail.
Also, put a cap on the time to download to fail faster on a misbehaving
server or connection and use HTTP compression where possible to reduce
download times.
2023-02-09 15:18:04 -08:00
Daniel Stenberg
528583cf77
GHA: enable websockets in the torture job
Closes #10448
2023-02-09 18:54:17 +01:00
andy5995
4f051d0e54
GHA: move Slackware test into matrix
Closes #10412
2023-02-06 09:57:53 +01:00
Philip H
b87664445c
GHA/macos.yml: bump to gcc-12
Closes #10415
2023-02-06 08:20:03 +01:00
Philip H
92d4053afd
GHA/macos: use Xcode_14.0.1 for cmake builds
Fixes #10356
Closes #10381
2023-02-01 11:36:40 +01:00
Stefan Eissing
91eb197a9e
CI: add pytest github workflow to CI test/tests-httpd on a HTTP/3 setup
Closes #10317
2023-01-31 12:04:23 +01:00
Dan Fandrich
ffe3e3c4e1 CI: Work around a labeler bug that removes labels 2023-01-28 19:48:02 -08:00
Dan Fandrich
de8cc2108a CI: Switch the labeler event to pull_request_target
Otherwise, the action won't work on PRs from forked repositories
(#10326).
2023-01-25 10:43:47 -08:00
Dan Fandrich
3eabedc027 CI: Add a workflow to automatically label pull requests
The labeler language is quite restrictive right now so labels are added
quite conservatively, meaning that many PRs won't get labels when it's
"obvious" they should. It will still save some manual work on those
that it can label.
2023-01-23 18:18:00 -08:00
Nick Banks
9f0c7795eb
msh3: update to v0.6
Closes #10192
2023-01-10 13:50:08 +01:00
Daniel Stenberg
0978b2ef25
.github/workflows/linux.yml: add a quiche CI job
Move over from zuul

Closes #10241
2023-01-09 11:09:33 +01:00
Tatsuhiro Tsujikawa
3022eeaefe
GHA: use designated ngtcp2 and its dependencies versions
Designate ngtcp2 and its dependency versions so that the CI build does
not fail without our control.

Closes #10257
2023-01-08 20:31:52 +01:00