Commit Graph

42 Commits

Author SHA1 Message Date
Viktor Szakats
62d77b12fc
spacecheck: check long lines and repeat spaces, fix fallouts
Verify if lines are not longer than 192 characters. Also verify if lines
have less than 79 repeat spaces (and fix one fallout).

To improve readability by avoiding long lines and to prevent adding
overly long lines with text that may go unnoticed in an editor or diff
viewer.

In addition to pre-existing line length limits: 79 for C, 132 for CMake
sources.

Also:
- spacecheck: fix/harden allowlist regexes.
- spacecheck: tidy-up quotes and simplify escaping.
- spacecheck: allow folding strings with repeat spaces.
- GHA: fix a suppressed shellcheck warning.
- GHA/macos: simplify by dropping brew bundle.
- test1119.pl: precompile a regex.
- FAQ.md: delete very long link to a Windows 7/2008 support article
  that's lost it relevance.

Closes #21087
2026-03-25 11:02:08 +01:00
Daniel Stenberg
ceae02db04
rtmp: drop support
- librtmp has no test cases, makes no proper releases and has not had a
  single commit within the last year

- librtmp parses the URL itself and requires non-compliant URLs for this

- we have no RTMP tests

- RTMP was used by 2.2% of curl users (self-identified in the 2025
  survey)

Closes #20673
2026-03-21 14:56:06 +01:00
dependabot[bot]
4427e6152a
GHA: bump actions and pip dependencies
- update action `actions/cache` from 5.0.1 to 5.0.3
- update action `github/codeql-action` from 4.31.9 to 4.32.4
- update pip `filelock` from 3.20.3 to 3.24.3
- update pip `ruff` from 0.14.14 to 0.15.2

Closes #20782
Closes #20783
2026-03-01 19:06:39 +01:00
dependabot[bot]
47734f3244
GHA: bump GHA and pip dependencies
- update `actions/checkout` from 6.0.1 to 6.0.2
- update `ruff` from 0.14.11 to 0.14.14
- update `cryptography` from 46.0.3 to 46.0.4
- update `psutil` from 7.2.1 to 7.2.2
- update `websockets` from 15.0.1 to 16.0

Closes #20490
Closes #20491
2026-02-01 16:40:37 +01:00
Viktor Szakats
64728418ff
GHA/codeql: improve perf on Windows, enable CURL_WERROR=ON, and more
- set `CURL_DROP_UNUSED=ON` for Windows (MSVC) to make the analysis step
  faster: 1m30s -> 1m15s

- enable `CURL_WERROR=ON` in all builds, to catch potential build issues
  in addition to running CodeQL. To make these builds useful as regular
  build tests too.

- add links to CodeQL Actions documentation.

- delete test data C files after checkout in an attempt to remove them
  from CodeQL code coverage stats.

Closes #20418
2026-01-24 13:10:26 +01:00
Viktor Szakats
3ee1d3b573
tidy-up: merge root packages directory into projects
To simplify the directory layout.

- OS400 and vms support move from `packages` to `projects`.

- Windows README and `generate.bat` files move from `projects`
  to `projects/Windows`.

Closes #20271
2026-01-12 23:49:35 +01:00
Viktor Szakats
1b24428d62
GHA: delete disable-man-db hack, runners doing it by default now
Refs:
1f107542ae
https://github.com/actions/runner-images/pull/13268
https://github.com/actions/runner-images/issues/13213

Follow-up to 5acba8bc36 #17181

Closes #20254
2026-01-11 15:40:21 +01:00
Viktor Szakats
a6087d69a9
GHA: delete new apt sources adding the flaky distro source
CI workflows deleted apt package source `microsoft-prod.list` due to
flakiness seen in the past with those sources. Sources are still flaky
and they are now also used from `azure-cli.sources` which is included
by default by the runner images. Add it to the delete list.

Also: remove another new, unnecessary (for curl CI) package source seen
on the `ubuntu-24.04-arm` runner, for good measure, and performance.

Fixing:
```
Reading package lists...
E: Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/noble/InRelease  403  Forbidden [IP: 13.107.246.66 443]
E: The repository 'https://packages.microsoft.com/repos/azure-cli noble InRelease' is no longer signed.
Error: Process completed with exit code 100.
```
Ref: https://github.com/curl/curl/actions/runs/20896127602/job/60034941964?pr=20142#step:2:79

Follow-up to 303bb8785c #13473

Closes #20253
2026-01-11 15:25:19 +01:00
Viktor Szakats
bfacfb2355
plan9: drop special build and orphaned references
Would need 64-bit support.

Ref: https://github.com/curl/curl/pull/20233#issuecomment-3732556015
Follow-up to 0159100f4f #20233

Closes #20243
2026-01-10 23:03:17 +01:00
dependabot[bot]
34683b552c
GHA: bump gha-dependencies
- update `github/codeql-action` from 4.31.8 to 4.31.9
- update `cross-platform-actions/action` from 0.30.0 to 0.32.0
  - support for OmniOS and FreeBSD 15.0
  - releases are now immutable

Closes #20140
2026-01-01 20:48:59 +01:00
renovate[bot]
e6146418df
GHA: update actions
- update actions/checkout action to v6.0.1
- update github/codeql-action action to v4.31.8
- update msys2/setup-msys2 action to v2.30.0

Closes #19962
Closes #19967
Closes #19968
2025-12-14 09:17:31 +01:00
renovate[bot]
6532398af4
GHA: update dependencies and actions
- update dependency awslabs/aws-lc to v1.65.1
- update dependency pizlonator/fil-c to v0.676
- update github/codeql-action action to v4.31.7

Closes #19905
Closes #19912
Closes #19913
2025-12-10 03:46:23 +01:00
Viktor Szakats
9e6f1c5efb
build: add build-level CURL_DISABLE_TYPECHECK options
Usage:
- autotools: `--disable-typecheck` (or `--enable-typecheck` (default))
- cmake: `-DCURL_DISABLE_TYPECHECK=ON`.

To disable `curl_easy_setopt()`/`curl_easy_getinfo()` type checking with
supported (new) gcc and clang compilers. It is useful to improve build
performance for the `tests/libtest` target. In particular the CodeQL
analyzer may take above an hour to compile with type checking enabled,
and disabling it brings it down to seconds. On local machines it may
also cut build times in half when build testdeps, depending on platform
and compiler.

Other than these cases, we recommend leaving type checking enabled.

Ref: fdacf34aae #19632

Also:
- GHA/codeql: use it.
- test1165: check in `include/curl`.
- lib1912: delete stray todo comment.
- spelling and comment nits.

Closes #19637
2025-11-21 13:48:35 +01:00
Viktor Szakats
fdacf34aae
GHA/codeql: add tweak to successfully build libtests for CodeQL
Turns out the cause of CodeQL hangs (or probably just extreme long
compile) is the header `curl/typecheck-gcc.h`. By accident I noticed
that the preprocessed output of libtests.c is 75 MB (megabytes). This
is much higher than the amounf of source code hinted, also compared to
e.g. units.c or other build targets. The reason for the extreme size
is each easy option call pulling in the large checker logic defined
in this header.

By compiling with `-DCURL_DISABLE_TYPECHECK`, preprocessed output drops
to 2.2 MB (34x), and the libtests target builds without issues.

Also build all tests and examples with the Linux HTTP/3 config, covering
3 more files.

With these, CodeQL C coverage is 893 out of 930 (96%) (was: 645 69%)

Follow-up to 71fc11e6bb #18695
Follow-up to a333fd4411 #18557
Follow-up to b4922b1295 #18564

Closes https://github.com/vszakats/curl/pull/11
Closes #19632
2025-11-21 03:48:16 +01:00
renovate[bot]
c5ef882e90
GHA: update actions/checkout action to v6 from v5
Closes #19628
2025-11-20 22:27:00 +01:00
renovate[bot]
39320e1e1b
GHA: update dependencies
- github/codeql-action to 4.31.3
- google/boringssl to v0.20251110.0
- ruff to 0.14.5

Closes #19442
Closes #19455
2025-11-17 16:48:56 +01:00
Viktor Szakats
ea2203c1aa
GHA/codeql: limit cron job to the origin repository
To avoid running it in every fork, every week.

Closes #19552
2025-11-16 19:51:20 +01:00
Viktor Szakats
82fa9862df
GHA: set concurrency: where missing
To silence zizmor 1.16.0 warnings.

Also:
- http3-linux: replace hard-coded workflow name with variable.
  Follow-up to a8174176b5 #13841
- codeql: set `cancel-in-progress: true`.
  zizmor apparently does not allow `false` in pedantic mode anymore:
  https://github.com/zizmorcore/zizmor/pull/1227
- codeql: sync concurrency setting with the rest of the jobs.
  (I'm not sure this is correct, or why it was previously special-cased.)

Expressions used (before and after this patch):
- `group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}`
  for GHA/appveyor-status.
- `group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}`
  for all the rest.

Ref: https://github.com/curl/curl/actions/runs/18776245057/job/53571438139?pr=19209

Closes #19215
2025-10-24 13:38:11 +02:00
Viktor Szakats
8be9a26451
build: drop Heimdal support, update docs, replace with MIT Kerberos in CI
The kerberos5 library Heimdal is one of three GSS libraries curl support.
It has a memory leak triggered by the new test in #18917 and the project
seems mostly abandoned.

Drop support and steer users to the MIT krb5 or GNU GSS libraries.

Co-authored-by: Daniel Stenberg

Ref: #18928
Closes #18928
Closes #18932
2025-10-09 02:27:29 +02:00
dependabot[bot]
29093f0ee8
GHA: bump dependencies
- cryptography from 44.0.1 to 46.0.2 in tests/http
- ruff from 0.13.2 to 0.14.0 in .github/scripts
- reuse from 6.0.0 to 6.1.2 in .github/scripts
- github/codeql-action from 3.30.5 to 4.30.7

Closes #18941
Closes #18942
Closes #18943
Closes #18945
Closes #18947
2025-10-08 16:07:58 +02:00
Viktor Szakats
e73759f1a9
GHA: show full versions next to pinned actions
Also quotes to a configuration entry.

Follow-up to 2e5993ab08 #18827

Closes #18832
2025-10-03 16:34:44 +02:00
Viktor Szakats
2e5993ab08
GHA/checksrc: pass zizmor a GH token, fix warnings found
For a complete, online, check.

After this patch the check takes 30s, up from a fraction of a second.

Also bump CodeQL actions to their latest version.

Closes #18827
2025-10-03 13:54:40 +02:00
Viktor Szakats
af7900fb28
CI: move no-verbose build from Circle CI to existing GHA jobs, with tests
To test it in GHA and catch issues at PR time. Before this patch,
Circle CI caught them after pushing to master (or non-fork PR
branches.) GHA also run runtests, pytests and static analysis on
these builds, after this patch.

- GHA/linux: enable no-verbose in an existing job.
- GHA/linux: enable no-verbose in the H3 scan-build job too.
- GHA/macos: enable no-verbose in one build (= 3 jobs with different
  compilers).
- GHA/codeql: enable no-verbose in the MultiSSL Linux build.
- circleci: delete openssl no-verbose job in favor of the above.

Closes #18797
2025-10-02 14:58:06 +02:00
renovate[bot]
e27853d36b
GHA: update dependency ruff and github/codeql-action
- update github/codeql-action digest to 303c0ae
- update dependency ruff to v0.13.2

Closes #18716
Closes #18734
2025-09-25 21:53:53 +02:00
Viktor Szakats
edbf610c6a
GHA: set HOMEBREW_NO_AUTO_UPDATE=1 for Linuxbrew
In an attempt to make `brew install` commands initialize faster.

Often this command started with 20-50 seconds of delay before this
patch. This is an attempt to make it launch faster.

Cherry-picked from #18736
2025-09-25 15:37:13 +02:00
Viktor Szakats
71fc11e6bb
GHA/codeql: build units on Linux
Closes #18695
2025-09-23 11:48:02 +02:00
Viktor Szakats
d75785c7de
GHA: enable more options in static analyzer jobs
This is an effort to pass more code through clang-tidt and scan-build
static analyzers. Following CodeQL Linux jobs.

GHA/codeql:
- also build with libssh.
- disable verbose output in build steps.

GHA/linux:
- enable more build options for the clang-tidy and scan-build jobs:
  libidn2, nghttp2, ldap, kerberos, rtmp, gnutls, gsasl, rustls,
  mbedtls, wolfssl
  Use Linuxbrew where necessary.
- also enable ECH, gssapi in the scan-build job.
- fix 'scanbuild' to be 'scan-build' in the job name.

GHA/macos:
- build with Rustls in the clang-tidy job.
- add a new clang-tidy job to test HTTP/3 (with openssl + ngtcp2).
- build with libssh in one of the clang-tidy jobs.
- build with LibreSSL in the MultiSSL clang-tidy job.
- build with heimdal and kerberos in the clang-tidy jobs respectively.
- build with OpenLDAP in one clang-tidy job.
- add support for `skipall`, `skiprun` job options, and use it.

Closes #18660
2025-09-22 13:10:51 +02:00
Viktor Szakats
c23d7e7a98
GHA/codeql: enable ECH and HTTPS-RR
Switch to Linuxbrew c-ares to hit the minimum version.
(Ubuntu offers 1.27.0, HTTPS-RR requires 1.28.0.)

Closes #18661
2025-09-21 14:36:25 +02:00
Viktor Szakats
ca75476a5c
GHA/codeql: drop winbuild references [ci skip]
Follow-up to 8d004781a5 #18040
2025-09-20 15:07:29 +02:00
Viktor Szakats
b2356a3197
GHA: tidy up actions/checkout version in comments [ci skip] 2025-09-19 14:20:14 +02:00
Viktor Szakats
9618c337d1
GHA/codeql: try disabling the TRAP cache
The `cpp` CodeQL job is adding a cache entry for each run on the master
branch. One for Linux, another for Windows. Size: 68MB + 180MB = 248MB.
In one week we got 50+ such entries, almost filling the available cache
space.

Following the recommendation in an open issue thread, this patch tries
to disable this cache. Since it only affects master, the effect can only
be verified after merging.

The latest cache is picked up in PRs. The performance impact is also to
be seen after merge.

Bug: https://github.com/curl/curl/pull/18528#issuecomment-3288950880
Ref: https://github.com/github/codeql-action/pull/1172
Ref: https://github.com/github/codeql-action/issues/2030
Ref: https://github.com/github/codeql-action/issues/2885#issuecomment-2879069087

Follow-up to cc50f05370 #18528

Closes #18613
2025-09-19 11:30:39 +02:00
Viktor Szakats
cec6c1cd9c
GHA/codeql: make it run on docs updates, to verify examples
Follow-up to b4922b1295 #18564
2025-09-18 20:26:27 +02:00
Viktor Szakats
b4922b1295
GHA/codeql: enable cares, debug, build curlinfo, examples
Also build examples, out of curiousity, as an experiment, possibly
temporary. It needs around 40 seconds.

Closes #18564
2025-09-18 16:48:17 +02:00
Viktor Szakats
a333fd4411
GHA/codeql: enable more build options, build servers and tunits
- add HTTP/3 build with OpenSSL 3.5, nghttp3 and ngtcp2.
- enable GSASL, Heimdal, rtmp, SSLS-export.
- make one build MultiSSL with GnuTLS, mbedTLS, Rustls, wolfSSL.
- build servers (also on Windows), and tunits.
- use Linuxbrew to install build dependencies missing from Ubuntu.

Coverage is now 466 C files. (was: 446)

Closes #18557
2025-09-16 11:23:26 +02:00
dependabot[bot]
56d3bb78be
GHA: bump actions/checkout from 4.2.2 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.2...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

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

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

Closes #18556
2025-09-15 23:15:19 +02:00
Viktor Szakats
ac24e0a80e
GHA/codeql: tidy up config names
Before this patch there was a single C config detected, named `build:`.

Closes #18555
2025-09-15 15:49:08 +02:00
Viktor Szakats
c1be5459d9
GHA/codeql: analyse Windows Schannel WinIDN build
Follow-up to cc50f05370 #18528

Closes #18545
2025-09-14 14:55:30 +02:00
Viktor Szakats
83c457f9f3
GHA: document permissions as required by zizmor 1.13.0
Ref: https://github.com/zizmorcore/zizmor/pull/1131
Ref: https://docs.zizmor.sh/audits/#undocumented-permissions

Bug: https://github.com/curl/curl/pull/18539#issuecomment-3288151910

Closes #18541
2025-09-13 18:11:53 +02:00
Viktor Szakats
cc50f05370
GHA/codeql: re-enable for C with the default query pack
Earlier we used `security-extended` and tried `security-and-quality`.
Try the default to see how it works.

CodeQL no longer uses the project's Actions cache, also fixing
the previously seen repeat cache entry issue.

- switch to `manual` build. It's 3x faster than the default `autobuild`.
- enable more dependencies to increase coverage.
- docs/tests/CI.md: re-add CodeQL.

Ref: https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites
Ref: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
Ref: #16263
Ref: 173805b2e7 #15798

Closes #18528
2025-09-12 11:03:44 +02:00
renovate[bot]
39c2d4b543
GHA: update github/codeql-action digest to 192325c
Closes #18516
2025-09-11 08:40:57 +02:00
renovate[bot]
82449d4d91
GHA: update github/codeql-action digest to d3678e2
Closes #18507
2025-09-09 23:47:41 +02:00
Viktor Szakats
c70f7b7a7c
GHA/codeql: scan GHA workflows and Python
Closes #18504
2025-09-09 21:51:09 +02:00