初始化内容
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
|
||||
SPDX-License-Identifier: curl
|
||||
-->
|
||||
|
||||
# How to contribute to curl
|
||||
|
||||
## Join the community
|
||||
|
||||
1. Click 'watch' on the GitHub repo
|
||||
2. Subscribe to the suitable [mailing lists](https://curl.se/mail/)
|
||||
|
||||
## Read [CONTRIBUTE](/docs/CONTRIBUTE.md)
|
||||
|
||||
## Send your suggestions using one of these methods:
|
||||
|
||||
1. in a mail to the mailing list
|
||||
2. as a [pull request](https://github.com/curl/curl/pulls)
|
||||
3. as an [issue](https://github.com/curl/curl/issues)
|
||||
|
||||
/ The curl team
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
github: curl
|
||||
open_collective: curl
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: Bug Report on code
|
||||
description: Tell us about your problem with curl or libcurl
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
Only file bugs here! Ask questions on the mailing lists https://curl.se/mail/
|
||||
|
||||
**SECURITY RELATED?** Submit here: https://hackerone.com/curl
|
||||
|
||||
- type: textarea
|
||||
id: reproducer
|
||||
attributes:
|
||||
label: I did this
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: I expected the following
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: version
|
||||
attributes:
|
||||
label: curl/libcurl version
|
||||
description: |
|
||||
Please paste the output of `curl -V` here.
|
||||
placeholder: 'curl 8.18.0'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: os
|
||||
attributes:
|
||||
label: operating system
|
||||
description: |
|
||||
On Unix please post the output of `uname -a` here.
|
||||
placeholder: 'Fedora Linux 38'
|
||||
validations:
|
||||
required: true
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question (without email)
|
||||
url: https://github.com/curl/curl/discussions
|
||||
about: Use the Discussion forum here on GitHub
|
||||
- name: Ask a question (using email)
|
||||
url: https://curl.se/mail/
|
||||
about: Send question to the suitable mailing list
|
||||
- name: Commercial support
|
||||
url: https://curl.se/support.html
|
||||
about: Pay for fast quality support for and help with curl/libcurl
|
||||
- name: Feature request
|
||||
url: https://curl.se/mail/
|
||||
about: To propose new features or enhancements, please bring that discussion to a suitable curl mailing list.
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: Bug Report on documentation
|
||||
description: Problems, errors, mistakes or typos in documentation.
|
||||
labels: documentation
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
Only file documentation bugs here! Ask questions on the mailing lists https://curl.se/mail/
|
||||
|
||||
- type: textarea
|
||||
id: source
|
||||
attributes:
|
||||
label: Specify which documentation you found a problem with
|
||||
description: |
|
||||
Include function name, URL, tarball version and all other relevant
|
||||
details that identify the documentation source.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: The problem
|
||||
validations:
|
||||
required: true
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# https://docs.github.com/code-security/dependabot/working-with-dependabot/dependabot-options-reference
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'monthly'
|
||||
cooldown:
|
||||
default-days: 7
|
||||
groups:
|
||||
gha-dependencies:
|
||||
patterns:
|
||||
- '*'
|
||||
commit-message:
|
||||
prefix: 'GHA:'
|
||||
|
||||
- package-ecosystem: 'pip'
|
||||
directories:
|
||||
- '.github/scripts'
|
||||
- 'tests'
|
||||
schedule:
|
||||
interval: 'monthly'
|
||||
cooldown:
|
||||
default-days: 7
|
||||
semver-major-days: 15
|
||||
semver-minor-days: 7
|
||||
semver-patch-days: 3
|
||||
groups:
|
||||
pip-dependencies:
|
||||
patterns:
|
||||
- '*'
|
||||
commit-message:
|
||||
prefix: 'GHA:'
|
||||
Vendored
+556
@@ -0,0 +1,556 @@
|
||||
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# The workflow configures the .github/workflows/label.yml action
|
||||
# to add labels to pull requests. This is not (yet?) a replacement for human
|
||||
# triaging, but is intended to add labels to the easy cases. If the matching
|
||||
# language becomes more powerful, more cases should be able to be handled.
|
||||
#
|
||||
# Labels are added in two ways: the any-glob-to-all-files ones are added if all
|
||||
# the files fit into the category, and the any-glob-to-any-file ones are added
|
||||
# as long as any file matches. The first ones are for "major" categories (the
|
||||
# PR is all about that one topic, like HTTP/3), while the second ones are
|
||||
# "addendums" that give useful information about a PR that is really mostly
|
||||
# something else (e.g. CI if the PR also touches CI jobs).
|
||||
#
|
||||
# N.B. any-glob-to-all-files is misnamed; it acts like one-glob-to-all-files.
|
||||
# Therefore, to get any-glob-to-all-files semantics with multiple matching
|
||||
# patterns, they must be joined with commas to a single string surrounded by
|
||||
# braces. For example: '{lib/**,src/**}'.
|
||||
#
|
||||
# See https://github.com/actions/labeler/ for documentation on this file.
|
||||
---
|
||||
|
||||
appleOS:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
.github/workflows/macos.yml,\
|
||||
lib/config-mac.h,\
|
||||
lib/macos*,\
|
||||
lib/vtls/apple.*,\
|
||||
m4/curl-apple-sectrust.m4\
|
||||
}"
|
||||
|
||||
authentication:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindGSS.cmake,\
|
||||
CMake/FindLibgsasl.cmake,\
|
||||
docs/libcurl/opts/CURLINFO_HTTPAUTH*,\
|
||||
docs/libcurl/opts/CURLINFO_PROXYAUTH*,\
|
||||
docs/libcurl/opts/CURLOPT_KRB*,\
|
||||
docs/libcurl/opts/CURLOPT_SASL*,\
|
||||
docs/libcurl/opts/CURLOPT_SERVICE_NAME*,\
|
||||
docs/libcurl/opts/CURLOPT_USERNAME*,\
|
||||
docs/libcurl/opts/CURLOPT_USERPWD*,\
|
||||
docs/libcurl/opts/CURLOPT_XOAUTH*,\
|
||||
lib/*gssapi*,\
|
||||
lib/*ntlm*,\
|
||||
lib/curl_sasl.*,\
|
||||
lib/http_aws*,\
|
||||
lib/http_digest.*,\
|
||||
lib/http_negotiate.*,\
|
||||
lib/vauth/**\
|
||||
}"
|
||||
|
||||
build:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
**/CMakeLists.txt,\
|
||||
**/Makefile.am,\
|
||||
**/Makefile.inc,\
|
||||
**/*.m4,\
|
||||
*.m4,\
|
||||
docs/INSTALL-CMAKE.md,\
|
||||
lib/curl_config-cmake.h.in,\
|
||||
lib/libcurl*.in,\
|
||||
CMake/**,\
|
||||
CMakeLists.txt,\
|
||||
configure.ac,\
|
||||
m4/**,\
|
||||
Makefile.*,\
|
||||
projects/**,\
|
||||
lib/libcurl.def,\
|
||||
tests/cmake/**\
|
||||
}"
|
||||
|
||||
CI:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '.circleci/**'
|
||||
- '.github/**'
|
||||
- 'appveyor.*'
|
||||
- 'scripts/ci*'
|
||||
- 'tests/azure.pm'
|
||||
- 'tests/appveyor.pm'
|
||||
- 'tests/CI.md'
|
||||
|
||||
cmake:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
**/CMakeLists.txt,\
|
||||
CMake/**,\
|
||||
docs/INSTALL-CMAKE.md,\
|
||||
lib/curl_config-cmake.h.in,\
|
||||
tests/cmake/**\
|
||||
}"
|
||||
|
||||
cmdline tool:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'docs/cmdline-opts/**'
|
||||
- 'src/**'
|
||||
|
||||
connecting & proxies:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/cmdline-opts/happy-eyeballs*,\
|
||||
docs/cmdline-opts/ipv*,\
|
||||
docs/cmdline-opts/*proxy*,\
|
||||
docs/internals/CONNECTION-FILTERS.md,\
|
||||
docs/examples/ipv6.c,\
|
||||
docs/libcurl/opts/CURLINFO_CONNECT*,\
|
||||
docs/libcurl/opts/CURLINFO_PROXY*,\
|
||||
docs/libcurl/opts/CURLOPT_ADDRESS*,\
|
||||
docs/libcurl/opts/CURLOPT_CONNECT*,\
|
||||
docs/libcurl/opts/CURLOPT_HAPROXY*,\
|
||||
docs/libcurl/opts/CURLOPT_OPENSOCKET*,\
|
||||
docs/libcurl/opts/CURLOPT_PRE_PROXY*,\
|
||||
docs/libcurl/opts/CURLOPT_PROXY*,\
|
||||
docs/libcurl/opts/CURLOPT_SOCKOPT*,\
|
||||
docs/libcurl/opts/CURLOPT_SOCKS*,\
|
||||
docs/libcurl/opts/CURLOPT_TCP*,\
|
||||
docs/libcurl/opts/CURLOPT_TIMEOUT*,\
|
||||
lib/cf-*proxy.*,\
|
||||
lib/cf-socket.*,\
|
||||
lib/cfilters.*,\
|
||||
lib/conncache.*,\
|
||||
lib/connect.*,\
|
||||
lib/http_proxy.*,\
|
||||
lib/if2ip.*,\
|
||||
lib/noproxy.*,\
|
||||
lib/socks.*,\
|
||||
src/tool_cb_soc.*,\
|
||||
tests/http/*socks*,\
|
||||
tests/server/socksd.c\
|
||||
}"
|
||||
|
||||
cookies:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindLibpsl.cmake,\
|
||||
docs/HTTP-COOKIES.md,\
|
||||
docs/cmdline-opts/cookie*,\
|
||||
docs/cmdline-opts/junk-session-cookies.md,\
|
||||
docs/libcurl/opts/CURLINFO_COOKIE*,\
|
||||
docs/libcurl/opts/CURLOPT_COOKIE*,\
|
||||
docs/examples/cookie_interface.c,\
|
||||
lib/cookie.*,\
|
||||
lib/psl.*\
|
||||
}"
|
||||
|
||||
cryptography:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/CIPHERS.md,\
|
||||
docs/RUSTLS.md,\
|
||||
docs/libcurl/opts/CURLOPT_EGDSOCKET*,\
|
||||
lib/*sha256*,\
|
||||
lib/*sha512*,\
|
||||
lib/curl_hmac.*,\
|
||||
lib/curl_md?.*,\
|
||||
lib/curl_ntlm_core.*,\
|
||||
lib/md?.*,\
|
||||
lib/rand.*\
|
||||
}"
|
||||
|
||||
DICT:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/dict.*,\
|
||||
tests/dictserver.py\
|
||||
}"
|
||||
|
||||
documentation:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
.github/workflows/checkdocs.yml,\
|
||||
.github/scripts/pyspelling*,\
|
||||
.github/scripts/requirements-docs.txt,\
|
||||
.github/scripts/requirements-proselint.txt,\
|
||||
.github/scripts/typos*,\
|
||||
.github/scripts/verify-examples.pl,\
|
||||
.github/scripts/verify-synopsis.pl,\
|
||||
**/*.md,\
|
||||
**/*.txt,\
|
||||
**/*.1,\
|
||||
CHANGES.md,\
|
||||
docs/**,\
|
||||
LICENSES/**,\
|
||||
README,\
|
||||
RELEASE-NOTES,\
|
||||
scripts/badwords.*,\
|
||||
scripts/cd*,\
|
||||
scripts/mdlinkcheck,\
|
||||
scripts/nroff2cd,\
|
||||
scripts/release-notes.pl\
|
||||
}"
|
||||
- all-globs-to-all-files:
|
||||
# negative matches
|
||||
- '!**/CMakeLists.txt'
|
||||
- '!**/Makefile.am'
|
||||
|
||||
FTP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/cmdline-opts/ftp*,\
|
||||
docs/libcurl/opts/CURLINFO_FTP*,\
|
||||
docs/libcurl/opts/CURLOPT_FTP*,\
|
||||
docs/libcurl/opts/CURLOPT_WILDCARDMATCH*,\
|
||||
docs/examples/ftp*,\
|
||||
lib/curl_fnmatch.*,\
|
||||
lib/curl_range.*,\
|
||||
lib/ftp*,\
|
||||
tests/ftp*,\
|
||||
tests/http/*ftpd*,\
|
||||
tests/http/testenv/*ftpd*,\
|
||||
tests/libtest/*_ftp_*\
|
||||
}"
|
||||
|
||||
GOPHER:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/gopher*\
|
||||
}"
|
||||
|
||||
HTTP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/HTTPSRR.md,\
|
||||
docs/HSTS.md,\
|
||||
docs/examples/hsts*,\
|
||||
docs/examples/http-*,\
|
||||
docs/examples/httpput*,\
|
||||
docs/examples/https*,\
|
||||
docs/examples/*post*,\
|
||||
docs/HTTP-COOKIES.md,\
|
||||
docs/libcurl/opts/CURLINFO_COOKIE*,\
|
||||
docs/libcurl/opts/CURLINFO_HTTP*,\
|
||||
docs/libcurl/opts/CURLINFO_REDIRECT*,\
|
||||
docs/libcurl/opts/CURLINFO_REFER*,\
|
||||
docs/libcurl/opts/CURLOPT_COOKIE*,\
|
||||
docs/libcurl/opts/CURLOPT_FOLLOWLOCATION*,\
|
||||
docs/libcurl/opts/CURLOPT_HSTS*,\
|
||||
docs/libcurl/opts/CURLOPT_HTTP*,\
|
||||
docs/libcurl/opts/CURLOPT_POST.*,\
|
||||
docs/libcurl/opts/CURLOPT_POSTFIELD*,\
|
||||
docs/libcurl/opts/CURLOPT_POSTREDIR*,\
|
||||
docs/libcurl/opts/CURLOPT_REDIR*,\
|
||||
docs/libcurl/opts/CURLOPT_REFER*,\
|
||||
docs/libcurl/opts/CURLOPT_TRAILER*,\
|
||||
docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING*,\
|
||||
lib/cf-https*,\
|
||||
lib/cf-h1*,\
|
||||
lib/cf-h2*,\
|
||||
lib/cookie.*,\
|
||||
lib/hsts.*,\
|
||||
lib/http*,\
|
||||
tests/http*,\
|
||||
tests/http-server.pl,\
|
||||
tests/http/*,\
|
||||
tests/nghttp*\
|
||||
}"
|
||||
|
||||
HTTP/2:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindNGHTTP2.cmake,\
|
||||
CMake/FindQuiche.cmake,\
|
||||
docs/libcurl/opts/CURLOPT_STREAM*,\
|
||||
docs/examples/http2*,\
|
||||
lib/http2*,\
|
||||
tests/http2-server.pl\
|
||||
}"
|
||||
|
||||
HTTP/3:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
.github/workflows/http3-linux.yml,\
|
||||
CMake/FindNGHTTP3.cmake,\
|
||||
CMake/FindNGTCP2.cmake,\
|
||||
docs/HTTP3.md,\
|
||||
docs/examples/http3*,\
|
||||
lib/vquic/**,\
|
||||
tests/http3-server.pl,\
|
||||
tests/nghttpx.conf\
|
||||
}"
|
||||
|
||||
IMAP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/imap*,\
|
||||
docs/examples/imap*\
|
||||
}"
|
||||
|
||||
LDAP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/*ldap*\
|
||||
}"
|
||||
|
||||
libcurl API:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'docs/libcurl/ABI.md'
|
||||
- 'docs/libcurl/curl_*.md'
|
||||
- 'include/curl/**'
|
||||
|
||||
logging:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/cmdline-opts/trace*,\
|
||||
docs/libcurl/curl_global_trace*,\
|
||||
lib/curl_trc*,\
|
||||
tests/http/test_15_tracing.py\
|
||||
}"
|
||||
|
||||
MIME:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/libcurl/curl_form*,\
|
||||
docs/libcurl/curl_mime_*,\
|
||||
docs/libcurl/opts/CURLOPT_MIME*,\
|
||||
docs/libcurl/opts/CURLOPT_HTTPPOST*,\
|
||||
lib/formdata*,\
|
||||
lib/mime*,\
|
||||
src/tool_formparse.*\
|
||||
}"
|
||||
|
||||
MQTT:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/internals/MQTT.md,\
|
||||
lib/mqtt*,\
|
||||
tests/server/mqttd.c\
|
||||
}"
|
||||
|
||||
name lookup:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindLibidn2.cmake,\
|
||||
docs/cmdline-opts/doh*,\
|
||||
docs/cmdline-opts/dns*,\
|
||||
docs/examples/resolve.c,\
|
||||
docs/internals/THRDPOOL-AND-QUEUE.md,\
|
||||
docs/libcurl/opts/CURLINFO_NAMELOOKUP*,\
|
||||
docs/libcurl/opts/CURLOPT_DNS*,\
|
||||
docs/libcurl/opts/CURLOPT_DOH*,\
|
||||
docs/libcurl/opts/CURLOPT_RESOLVE*,\
|
||||
lib/*addrinfo*,\
|
||||
lib/asyn*,\
|
||||
lib/cf-dns.*,\
|
||||
lib/curl_gethostname.*,\
|
||||
lib/dns*,\
|
||||
lib/doh*,\
|
||||
lib/host*,\
|
||||
lib/idn*,\
|
||||
lib/socketpair*,\
|
||||
lib/thrdpool.*,\
|
||||
lib/thrdqueue.*,\
|
||||
tests/http/*resolve.py,\
|
||||
tests/server/dnsd.c,\
|
||||
tests/server/resolve.c\
|
||||
}"
|
||||
|
||||
POP3:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/examples/pop3*,\
|
||||
lib/pop3.*\
|
||||
}"
|
||||
|
||||
RTSP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/libcurl/opts/CURLINFO_RTSP*,\
|
||||
docs/libcurl/opts/CURLOPT_RTSP*,\
|
||||
lib/rtsp.*,\
|
||||
tests/rtspserver.pl,\
|
||||
tests/server/rtspd.c\
|
||||
}"
|
||||
|
||||
SCP/SFTP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindLibssh.cmake,\
|
||||
CMake/FindLibssh2.cmake,\
|
||||
docs/cmdline-opts/knownhosts.md,\
|
||||
docs/libcurl/opts/CURLOPT_SSH*,\
|
||||
docs/examples/sftp*,\
|
||||
lib/vssh/**,\
|
||||
tests/sshhelp.pm,\
|
||||
tests/sshserver.pl,\
|
||||
tests/http/*scp*,\
|
||||
tests/http/*sftp*,\
|
||||
tests/http/testenv/sshd.py\
|
||||
}"
|
||||
|
||||
script:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
**/*.pl,\
|
||||
**/*.sh,\
|
||||
curl-config.in,\
|
||||
docs/curl-config.md,\
|
||||
docs/mk-ca-bundle.md,\
|
||||
docs/wcurl.md,\
|
||||
docs/THANKS-filter,\
|
||||
scripts/**\
|
||||
}"
|
||||
|
||||
SMB:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/smb.*,\
|
||||
tests/smbserver.py\
|
||||
}"
|
||||
|
||||
SMTP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/cmdline-opts/mail*,\
|
||||
docs/examples/smtp-*,\
|
||||
docs/libcurl/opts/CURLOPT_MAIL*,\
|
||||
lib/smtp.*\
|
||||
}"
|
||||
|
||||
tests:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'tests/**'
|
||||
|
||||
TFTP:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
lib/tftp.*,\
|
||||
tests/tftpserver.pl,\
|
||||
tests/server/tftp*\
|
||||
}"
|
||||
|
||||
TLS:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
CMake/FindGnuTLS.cmake,\
|
||||
CMake/FindMbedTLS.cmake,\
|
||||
CMake/FindWolfSSL.cmake,\
|
||||
CMake/FindRustls.cmake,\
|
||||
docs/CIPHERS-TLS12.md,\
|
||||
docs/SSL*,\
|
||||
docs/cmdline-opts/dump-ca-embed.md,\
|
||||
docs/cmdline-opts/*cert*,\
|
||||
docs/cmdline-opts/*ssl*,\
|
||||
docs/cmdline-opts/*tls*,\
|
||||
docs/examples/ssl*,\
|
||||
docs/examples/*ssl.*,\
|
||||
docs/examples/*tls.*,\
|
||||
docs/internals/TLS-SESSIONS.md,\
|
||||
docs/libcurl/curl_global_sslset*,\
|
||||
docs/libcurl/curl_easy_ssls*,\
|
||||
docs/libcurl/opts/CURLINFO_CA*,\
|
||||
docs/libcurl/opts/CURLINFO_CERT*,\
|
||||
docs/libcurl/opts/CURLINFO_EARLYDATA*,\
|
||||
docs/libcurl/opts/CURLINFO_SSL*,\
|
||||
docs/libcurl/opts/CURLINFO_TLS*,\
|
||||
docs/libcurl/opts/CURLOPT_CA*,\
|
||||
docs/libcurl/opts/CURLOPT_CERT*,\
|
||||
docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY*,\
|
||||
docs/libcurl/opts/CURLOPT_SSL*,\
|
||||
docs/libcurl/opts/CURLOPT_TLS*,\
|
||||
docs/libcurl/opts/CURLOPT_USE_SSL*,\
|
||||
lib/vtls/**,\
|
||||
m4/curl-gnutls.m4,\
|
||||
m4/curl-mbedtls.m4,\
|
||||
m4/curl-openssl.m4,\
|
||||
m4/curl-rustls.m4,\
|
||||
m4/curl-schannel.m4,\
|
||||
m4/curl-wolfssl.m4,\
|
||||
src/tool_ssls.*\
|
||||
}"
|
||||
|
||||
URL:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/libcurl/curl_url*,\
|
||||
docs/URL-SYNTAX.md,\
|
||||
docs/examples/parseurl*,\
|
||||
include/curl/urlapi.h,\
|
||||
lib/urlapi*\
|
||||
}"
|
||||
|
||||
WebSocket:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
docs/internals/WEBSOCKET.md,\
|
||||
docs/examples/websocket*,\
|
||||
docs/libcurl/curl_ws_*,\
|
||||
docs/libcurl/libcurl-ws*,\
|
||||
docs/libcurl/opts/CURLOPT_WS_*,\
|
||||
include/curl/websockets.h,\
|
||||
lib/ws.*,\
|
||||
tests/http/test_20_websockets.py,\
|
||||
tests/http/testenv/ws*,\
|
||||
tests/libtest/cli_ws*\
|
||||
}"
|
||||
|
||||
Windows:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{\
|
||||
.github/workflows/windows.yml,\
|
||||
appveyor.*,\
|
||||
CMake/win32-cache.cmake,\
|
||||
lib/*win32*,\
|
||||
lib/curlx/fopen.*,\
|
||||
lib/curlx/multibyte.*,\
|
||||
lib/curlx/winapi.*,\
|
||||
lib/vtls/schannel*,\
|
||||
m4/curl-schannel.m4,\
|
||||
projects/Windows/**,\
|
||||
src/tool_doswin.c,\
|
||||
lib/libcurl.def\
|
||||
}"
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# Configuration for lock-threads - https://github.com/dessant/lock-threads
|
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 90
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: false
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Input: cmdline docs markdown files, they get modified *in place*
|
||||
#
|
||||
# Strip off the leading meta-data/header part, remove all known curl symbols
|
||||
# and long command line options. Also clean up whatever else the spell checker
|
||||
# might have a problem with that we still deem is fine.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @asyms;
|
||||
|
||||
open(S, "<./docs/libcurl/symbols-in-versions")
|
||||
|| die "cannot find symbols-in-versions";
|
||||
while(<S>) {
|
||||
if(/^([^ ]*) /) {
|
||||
push @asyms, $1;
|
||||
}
|
||||
}
|
||||
close(S);
|
||||
|
||||
# init the opts table with "special" options not easy to figure out
|
||||
my @aopts = (
|
||||
'--ftp-ssl-reqd', # old alias
|
||||
);
|
||||
|
||||
open(O, "<./docs/options-in-versions")
|
||||
|| die "cannot find options-in-versions";
|
||||
while(<O>) {
|
||||
chomp;
|
||||
if(/^([^ ]+)/) {
|
||||
my $o = $1;
|
||||
push @aopts, $o;
|
||||
if($o =~ /^--no-(.*)/) {
|
||||
# for the --no options, also make one without it
|
||||
push @aopts, "--$1";
|
||||
}
|
||||
elsif($o =~ /^--disable-(.*)/) {
|
||||
# for the --disable options, also make the special ones
|
||||
push @aopts, "--$1";
|
||||
push @aopts, "--no-$1";
|
||||
}
|
||||
}
|
||||
}
|
||||
close(O);
|
||||
|
||||
open(C, "<./.github/scripts/spellcheck.curl")
|
||||
|| die "cannot find spellcheck.curl";
|
||||
while(<C>) {
|
||||
if(/^\#/) {
|
||||
next;
|
||||
}
|
||||
chomp;
|
||||
if(/^([^ ]+)/) {
|
||||
push @asyms, $1;
|
||||
}
|
||||
}
|
||||
close(C);
|
||||
|
||||
# longest symbols first
|
||||
my @syms = sort { length($b) <=> length($a) } @asyms;
|
||||
|
||||
# longest cmdline options first
|
||||
my @opts = sort { length($b) <=> length($a) } @aopts;
|
||||
|
||||
sub process {
|
||||
my ($f) = @_;
|
||||
|
||||
my $ignore = 0;
|
||||
my $sepcount = 0;
|
||||
my $out;
|
||||
my $line = 0;
|
||||
open(F, "<$f") or die;
|
||||
|
||||
while(<F>) {
|
||||
$line++;
|
||||
if(/^---/ && ($line == 1)) {
|
||||
$ignore = 1;
|
||||
next;
|
||||
}
|
||||
elsif(/^---/ && $ignore) {
|
||||
$ignore = 0;
|
||||
next;
|
||||
}
|
||||
next if($ignore);
|
||||
|
||||
my $l = $_;
|
||||
|
||||
# strip out backticked words
|
||||
$l =~ s/`[^`]+`//g;
|
||||
|
||||
# **bold**
|
||||
$l =~ s/\*\*(\S.*?)\*\*//g;
|
||||
# *italics*
|
||||
$l =~ s/\*(\S.*?)\*//g;
|
||||
|
||||
# strip out https URLs, we do not want them spellchecked
|
||||
$l =~ s!https://[a-z0-9\#_/.-]+!!gi;
|
||||
|
||||
# strip links, both name and target
|
||||
$l =~ s/(\[.*?\])\(.*?\)//g;
|
||||
$out .= $l;
|
||||
}
|
||||
close(F);
|
||||
|
||||
# cut out all known curl cmdline options
|
||||
map { $out =~ s/$_//g; } (@opts);
|
||||
|
||||
# cut out all known curl symbols
|
||||
map { $out =~ s/\b$_\b//g; } (@syms);
|
||||
|
||||
if(!$ignore) {
|
||||
open(O, ">$f") or die;
|
||||
print O $out;
|
||||
close(O);
|
||||
}
|
||||
}
|
||||
|
||||
my @filemasks = @ARGV;
|
||||
open(my $git_ls_files, '-|', 'git', 'ls-files', '--', @filemasks) or die "Failed running git ls-files: $!";
|
||||
while(my $f = <$git_ls_files>) {
|
||||
chomp $f;
|
||||
process($f);
|
||||
}
|
||||
close $git_ls_files;
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
#!/usr/bin/env perl
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# 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
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $autotools = $ARGV[0];
|
||||
my $cmake = $ARGV[1];
|
||||
|
||||
if(!$cmake) {
|
||||
print "Usage: cmp-config <config1> <config2.h>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
# this lists complete lines that will be removed from the output if
|
||||
# matching
|
||||
my %remove = (
|
||||
'#define CURL_EXTERN_SYMBOL' => 1,
|
||||
'#define CURL_OS "Linux"' => 1,
|
||||
'#define CURL_OS "x86_64-pc-linux-gnu"' => 1,
|
||||
'#define GETHOSTNAME_TYPE_ARG2 int' => 1,
|
||||
'#define GETHOSTNAME_TYPE_ARG2 size_t' => 1,
|
||||
'#define HAVE_BROTLI 1' => 1,
|
||||
'#define HAVE_BROTLI_DECODE_H 1' => 1,
|
||||
'#define HAVE_DLFCN_H 1' => 1,
|
||||
'#define HAVE_GSSAPI_GSSAPI_GENERIC_H 1' => 1,
|
||||
'#define HAVE_GSSAPI_GSSAPI_H 1' => 1,
|
||||
'#define HAVE_GSSAPI_GSSAPI_KRB5_H 1' => 1,
|
||||
'#define HAVE_INTTYPES_H 1' => 1,
|
||||
'#define HAVE_LDAP_H 1' => 1,
|
||||
'#define HAVE_LDAP_SSL 1' => 1,
|
||||
'#define HAVE_LIBBROTLIDEC 1' => 1,
|
||||
'#define HAVE_LIBPSL_H 1' => 1,
|
||||
'#define HAVE_LIBSOCKET 1' => 1,
|
||||
'#define HAVE_LIBSSH' => 1,
|
||||
'#define HAVE_LIBSSH2 1' => 1,
|
||||
'#define HAVE_LIBSSL 1' => 1,
|
||||
'#define HAVE_LIBZSTD 1' => 1,
|
||||
'#define HAVE_NGHTTP2_NGHTTP2_H 1' => 1,
|
||||
'#define HAVE_NGHTTP3_NGHTTP3_H 1' => 1,
|
||||
'#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1' => 1,
|
||||
'#define HAVE_NGTCP2_NGTCP2_H 1' => 1,
|
||||
'#define HAVE_OPENSSL_CRYPTO_H 1' => 1,
|
||||
'#define HAVE_OPENSSL_ERR_H 1' => 1,
|
||||
'#define HAVE_OPENSSL_PEM_H 1' => 1,
|
||||
'#define HAVE_OPENSSL_RSA_H 1' => 1,
|
||||
'#define HAVE_OPENSSL_SSL_H 1' => 1,
|
||||
'#define HAVE_QUICHE_H 1' => 1,
|
||||
'#define HAVE_SSL_SET_QUIC_TLS_CBS 1' => 1,
|
||||
'#define HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT 1' => 1,
|
||||
'#define HAVE_STDINT_H 1' => 1,
|
||||
'#define HAVE_STDIO_H 1' => 1,
|
||||
'#define HAVE_STDLIB_H 1' => 1,
|
||||
'#define HAVE_STRING_H 1' => 1,
|
||||
'#define HAVE_SYS_STAT_H 1' => 1,
|
||||
'#define HAVE_SYS_XATTR_H 1' => 1,
|
||||
'#define HAVE_UNICODE_UIDNA_H 1' => 1,
|
||||
'#define HAVE_WOLFSSL_SET_QUIC_USE_LEGACY_CODEPOINT 1' => 1,
|
||||
'#define HAVE_ZSTD 1' => 1,
|
||||
'#define HAVE_ZSTD_H 1' => 1,
|
||||
'#define LT_OBJDIR ".libs/"' => 1,
|
||||
'#define NEED_LBER_H 1' => 1,
|
||||
'#define PACKAGE "curl"' => 1,
|
||||
'#define PACKAGE_BUGREPORT "a suitable curl mailing list: https://curl.se/mail/"' => 1,
|
||||
'#define PACKAGE_NAME "curl"' => 1,
|
||||
'#define PACKAGE_STRING "curl -"' => 1,
|
||||
'#define PACKAGE_TARNAME "curl"' => 1,
|
||||
'#define PACKAGE_URL ""' => 1,
|
||||
'#define PACKAGE_VERSION "-"' => 1,
|
||||
'#define VERSION "-"' => 1,
|
||||
'#define _FILE_OFFSET_BITS 64' => 1,
|
||||
);
|
||||
|
||||
sub filter {
|
||||
my ($line) = @_;
|
||||
if(!$remove{$line}) {
|
||||
return "$line\n";
|
||||
}
|
||||
$remove{$line}++;
|
||||
return "";
|
||||
}
|
||||
|
||||
sub grepit {
|
||||
my ($input, $output) = @_;
|
||||
my @defines;
|
||||
# first get all the #define lines
|
||||
open(F, "<$input");
|
||||
while(<F>) {
|
||||
if($_ =~ /^#def/) {
|
||||
chomp;
|
||||
push @defines, $_;
|
||||
}
|
||||
}
|
||||
close(F);
|
||||
|
||||
open(O, ">$output");
|
||||
|
||||
# output the sorted list through the filter
|
||||
foreach my $d(sort @defines) {
|
||||
print O filter($d);
|
||||
}
|
||||
close(O);
|
||||
}
|
||||
|
||||
grepit($autotools, "/tmp/autotools");
|
||||
grepit($cmake, "/tmp/cmake");
|
||||
|
||||
foreach my $v (keys %remove) {
|
||||
if($remove{$v} == 1) {
|
||||
print "Ignored, never matched line: $v\n";
|
||||
}
|
||||
}
|
||||
|
||||
# return the exit code from diff
|
||||
exit system('diff', ('-u', '/tmp/autotools', '/tmp/cmake')) >> 8;
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# Sort list of libs, libpaths, cflags found in libcurl.pc and curl-config files,
|
||||
# then diff the autotools and cmake generated ones.
|
||||
|
||||
sort_lists() {
|
||||
prevline=''
|
||||
section=''
|
||||
while IFS= read -r l; do
|
||||
if [[ "${prevline}" =~ (--cc|--configure) ]]; then # curl-config
|
||||
echo "<IGNORED>"
|
||||
else
|
||||
# libcurl.pc
|
||||
if [[ "${l}" =~ ^(Requires|Libs|Cflags)(\.private)?:\ (.+)$ ]]; then
|
||||
if [ "${BASH_REMATCH[1]}" = 'Requires' ]; then
|
||||
# Spec does not allow duplicates here:
|
||||
# https://manpages.debian.org/unstable/pkg-config/pkg-config.1.en.html#Requires:
|
||||
# "You may only mention the same package one time on the Requires: line"
|
||||
val="$(printf '%s' "${BASH_REMATCH[3]}" | tr ',' '\n' | sort | tr '\n' ' ')"
|
||||
else
|
||||
val="$(printf '%s' "${BASH_REMATCH[3]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')"
|
||||
fi
|
||||
l="${BASH_REMATCH[1]}${BASH_REMATCH[2]}: ${val}"
|
||||
# curl-config
|
||||
elif [[ "${section}" =~ (--libs|--static-libs) && "${l}" =~ ^( *echo\ \")(.+)(\")$ ]]; then
|
||||
val="$(printf '%s' "${BASH_REMATCH[2]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')"
|
||||
l="${BASH_REMATCH[1]}${val}${BASH_REMATCH[3]}"
|
||||
section=''
|
||||
fi
|
||||
echo "${l}"
|
||||
fi
|
||||
# curl-config
|
||||
prevline="${l}"
|
||||
if [[ "${l}" =~ --[a-z-]+\) ]]; then
|
||||
section="${BASH_REMATCH[0]}"
|
||||
fi
|
||||
done < "$1"
|
||||
}
|
||||
|
||||
am=$(mktemp -t autotools.XXX); sort_lists "$1" > "${am}"
|
||||
cm=$(mktemp -t cmake.XXX) ; sort_lists "$2" > "${cm}"
|
||||
diff -u "${am}" "${cm}"
|
||||
res="$?"
|
||||
rm -r -f "${am}" "${cm}"
|
||||
|
||||
exit "${res}"
|
||||
@@ -0,0 +1,21 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
anonymou
|
||||
aNULL
|
||||
bu
|
||||
clen
|
||||
CNA
|
||||
hel
|
||||
htpts
|
||||
inout
|
||||
PASE
|
||||
passwor
|
||||
perfec
|
||||
proxys
|
||||
seh
|
||||
ser
|
||||
strat
|
||||
te
|
||||
UE
|
||||
WONT
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "${0}")"/../..
|
||||
|
||||
git ls-files -z | xargs -0 -r \
|
||||
codespell \
|
||||
--skip '.github/scripts/pyspelling.words' \
|
||||
--skip '.github/scripts/typos.toml' \
|
||||
--skip 'docs/THANKS' \
|
||||
--skip 'projects/OS400/*' \
|
||||
--skip 'projects/vms/*' \
|
||||
--skip 'RELEASE-NOTES' \
|
||||
--skip 'scripts/wcurl' \
|
||||
--skip 'tests/unit/unit1625.c' \
|
||||
--ignore-regex '.*spellchecker:disable-line' \
|
||||
--ignore-words '.github/scripts/codespell-ignore.words' \
|
||||
--
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# Compare git repo files with tarball files and report a mismatch
|
||||
# after excluding exceptions.
|
||||
|
||||
set -eu
|
||||
|
||||
gitonly=".git*
|
||||
^.*
|
||||
^appveyor.*
|
||||
^GIT-INFO.md
|
||||
^README.md
|
||||
^renovate.json
|
||||
^REUSE.toml
|
||||
^SECURITY.md
|
||||
^LICENSES/*
|
||||
^docs/examples/adddocsref.pl
|
||||
^docs/tests/CI.md
|
||||
^docs/THANKS-filter
|
||||
^projects/Windows/*
|
||||
^scripts/contributors.sh
|
||||
^scripts/contrithanks.sh
|
||||
^scripts/delta
|
||||
^scripts/installcheck.sh
|
||||
^scripts/release-notes.pl
|
||||
^scripts/singleuse.pl"
|
||||
|
||||
tarfiles="$(mktemp)"
|
||||
gitfiles="$(mktemp)"
|
||||
|
||||
tar -tf "$1" \
|
||||
| sed -E 's|^[^/]+/||g' \
|
||||
| grep -v -E '(/|^)$' \
|
||||
| sort > "${tarfiles}"
|
||||
|
||||
git -C "${2:-.}" ls-files \
|
||||
| grep -v -E "($(printf '%s' "${gitonly}" | tr $'\n' '|' | sed -e 's|\.|\\.|g' -e 's|\*|.+|g'))$" \
|
||||
| sort > "${gitfiles}"
|
||||
|
||||
dif="$(diff -u "${tarfiles}" "${gitfiles}" | tail -n +3 || true)"
|
||||
|
||||
rm -rf "${tarfiles:?}" "${gitfiles:?}"
|
||||
|
||||
echo 'Only in tarball:'
|
||||
echo "${dif}" | grep '^-' || true
|
||||
echo
|
||||
|
||||
echo 'Missing from tarball:'
|
||||
if echo "${dif}" | grep '^+'; then
|
||||
exit 1
|
||||
fi
|
||||
+1018
File diff suppressed because it is too large
Load Diff
+33
@@ -0,0 +1,33 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Docs: https://facelessuser.github.io/pyspelling/configuration/
|
||||
# Docs: https://github.com/UnicornGlobal/spellcheck-github-actions
|
||||
matrix:
|
||||
- name: Markdown
|
||||
expect_match: false
|
||||
apsell:
|
||||
mode: en
|
||||
dictionary:
|
||||
wordlists:
|
||||
- wordlist.txt
|
||||
output: wordlist.dic
|
||||
encoding: utf-8
|
||||
pipeline:
|
||||
- pyspelling.filters.markdown:
|
||||
markdown_extensions:
|
||||
- markdown.extensions.extra:
|
||||
- pyspelling.filters.html:
|
||||
comments: true
|
||||
attributes:
|
||||
- title
|
||||
- alt
|
||||
ignores:
|
||||
- ':matches(code, pre)'
|
||||
- 'code'
|
||||
- 'pre'
|
||||
- 'strong'
|
||||
- 'em'
|
||||
sources:
|
||||
- '**/*.md|!docs/BINDINGS.md|!docs/DISTROS.md|!docs/CIPHERS-TLS12.md|!docs/wcurl.md|!tests/data/data*.md'
|
||||
+251
@@ -0,0 +1,251 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Input: number of seconds to run.
|
||||
#
|
||||
# 1. Figure out all existing command line options
|
||||
# 2. Generate random command line using supported options
|
||||
# 3. Run the command line
|
||||
# 4. Verify that it does not return an unexpected return code
|
||||
# 5. Iterate until the time runs out
|
||||
#
|
||||
# Do the same with regular command lines as well as reading the options from a
|
||||
# -K config file
|
||||
#
|
||||
# BEWARE: this may create a large amount of files using random names in the
|
||||
# directory where it runs.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $curl = "../src/curl";
|
||||
my $url = "localhost:7777"; # not listening to this
|
||||
|
||||
my $seconds = $ARGV[0];
|
||||
if($ARGV[1]) {
|
||||
$curl = $ARGV[1];
|
||||
}
|
||||
|
||||
if(!$seconds) {
|
||||
$seconds = 10;
|
||||
}
|
||||
print "Run $curl for $seconds seconds\n";
|
||||
|
||||
my @opt;
|
||||
my %arg;
|
||||
my %uniq;
|
||||
my %allrc;
|
||||
|
||||
my $totalargs = 0;
|
||||
my $totalcmds = 0;
|
||||
|
||||
my $counter = 0xabcdef + time();
|
||||
sub getnum {
|
||||
my ($max) = @_;
|
||||
return int(rand($max));
|
||||
}
|
||||
|
||||
sub storedata {
|
||||
my ($short, $long, $arg) = @_;
|
||||
push @opt, "-$short" if($short);
|
||||
push @opt, "--$long";
|
||||
|
||||
if($arg =~ /^</) {
|
||||
# these take an argument
|
||||
$arg{"-$short"} = $arg if($short);
|
||||
$arg{"--$long"} = $arg;
|
||||
}
|
||||
}
|
||||
|
||||
sub getoptions {
|
||||
my @all = `$curl --help all`;
|
||||
for my $o (@all) {
|
||||
chomp $o;
|
||||
if($o =~ /^ -(.), --([^ ]*) (.*)/) {
|
||||
storedata($1, $2, $3);
|
||||
}
|
||||
elsif($o =~ /^ --([^ ]*) (.*)/) {
|
||||
storedata("", $1, $2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# this adds a fake randomly generated command line option
|
||||
sub addarg {
|
||||
my $nice = "abcdefhijklmnopqrstuvwqxyz".
|
||||
"ABCDEFHIJKLMNOPQRSTUVWQXYZ".
|
||||
"0123456789-";
|
||||
my $len = getnum(20) + 2;
|
||||
my $o;
|
||||
for (1 .. $len) {
|
||||
$o .= substr($nice, getnum(length($nice)), 1);
|
||||
}
|
||||
return "--$o";
|
||||
}
|
||||
|
||||
sub randarg {
|
||||
my $nice = "abcdefhijklmnopqrstuvwqxyz".
|
||||
"ABCDEFHIJKLMNOPQRSTUVWQXYZ".
|
||||
"0123456789".
|
||||
",-?#$%!@ ";
|
||||
my $len = getnum(20);
|
||||
my $o = '';
|
||||
for (1 .. $len) {
|
||||
$o .= substr($nice, getnum(length($nice)), 1);
|
||||
}
|
||||
return "\'$o\'";
|
||||
}
|
||||
|
||||
getoptions();
|
||||
|
||||
my $nopts = scalar(@opt);
|
||||
|
||||
my %useropt = (
|
||||
'-U' => 1,
|
||||
'-u' => 1,
|
||||
'--user' => 1,
|
||||
'--proxy-user' => 1);
|
||||
|
||||
my %commonrc = (
|
||||
'0' => 1,
|
||||
'1' => 1,
|
||||
'2' => 1,
|
||||
'26' => 1,
|
||||
);
|
||||
|
||||
sub runone {
|
||||
my $a;
|
||||
my $nargs = getnum(60) + 1;
|
||||
|
||||
$totalargs += $nargs;
|
||||
$totalcmds++;
|
||||
for (1 .. $nargs) {
|
||||
my $o = getnum($nopts);
|
||||
my $option = $opt[$o];
|
||||
my $ar = "";
|
||||
$uniq{$option}++;
|
||||
if($arg{$option}) {
|
||||
$ar = " ".randarg();
|
||||
|
||||
if($useropt{$option}) {
|
||||
# append password to avoid prompting
|
||||
$ar .= ":".randarg();
|
||||
}
|
||||
}
|
||||
$a .= sprintf(" %s%s", $option, $ar);
|
||||
}
|
||||
if(getnum(100) < 15) {
|
||||
# add a fake arg
|
||||
$a .= " ".addarg();
|
||||
}
|
||||
|
||||
my $cmd="$curl$a $url";
|
||||
|
||||
my $rc = system("$cmd >curl-output 2>&1 </dev/null -M 0.1") >> 8;
|
||||
#my $rc = system("valgrind -q $cmd >/dev/null 2>&1 </dev/null -M 0.1") >> 8;
|
||||
|
||||
$allrc{$rc}++;
|
||||
|
||||
#print "CMD: $cmd\n";
|
||||
if(!$commonrc{$rc}) {
|
||||
print "CMD: $cmd\n";
|
||||
print "RC: $rc\n";
|
||||
print "== curl-output == \n";
|
||||
open(D, "<curl-output");
|
||||
my @out = <D>;
|
||||
print @out;
|
||||
close(D);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
sub runconfig {
|
||||
my $a;
|
||||
my $nargs = getnum(80) + 1;
|
||||
|
||||
open(C, ">config");
|
||||
|
||||
$totalargs += $nargs;
|
||||
$totalcmds++;
|
||||
for (1 .. $nargs) {
|
||||
my $o = getnum($nopts);
|
||||
my $option = $opt[$o];
|
||||
my $ar = "";
|
||||
$uniq{$option} = 0 if(!exists $uniq{$option});
|
||||
$uniq{$option}++;
|
||||
if($arg{$option}) {
|
||||
$ar = " ".randarg();
|
||||
|
||||
if($useropt{$option}) {
|
||||
# append password
|
||||
$ar .= ":".randarg();
|
||||
}
|
||||
}
|
||||
$a .= sprintf("\n%s%s", $option, $ar);
|
||||
}
|
||||
if(getnum(100) < 15) {
|
||||
# add a fake arg
|
||||
$a .= "\n".addarg();
|
||||
}
|
||||
|
||||
print C "$a\n";
|
||||
close(C);
|
||||
|
||||
my $cmd="$curl -K config $url";
|
||||
|
||||
my $rc = system("$cmd >curl-output 2>&1 </dev/null -M 0.1") >> 8;
|
||||
|
||||
$allrc{$rc}++;
|
||||
|
||||
if(!$commonrc{$rc}) {
|
||||
print "CMD: $cmd\n";
|
||||
print "RC: $rc\n";
|
||||
print "== config == \n";
|
||||
open(D, "<config");
|
||||
my @all = <D>;
|
||||
print @all;
|
||||
close(D);
|
||||
print "\n== curl-output == \n";
|
||||
open(D, "<curl-output");
|
||||
my @out = <D>;
|
||||
print @out;
|
||||
close(D);
|
||||
exit 2;
|
||||
}
|
||||
}
|
||||
|
||||
# run curl command lines using -K
|
||||
my $end = time() + $seconds/2;
|
||||
my $c = 0;
|
||||
print "Running command lines\n";
|
||||
do {
|
||||
runconfig();
|
||||
$c++;
|
||||
} while(time() <= $end);
|
||||
print "$c command lines\n";
|
||||
|
||||
# run curl command lines
|
||||
$end = time() + $seconds/2;
|
||||
$c = 0;
|
||||
print "Running config lines\n";
|
||||
do {
|
||||
runone();
|
||||
$c++;
|
||||
} while(time() <= $end);
|
||||
|
||||
print "$c config line uses\n";
|
||||
|
||||
print "Recorded exit codes:\n";
|
||||
for my $rc (keys %allrc) {
|
||||
printf " %2d: %d times\n", $rc, $allrc{$rc};
|
||||
}
|
||||
printf "Number or command lines tested:\n".
|
||||
" $totalcmds (%.1f/second)\n", $totalcmds/$seconds;
|
||||
printf "Number or command line options tested:\n".
|
||||
" $totalargs (average %.1f per command line)\n",
|
||||
$totalargs/$totalcmds;
|
||||
printf "Number or different options tested:\n".
|
||||
" %u out of %u\n", scalar(keys %uniq), $nopts;
|
||||
@@ -0,0 +1,5 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
pyspelling==2.12.1
|
||||
@@ -0,0 +1,5 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
proselint==0.16.0
|
||||
@@ -0,0 +1,9 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
cmakelang==0.6.13
|
||||
codespell==2.4.2
|
||||
pytype==2024.10.11
|
||||
reuse==6.2.0
|
||||
ruff==0.15.10
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# Required: yq
|
||||
|
||||
set -eu
|
||||
|
||||
export SHELLCHECK_OPTS='--exclude=1090,1091,2086,2153 --enable=avoid-nullary-conditions,deprecate-which'
|
||||
|
||||
# GHA
|
||||
git ls-files '.github/workflows/*.yml' | while read -r f; do
|
||||
echo "Verifying ${f}..."
|
||||
{
|
||||
echo '#!/usr/bin/env bash'
|
||||
echo 'set -eu'
|
||||
yq eval '.. | select(has("run") and (.run | type == "!!str")) | .run + "\ntrue\n"' "${f}"
|
||||
} | sed -E 's|\$\{\{ .+ \}\}|GHA_EXPRESSION|g' | shellcheck -
|
||||
done
|
||||
|
||||
# Circle CI
|
||||
git ls-files '.circleci/*.yml' | while read -r f; do
|
||||
echo "Verifying ${f}..."
|
||||
{
|
||||
echo '#!/usr/bin/env bash'
|
||||
echo 'set -eu'
|
||||
yq eval '.. | select(has("command") and (.command | type == "!!str")) | .command + "\ntrue\n"' "${f}"
|
||||
} | shellcheck -
|
||||
done
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "${0}")"/../..
|
||||
|
||||
git grep -z -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' | xargs -0 -r \
|
||||
shellcheck --exclude=1091,2248 \
|
||||
--enable=avoid-nullary-conditions,deprecate-which \
|
||||
--
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# common variable types + structs
|
||||
# callback typedefs
|
||||
# public functions names
|
||||
# some man page names
|
||||
curl_fileinfo
|
||||
curl_forms
|
||||
curl_hstsentry
|
||||
curl_httppost
|
||||
curl_index
|
||||
curl_khkey
|
||||
curl_pushheaders
|
||||
curl_waitfd
|
||||
CURLcode
|
||||
CURLformoption
|
||||
CURLHcode
|
||||
CURLMcode
|
||||
CURLMsg
|
||||
CURLSHcode
|
||||
CURLUcode
|
||||
curl_calloc_callback
|
||||
curl_chunk_bgn_callback
|
||||
curl_chunk_end_callback
|
||||
curl_conv_callback
|
||||
curl_debug_callback
|
||||
curl_fnmatch_callback
|
||||
curl_formget_callback
|
||||
curl_free_callback
|
||||
curl_hstsread_callback
|
||||
curl_hstswrite_callback
|
||||
curl_ioctl_callback
|
||||
curl_malloc_callback
|
||||
curl_multi_timer_callback
|
||||
curl_opensocket_callback
|
||||
curl_prereq_callback
|
||||
curl_progress_callback
|
||||
curl_push_callback
|
||||
curl_read_callback
|
||||
curl_realloc_callback
|
||||
curl_resolver_start_callback
|
||||
curl_seek_callback
|
||||
curl_socket_callback
|
||||
curl_sockopt_callback
|
||||
curl_ssl_ctx_callback
|
||||
curl_strdup_callback
|
||||
curl_trailer_callback
|
||||
curl_write_callback
|
||||
curl_xferinfo_callback
|
||||
curl_strequal
|
||||
curl_strnequal
|
||||
curl_mime_init
|
||||
curl_mime_free
|
||||
curl_mime_addpart
|
||||
curl_mime_name
|
||||
curl_mime_filename
|
||||
curl_mime_type
|
||||
curl_mime_encoder
|
||||
curl_mime_data
|
||||
curl_mime_filedata
|
||||
curl_mime_data_cb
|
||||
curl_mime_subparts
|
||||
curl_mime_headers
|
||||
curl_formadd
|
||||
curl_formget
|
||||
curl_formfree
|
||||
curl_getdate
|
||||
curl_getenv
|
||||
curl_version
|
||||
curl_easy_escape
|
||||
curl_escape
|
||||
curl_easy_unescape
|
||||
curl_unescape
|
||||
curl_free
|
||||
curl_global_init
|
||||
curl_global_init_mem
|
||||
curl_global_cleanup
|
||||
curl_global_trace
|
||||
curl_global_sslset
|
||||
curl_slist_append
|
||||
curl_slist_free_all
|
||||
curl_getdate
|
||||
curl_share_init
|
||||
curl_share_setopt
|
||||
curl_share_cleanup
|
||||
curl_version_info
|
||||
curl_easy_strerror
|
||||
curl_share_strerror
|
||||
curl_easy_pause
|
||||
curl_easy_ssls_import
|
||||
curl_easy_ssls_export
|
||||
curl_easy_init
|
||||
curl_easy_setopt
|
||||
curl_easy_perform
|
||||
curl_easy_cleanup
|
||||
curl_easy_getinfo
|
||||
curl_easy_duphandle
|
||||
curl_easy_reset
|
||||
curl_easy_recv
|
||||
curl_easy_send
|
||||
curl_easy_upkeep
|
||||
curl_easy_header
|
||||
curl_easy_nextheader
|
||||
curl_mprintf
|
||||
curl_mfprintf
|
||||
curl_msprintf
|
||||
curl_msnprintf
|
||||
curl_mvprintf
|
||||
curl_mvfprintf
|
||||
curl_mvsprintf
|
||||
curl_mvsnprintf
|
||||
curl_maprintf
|
||||
curl_mvaprintf
|
||||
curl_multi_init
|
||||
curl_multi_add_handle
|
||||
curl_multi_remove_handle
|
||||
curl_multi_fdset
|
||||
curl_multi_waitfds
|
||||
curl_multi_wait
|
||||
curl_multi_poll
|
||||
curl_multi_wakeup
|
||||
curl_multi_perform
|
||||
curl_multi_cleanup
|
||||
curl_multi_info_read
|
||||
curl_multi_strerror
|
||||
curl_multi_socket
|
||||
curl_multi_socket_action
|
||||
curl_multi_socket_all
|
||||
curl_multi_timeout
|
||||
curl_multi_setopt
|
||||
curl_multi_assign
|
||||
curl_multi_get_handles
|
||||
curl_multi_get_offt
|
||||
curl_multi_notify_disable
|
||||
curl_multi_notify_enable
|
||||
curl_pushheader_bynum
|
||||
curl_pushheader_byname
|
||||
curl_easy_option_by_name
|
||||
curl_easy_option_by_id
|
||||
curl_easy_option_next
|
||||
curl_url
|
||||
curl_url_cleanup
|
||||
curl_url_dup
|
||||
curl_url_get
|
||||
curl_url_set
|
||||
curl_url_strerror
|
||||
curl_ws_recv
|
||||
curl_ws_send
|
||||
curl_ws_meta
|
||||
libcurl-env
|
||||
libcurl-ws
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Given: a libcurl curldown man page
|
||||
# Outputs: the same file, minus the header
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $f = $ARGV[0] || '';
|
||||
|
||||
open(F, "<$f") or die;
|
||||
|
||||
my @out;
|
||||
my $line = 0;
|
||||
my $hideheader = 0;
|
||||
|
||||
while(<F>) {
|
||||
if($hideheader) {
|
||||
if(/^---/) {
|
||||
# end if hiding
|
||||
$hideheader = 0;
|
||||
}
|
||||
push @out, "\n"; # replace with blank
|
||||
next;
|
||||
}
|
||||
elsif(!$line++ && /^---/) {
|
||||
# starts with a header, strip off the header
|
||||
$hideheader = 1;
|
||||
push @out, "\n"; # replace with blank
|
||||
next;
|
||||
}
|
||||
push @out, $_;
|
||||
}
|
||||
close(F);
|
||||
|
||||
open(O, ">$f") or die;
|
||||
for my $l (@out) {
|
||||
print O $l;
|
||||
}
|
||||
close(O);
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "${0}")"/../..
|
||||
|
||||
git ls-files | typos \
|
||||
--isolated \
|
||||
--force-exclude \
|
||||
--config '.github/scripts/typos.toml' \
|
||||
--file-list -
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
[default]
|
||||
extend-ignore-identifiers-re = [
|
||||
"^(ba|fo|pn|PN|UE)$",
|
||||
"^(CNA|cpy|ser)$",
|
||||
"^(ECT0|ECT1|HELO|htpts|PASE)$",
|
||||
"^[A-Za-z0-9_-]*(EDE|GOST)[A-Z0-9_-]*$", # ciphers
|
||||
"^0x[0-9a-fA-F]+FUL$", # unsigned long hex literals ending with 'F'
|
||||
"^[0-9a-zA-Z+]{64,}$", # possibly base64
|
||||
"^(eyeballers|HELO_smtp|Januar|optin|passin|perfec|SMTP_HELO)$",
|
||||
"^(clen|req_clen|smtp_perform_helo|smtp_state_helo_resp|Tru64|_stati64)$",
|
||||
"(_ccontains|_controllen|O_WRONLY|secur32)",
|
||||
"proxys", # this should be limited to tests/http/*. Short for secure proxy.
|
||||
]
|
||||
|
||||
extend-ignore-re = [
|
||||
".*spellchecker:disable-line",
|
||||
]
|
||||
|
||||
[files]
|
||||
extend-exclude = [
|
||||
".github/scripts/codespell-ignore.words",
|
||||
".github/scripts/pyspelling.words",
|
||||
"docs/THANKS",
|
||||
"projects/OS400/*",
|
||||
"projects/vms/*",
|
||||
"projects/Windows/tmpl/curl.vcxproj",
|
||||
"projects/Windows/tmpl/libcurl.vcxproj",
|
||||
"RELEASE-NOTES",
|
||||
"scripts/wcurl",
|
||||
"tests/data/test*",
|
||||
"tests/unit/unit1625.c",
|
||||
]
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/env perl
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# 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
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @files = @ARGV;
|
||||
my $cfile = "test.c";
|
||||
my $check = "./scripts/checksrc.pl";
|
||||
my $error = 0;
|
||||
|
||||
if(!@files || $files[0] eq "-h") {
|
||||
print "Usage: verify-examples [markdown pages]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub testcompile {
|
||||
my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror ' .
|
||||
'-Wno-unused-parameter -Wno-unused-but-set-variable ' .
|
||||
'-DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_DEPRECATION') >> 8;
|
||||
return $rc;
|
||||
}
|
||||
|
||||
sub checksrc {
|
||||
my $rc = system($check, ('test.c')) >> 8;
|
||||
return $rc;
|
||||
}
|
||||
|
||||
sub extract {
|
||||
my($f) = @_;
|
||||
my $syn = 0;
|
||||
my $l = 0;
|
||||
my $iline = 0;
|
||||
my $fail = 0;
|
||||
open(F, "<$f") or die "failed opening input file $f : $!";
|
||||
open(O, ">$cfile") or die "failed opening output file $cfile : $!";
|
||||
print O "#include <curl/curl.h>\n";
|
||||
while(<F>) {
|
||||
$iline++;
|
||||
if(/^# EXAMPLE/) {
|
||||
$syn = 1
|
||||
}
|
||||
elsif($syn == 1) {
|
||||
if(/^~~~/) {
|
||||
$syn++;
|
||||
print O "/* !checksrc! disable BANNEDFUNC all */\n"; # for fopen()
|
||||
print O "/* !checksrc! disable COPYRIGHT all */\n";
|
||||
print O "/* !checksrc! disable UNUSEDIGNORE all */\n";
|
||||
printf O "#line %d \"$f\"\n", $iline+1;
|
||||
}
|
||||
}
|
||||
elsif($syn == 2) {
|
||||
if(/^~~~/) {
|
||||
last;
|
||||
}
|
||||
# two backslashes become one
|
||||
$_ =~ s/\\\\/\\/g;
|
||||
print O $_;
|
||||
$l++;
|
||||
}
|
||||
}
|
||||
close(F);
|
||||
close(O);
|
||||
|
||||
return ($fail ? 0 : $l);
|
||||
}
|
||||
|
||||
my $count = 0;
|
||||
for my $m (@files) {
|
||||
#print "Verify $m\n";
|
||||
my $out = extract($m);
|
||||
if($out) {
|
||||
$error |= testcompile($m);
|
||||
$error |= checksrc($m);
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
if(!$error) {
|
||||
print "Verified $count man pages ok\n";
|
||||
}
|
||||
else {
|
||||
print "Detected problems\n";
|
||||
}
|
||||
exit $error;
|
||||
@@ -0,0 +1,87 @@
|
||||
#!/usr/bin/env perl
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# 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
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @files = @ARGV;
|
||||
my $cfile = "test.c";
|
||||
|
||||
if(!@files || $files[0] eq "-h") {
|
||||
print "Usage: verify-synopsis [man pages]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub testcompile {
|
||||
my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror ' .
|
||||
'-DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_TYPECHECK') >> 8;
|
||||
return $rc;
|
||||
}
|
||||
|
||||
sub extract {
|
||||
my($f) = @_;
|
||||
my $syn = 0;
|
||||
my $l = 0;
|
||||
my $iline = 0;
|
||||
open(F, "<$f");
|
||||
open(O, ">$cfile");
|
||||
while(<F>) {
|
||||
$iline++;
|
||||
if(/^# SYNOPSIS/) {
|
||||
$syn = 1
|
||||
}
|
||||
elsif($syn == 1) {
|
||||
if(/^\~\~\~/) {
|
||||
$syn++;
|
||||
print O "#line $iline \"$f\"\n";
|
||||
}
|
||||
}
|
||||
elsif($syn == 2) {
|
||||
if(/^\~\~\~/) {
|
||||
last;
|
||||
}
|
||||
# turn the vararg argument into vararg
|
||||
$_ =~ s/, parameter\)\;/, ...);/;
|
||||
print O $_;
|
||||
$l++;
|
||||
}
|
||||
}
|
||||
close(F);
|
||||
close(O);
|
||||
|
||||
if($syn < 2) {
|
||||
print STDERR "Found no synopsis in $f\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $error;
|
||||
for my $m (@files) {
|
||||
$error |= extract($m);
|
||||
$error |= testcompile($m);
|
||||
}
|
||||
exit $error;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "${0}")"/../..
|
||||
|
||||
git ls-files '*.yaml' '*.yml' -z | xargs -0 -r \
|
||||
yamllint \
|
||||
--format standard \
|
||||
--strict \
|
||||
--config-data .github/scripts/yamlcheck.yaml \
|
||||
--
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Docs: https://yamllint.readthedocs.io/en/stable/configuration.html
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 500
|
||||
level: warning
|
||||
|
||||
braces: disable
|
||||
commas: disable
|
||||
comments: disable
|
||||
document-start: disable
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 180
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 14
|
||||
# Issues with these labels are never considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
@@ -0,0 +1,43 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'AppVeyor Status Report'
|
||||
|
||||
'on':
|
||||
status
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
split:
|
||||
name: 'split'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
if: ${{ github.event.sender.login == 'appveyor[bot]' }}
|
||||
permissions:
|
||||
statuses: write # To update build statuses
|
||||
steps:
|
||||
- name: 'Create individual AppVeyor build statuses'
|
||||
if: ${{ github.event.sha && github.event.target_url }}
|
||||
env:
|
||||
APPVEYOR_COMMIT_SHA: ${{ github.event.sha }}
|
||||
APPVEYOR_TARGET_URL: ${{ github.event.target_url }}
|
||||
APPVEYOR_REPOSITORY: ${{ github.event.repository.full_name }}
|
||||
DO_NOT_TRACK: '1' # for gh
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "${APPVEYOR_TARGET_URL}" | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s -- | \
|
||||
jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId),
|
||||
context: (.name | sub("^(Environment: )?"; "AppVeyor / ")),
|
||||
state: (.status | sub("queued"; "pending")
|
||||
| sub("starting"; "pending")
|
||||
| sub("running"; "pending")
|
||||
| sub("failed"; "failure")
|
||||
| sub("cancelled"; "error")),
|
||||
description: .status}' \
|
||||
--arg target_url "${APPVEYOR_TARGET_URL}" | tee /dev/stderr | parallel --pipe -j 1 -N 1 \
|
||||
gh api --silent --input - "repos/${APPVEYOR_REPOSITORY}/statuses/${APPVEYOR_COMMIT_SHA}"
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# This workflow contains tests that operate on documentation files only. Some
|
||||
# checks modify the source so they cannot be combined into a single job.
|
||||
|
||||
name: 'Docs'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths:
|
||||
- '.github/workflows/checkdocs.yml'
|
||||
- '.github/scripts/**'
|
||||
- 'scripts/**'
|
||||
- '**.md'
|
||||
- 'docs/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/checkdocs.yml'
|
||||
- '.github/scripts/**'
|
||||
- 'scripts/**'
|
||||
- '**.md'
|
||||
- 'docs/*'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
# config file help: https://github.com/amperser/proselint/
|
||||
proselint:
|
||||
name: 'proselint'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'install prereqs'
|
||||
run: |
|
||||
python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-proselint.txt
|
||||
|
||||
- name: 'trim headers off all *.md files'
|
||||
run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
|
||||
|
||||
- name: 'check prose'
|
||||
run: |
|
||||
cat <<JSON > ~/.proselintrc.json
|
||||
{
|
||||
"checks": {
|
||||
"annotations.misc": false,
|
||||
"lexical_illusions": false,
|
||||
"misc.annotations": false,
|
||||
"redundancy.misc.garner": false,
|
||||
"security.password": false,
|
||||
"spelling.ve_of": false,
|
||||
"typography.diacritical_marks": false,
|
||||
"typography.symbols": false
|
||||
}
|
||||
}
|
||||
JSON
|
||||
source ~/venv/bin/activate
|
||||
git ls-files README '*.md' -z | grep -Evz '(CHECKSRC|DISTROS|CURLOPT_INTERFACE|interface)\.md' | xargs -0 proselint check --
|
||||
|
||||
- name: 'check special prose' # For CHECKSRC and files with aggressive exclamation mark needs
|
||||
run: |
|
||||
cat <<JSON > ~/.proselintrc.json
|
||||
{
|
||||
"checks": {
|
||||
"annotations.misc": false,
|
||||
"lexical_illusions": false,
|
||||
"typography.diacritical_marks": false,
|
||||
"typography.punctuation.exclamation": false,
|
||||
"typography.symbols": false
|
||||
}
|
||||
}
|
||||
JSON
|
||||
source ~/venv/bin/activate
|
||||
proselint check docs/internals/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
|
||||
|
||||
pyspelling:
|
||||
name: 'pyspelling'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'trim all *.md files in docs/'
|
||||
run: .github/scripts/cleancmd.pl 'docs/*.md'
|
||||
|
||||
- name: 'install'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install aspell aspell-en
|
||||
python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-docs.txt
|
||||
|
||||
- name: 'check spelling'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
# setup the custom wordlist
|
||||
grep -v '^#' .github/scripts/pyspelling.words > wordlist.txt
|
||||
aspell --version
|
||||
pyspelling --version
|
||||
pyspelling --verbose --jobs 5 --config .github/scripts/pyspelling.yaml
|
||||
|
||||
synopsis-man-examples:
|
||||
name: 'synopsis, man-examples'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'verify synopsis'
|
||||
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md
|
||||
|
||||
- name: 'verify examples'
|
||||
run: .github/scripts/verify-examples.pl docs/libcurl/curl*.md docs/libcurl/opts/*.md
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# This workflow contains checks at the source code level only.
|
||||
|
||||
name: 'Source'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
checksrc:
|
||||
name: 'checksrc'
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'check'
|
||||
run: scripts/checksrc-all.pl
|
||||
|
||||
linters:
|
||||
name: 'spellcheck, linters, REUSE'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'install prereqs'
|
||||
run: |
|
||||
python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary \
|
||||
-r .github/scripts/requirements.txt \
|
||||
-r tests/http/requirements.txt \
|
||||
-r tests/requirements.txt
|
||||
|
||||
- name: 'REUSE check'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
reuse lint
|
||||
|
||||
- name: 'codespell'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
codespell --version
|
||||
.github/scripts/codespell.sh
|
||||
|
||||
- name: 'typos'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install typos-cli
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
typos --version
|
||||
.github/scripts/typos.sh
|
||||
|
||||
- name: 'cmakelint'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
scripts/cmakelint.sh
|
||||
|
||||
- name: 'perlcheck'
|
||||
run: |
|
||||
scripts/perlcheck.sh
|
||||
|
||||
- name: 'pytype'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
find . -name '*.py' -exec pytype -j auto -k -- {} +
|
||||
|
||||
- name: 'ruff'
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
scripts/pythonlint.sh
|
||||
|
||||
complexity:
|
||||
name: 'complexity'
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- name: 'install pmccabe'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
ls -l /etc/apt/sources.list.d
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
pmccabe
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'check scores'
|
||||
run: ./scripts/top-complexity
|
||||
|
||||
xmllint:
|
||||
name: 'xmllint'
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libxml2-utils
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'check'
|
||||
run: git grep -z -i -l -E '^<\?xml' | xargs -0 -r xmllint --output /dev/null
|
||||
|
||||
miscchecks:
|
||||
name: 'misc checks'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
timeout-minutes: 2
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install actionlint shellcheck zizmor
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'zizmor GHA'
|
||||
env:
|
||||
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
zizmor --persona pedantic .github/workflows/*.yml .github/dependabot.yml
|
||||
|
||||
- name: 'actionlint'
|
||||
run: |
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
export SHELLCHECK_OPTS='--exclude=1090,1091,2086,2153 --enable=avoid-nullary-conditions,deprecate-which'
|
||||
actionlint --version
|
||||
actionlint --ignore matrix .github/workflows/*.yml
|
||||
|
||||
- name: 'shellcheck CI'
|
||||
run: |
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
shellcheck --version
|
||||
.github/scripts/shellcheck-ci.sh
|
||||
|
||||
- name: 'shellcheck'
|
||||
run: |
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
shellcheck --version
|
||||
.github/scripts/shellcheck.sh
|
||||
|
||||
- name: 'spacecheck'
|
||||
run: scripts/spacecheck.pl
|
||||
|
||||
- name: 'yamlcheck'
|
||||
run: .github/scripts/yamlcheck.sh
|
||||
|
||||
- name: 'badwords'
|
||||
run: scripts/badwords-all
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'URLs'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '10 5 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
linkcheck:
|
||||
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
|
||||
name: 'linkcheck'
|
||||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'mdlinkcheck (dry run)'
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
run: ./scripts/mdlinkcheck --dry-run
|
||||
|
||||
- name: 'mdlinkcheck'
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
run: ./scripts/mdlinkcheck
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'CodeQL'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'projects/**'
|
||||
- 'tests/data/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'projects/**'
|
||||
- 'tests/data/**'
|
||||
schedule:
|
||||
- cron: '0 0 * * 4'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
gha_python:
|
||||
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
|
||||
name: 'GHA and Python'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write # To create/update security events
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'initialize'
|
||||
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
||||
with:
|
||||
languages: actions, python
|
||||
queries: security-extended
|
||||
|
||||
- name: 'perform analysis'
|
||||
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
||||
|
||||
c:
|
||||
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
|
||||
name: 'C'
|
||||
runs-on: ${{ matrix.platform == 'Linux' && 'ubuntu-latest' || 'windows-2022' }}
|
||||
permissions:
|
||||
security-events: write # To create/update security events
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [Linux, Windows]
|
||||
env:
|
||||
MATRIX_PLATFORM: '${{ matrix.platform }}'
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
if: ${{ matrix.platform == 'Linux' }}
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libpsl-dev libbrotli-dev libidn2-dev libssh2-1-dev libssh-dev \
|
||||
libnghttp2-dev libldap-dev libkrb5-dev libgnutls28-dev libwolfssl-dev
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install c-ares gsasl libnghttp3 libngtcp2 mbedtls rustls-ffi
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'delete test input C files'
|
||||
shell: bash
|
||||
run: find tests/data -name '*.c' -delete
|
||||
|
||||
- name: 'initialize'
|
||||
# https://github.com/github/codeql-action/blob/main/init/action.yml
|
||||
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
||||
with:
|
||||
languages: cpp
|
||||
build-mode: manual
|
||||
trap-caching: false
|
||||
|
||||
- name: 'build'
|
||||
timeout-minutes: 10
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${MATRIX_PLATFORM}" = 'Windows' ]; then
|
||||
cmake -B . -DBUILD_SHARED_LIBS=OFF -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
|
||||
-DCMAKE_VS_GLOBALS=TrackFileAccess=false \
|
||||
-DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF -DUSE_WIN32_IDN=ON
|
||||
cmake --build . --verbose
|
||||
src/Debug/curl.exe --disable --version
|
||||
else
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
export PKG_CONFIG_PATH
|
||||
|
||||
# MultiSSL
|
||||
PKG_CONFIG_PATH="$(brew --prefix c-ares)/lib/pkgconfig:$(brew --prefix mbedtls)/lib/pkgconfig:$(brew --prefix rustls-ffi)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig"
|
||||
cmake -B _bld1 -G Ninja -DCURL_DISABLE_TYPECHECK=ON -DCURL_WERROR=ON -DENABLE_DEBUG=ON \
|
||||
-DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DCURL_USE_WOLFSSL=ON \
|
||||
-DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON -DUSE_ECH=ON -DENABLE_ARES=ON \
|
||||
-DCURL_DISABLE_VERBOSE_STRINGS=ON
|
||||
cmake --build _bld1
|
||||
cmake --build _bld1 --target testdeps
|
||||
cmake --build _bld1 --target curl-examples-build
|
||||
|
||||
# HTTP/3
|
||||
PKG_CONFIG_PATH="$(brew --prefix libnghttp3)/lib/pkgconfig:$(brew --prefix libngtcp2)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig"
|
||||
cmake -B _bld2 -G Ninja -DCURL_DISABLE_TYPECHECK=ON -DCURL_WERROR=ON \
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DUSE_NGTCP2=ON \
|
||||
-DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON \
|
||||
-DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON
|
||||
cmake --build _bld2
|
||||
cmake --build _bld2 --target testdeps
|
||||
cmake --build _bld2 --target curl-examples-build
|
||||
|
||||
_bld1/src/curl --disable --version
|
||||
_bld2/src/curl --disable --version
|
||||
fi
|
||||
|
||||
- name: 'perform analysis'
|
||||
# https://github.com/github/codeql-action/blob/main/analyze/action.yml
|
||||
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
||||
@@ -0,0 +1,192 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'configure-vs-cmake'
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '*.ac'
|
||||
- '**/*.m4'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'CMake/**'
|
||||
- 'lib/curl_config-cmake.h.in'
|
||||
- 'tests/cmake/**'
|
||||
- '.github/scripts/cmp-config.pl'
|
||||
- '.github/workflows/configure-vs-cmake.yml'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '*.ac'
|
||||
- '**/*.m4'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'CMake/**'
|
||||
- 'lib/curl_config-cmake.h.in'
|
||||
- 'tests/cmake/**'
|
||||
- '.github/scripts/cmp-config.pl'
|
||||
- '.github/workflows/configure-vs-cmake.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
check-linux:
|
||||
name: 'Linux'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'run configure --with-openssl'
|
||||
run: |
|
||||
autoreconf -fi
|
||||
export PKG_CONFIG_DEBUG_SPEW=1
|
||||
mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl
|
||||
|
||||
- name: 'run cmake'
|
||||
run: cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_LIBPSL=OFF
|
||||
|
||||
- name: 'configure log'
|
||||
run: cat bld-am/config.log 2>/dev/null || true
|
||||
|
||||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::'
|
||||
echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'compare generated curl_config.h files'
|
||||
run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
|
||||
|
||||
- name: 'compare generated libcurl.pc files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
|
||||
|
||||
- name: 'compare generated curl-config files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
|
||||
|
||||
check-macos:
|
||||
name: 'macOS'
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: 'install packages'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
# shellcheck disable=SC2181
|
||||
while [[ $? == 0 ]]; do
|
||||
for i in 1 2 3; do
|
||||
if brew update && brew install automake libtool; then
|
||||
break 2
|
||||
else
|
||||
echo "Error: wait to try again: $i"
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
false Too many retries
|
||||
done
|
||||
|
||||
- name: 'toolchain versions'
|
||||
run: echo '::group::brew packages installed'; ls -l /opt/homebrew/opt; echo '::endgroup::'
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'run configure --with-openssl'
|
||||
run: |
|
||||
autoreconf -fi
|
||||
export PKG_CONFIG_DEBUG_SPEW=1
|
||||
mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --disable-ldap --with-brotli --with-zstd --with-apple-sectrust
|
||||
|
||||
- name: 'run cmake'
|
||||
run: |
|
||||
cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_LIBPSL=OFF -DCURL_DISABLE_LDAP=ON \
|
||||
-DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
|
||||
-DCURL_USE_LIBSSH2=OFF -DUSE_APPLE_SECTRUST=ON
|
||||
|
||||
- name: 'configure log'
|
||||
run: cat bld-am/config.log 2>/dev/null || true
|
||||
|
||||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::'
|
||||
echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'compare generated curl_config.h files'
|
||||
run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
|
||||
|
||||
- name: 'compare generated libcurl.pc files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
|
||||
|
||||
- name: 'compare generated curl-config files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
|
||||
|
||||
check-windows:
|
||||
name: 'Windows'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TRIPLET: 'x86_64-w64-mingw32'
|
||||
steps:
|
||||
- name: 'install packages'
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'run configure --with-schannel'
|
||||
run: |
|
||||
autoreconf -fi
|
||||
export PKG_CONFIG_DEBUG_SPEW=1
|
||||
mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-schannel --without-libpsl --host="${TRIPLET}"
|
||||
|
||||
- name: 'run cmake'
|
||||
run: |
|
||||
cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_C_COMPILER_TARGET="${TRIPLET}" \
|
||||
-DCMAKE_C_COMPILER="${TRIPLET}-gcc"
|
||||
|
||||
- name: 'configure log'
|
||||
run: cat bld-am/config.log 2>/dev/null || true
|
||||
|
||||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::'
|
||||
echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'compare generated curl_config.h files'
|
||||
run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
|
||||
|
||||
- name: 'compare generated libcurl.pc files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
|
||||
|
||||
- name: 'compare generated curl-config files'
|
||||
run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
---
|
||||
name: 'curl-for-win'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
CW_NOGET: 'curl trurl'
|
||||
CW_MAP: '0'
|
||||
CW_JOBS: '5'
|
||||
CW_NOPKG: '1'
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
linux-glibc-gcc:
|
||||
name: 'Linux gcc glibc (amd64, arm64)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-linux-a64-x64-gcc'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
. ./_versions.sh
|
||||
export CW_CCSUFFIX='-15'
|
||||
export CW_GCCSUFFIX='-12'
|
||||
sudo podman image trust set --type reject default
|
||||
sudo podman image trust set --type accept docker.io/library
|
||||
time podman pull "${OCI_IMAGE_DEBIAN_STABLE}"
|
||||
podman images --digests
|
||||
time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
|
||||
--env-file <(env | grep -a -E \
|
||||
'^(CW_|DO_NOT_TRACK|GITHUB_)') \
|
||||
"${OCI_IMAGE_DEBIAN_STABLE}" \
|
||||
sh -c ./_ci-linux-debian.sh
|
||||
|
||||
linux-glibc-gcc-minimal: # use gcc to minimize installed packages
|
||||
name: 'Linux gcc glibc minimal (amd64)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-prefill-zero-osnotls-osnoidn-nohttp-nocurltool-linux-x64-gcc'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
. ./_versions.sh
|
||||
sudo podman image trust set --type reject default
|
||||
sudo podman image trust set --type accept docker.io/library
|
||||
time podman pull "${OCI_IMAGE_DEBIAN}"
|
||||
podman images --digests
|
||||
time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
|
||||
--env-file <(env | grep -a -E \
|
||||
'^(CW_|DO_NOT_TRACK|GITHUB_)') \
|
||||
"${OCI_IMAGE_DEBIAN}" \
|
||||
sh -c ./_ci-linux-debian.sh
|
||||
|
||||
linux-musl-llvm:
|
||||
name: 'Linux llvm MUSL (amd64, riscv64)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-linux-musl-r64-x64'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
. ./_versions.sh
|
||||
sudo podman image trust set --type reject default
|
||||
sudo podman image trust set --type accept docker.io/library
|
||||
time podman pull "${OCI_IMAGE_DEBIAN}"
|
||||
podman images --digests
|
||||
time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
|
||||
--env-file <(env | grep -a -E \
|
||||
'^(CW_|DO_NOT_TRACK|GITHUB_)') \
|
||||
"${OCI_IMAGE_DEBIAN}" \
|
||||
sh -c ./_ci-linux-debian.sh
|
||||
|
||||
mac-clang:
|
||||
name: 'macOS clang cares (x86_64)'
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CW_JOBS: '4'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-mac-x64-cares'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
sh -c ./_ci-mac-homebrew.sh
|
||||
|
||||
win-llvm:
|
||||
name: 'Windows llvm (x64)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-win-x64-noWINE'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
. ./_versions.sh
|
||||
sudo podman image trust set --type reject default
|
||||
sudo podman image trust set --type accept docker.io/library
|
||||
time podman pull "${OCI_IMAGE_DEBIAN}"
|
||||
podman images --digests
|
||||
time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
|
||||
--env-file <(env | grep -a -E \
|
||||
'^(CW_|DO_NOT_TRACK|GITHUB_)') \
|
||||
"${OCI_IMAGE_DEBIAN}" \
|
||||
sh -c ./_ci-linux-debian.sh
|
||||
|
||||
win-gcc-zlibold-x64:
|
||||
name: 'Windows gcc zlib-classic (x64)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: 'curl'
|
||||
fetch-depth: 8
|
||||
- name: 'build'
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/curl/curl-for-win
|
||||
mv curl-for-win/* .
|
||||
export CW_CONFIG='-main-werror-unitybatch-nocertdata-win-x64-gcc-zlibold-noWINE'
|
||||
export CW_REVISION="${GITHUB_SHA}"
|
||||
. ./_versions.sh
|
||||
sudo podman image trust set --type reject default
|
||||
sudo podman image trust set --type accept docker.io/library
|
||||
time podman pull "${OCI_IMAGE_DEBIAN}"
|
||||
podman images --digests
|
||||
time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
|
||||
--env-file <(env | grep -a -E \
|
||||
'^(CW_|DO_NOT_TRACK|GITHUB_)') \
|
||||
"${OCI_IMAGE_DEBIAN}" \
|
||||
sh -c ./_ci-linux-debian.sh
|
||||
+369
@@ -0,0 +1,369 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'dist'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
CURL_TEST_MIN: 1500
|
||||
DO_NOT_TRACK: '1'
|
||||
MAKEFLAGS: -j 5
|
||||
|
||||
jobs:
|
||||
maketgz-and-verify-in-tree:
|
||||
name: 'AM in-tree & maketgz'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'remove preinstalled curl libcurl4{-doc}'
|
||||
run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc
|
||||
|
||||
- name: 'autoreconf'
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
run: ./configure --without-ssl --without-libpsl
|
||||
|
||||
- name: 'make'
|
||||
run: make V=1
|
||||
|
||||
- name: 'maketgz'
|
||||
run: SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
path: 'curl-99.98.97.tar.gz'
|
||||
retention-days: 1
|
||||
|
||||
- name: 'configure build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
./configure --prefix="$HOME"/temp --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl
|
||||
make
|
||||
make test-ci
|
||||
make install
|
||||
popd
|
||||
# basic check of the installed files
|
||||
bash scripts/installcheck.sh "$HOME"/temp
|
||||
rm -rf curl-99.98.97
|
||||
|
||||
verify-out-of-tree-docs:
|
||||
name: 'AM out-of-tree docs'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'configure build & docs'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
|
||||
mkdir build
|
||||
pushd build
|
||||
../curl-99.98.97/configure --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl
|
||||
make
|
||||
make test-ci
|
||||
popd
|
||||
rm -rf build
|
||||
rm -rf curl-99.98.97
|
||||
|
||||
verify-out-of-tree-autotools-debug:
|
||||
name: 'AM out-of-tree (debug)'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
mkdir build
|
||||
pushd build
|
||||
../configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --enable-debug --without-libpsl
|
||||
make
|
||||
make test-ci
|
||||
make install
|
||||
curl-install/bin/curl --disable --version
|
||||
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
|
||||
popd
|
||||
scripts/checksrc-all.pl
|
||||
|
||||
verify-out-of-tree-autotools:
|
||||
name: 'AM out-of-tree !perl'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
mkdir build
|
||||
pushd build
|
||||
../configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL=
|
||||
make
|
||||
make install
|
||||
curl-install/bin/curl --disable --version
|
||||
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
|
||||
popd
|
||||
|
||||
verify-in-tree-autotools:
|
||||
name: 'AM in-tree !perl'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
./configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL=
|
||||
make
|
||||
make install
|
||||
curl-install/bin/curl --disable --version
|
||||
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
|
||||
|
||||
verify-out-of-tree-cmake:
|
||||
name: 'CM out-of-tree !perl'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
cmake -B build -DCMAKE_INSTALL_PREFIX="$PWD"/curl-install -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF -DPERL_EXECUTABLE=
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH"
|
||||
curl-install/bin/curl --disable --version
|
||||
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
|
||||
|
||||
verify-in-tree-cmake:
|
||||
name: 'CM in-tree !perl'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'build & install'
|
||||
run: |
|
||||
echo "::stop-commands::$(uuidgen)"
|
||||
tar xvf curl-99.98.97.tar.gz
|
||||
pushd curl-99.98.97
|
||||
cmake . -G Ninja -DCMAKE_INSTALL_PREFIX="$PWD"/curl-install -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF -DPERL_EXECUTABLE=
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH"
|
||||
curl-install/bin/curl --disable --version
|
||||
curl-install/bin/curl --manual | wc -l | grep -v '^ *0$'
|
||||
|
||||
missing-files:
|
||||
name: 'missing files'
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 5
|
||||
needs: maketgz-and-verify-in-tree
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: 'release-tgz'
|
||||
|
||||
- name: 'detect files missing from release tarball'
|
||||
run: .github/scripts/distfiles.sh curl-99.98.97.tar.gz
|
||||
|
||||
reproducible-releases:
|
||||
name: 'reproducible releases'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'remove preinstalled curl libcurl4{-doc}'
|
||||
run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc
|
||||
|
||||
- name: 'generate release tarballs'
|
||||
run: ./scripts/dmaketgz 9.10.11
|
||||
|
||||
- name: 'verify release tarballs'
|
||||
run: |
|
||||
mkdir _verify
|
||||
mv curl-9.10.11.tar.gz _verify
|
||||
cd _verify
|
||||
../scripts/verify-release curl-9.10.11.tar.gz
|
||||
|
||||
cmake-integration:
|
||||
name: 'CM integration ${{ matrix.image }}'
|
||||
runs-on: ${{ matrix.image }}
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ contains(matrix.image, 'windows') && 'msys2 {0}' || 'bash' }}
|
||||
env:
|
||||
CC: ${{ !contains(matrix.image, 'windows') && 'clang' || '' }}
|
||||
MAKEFLAGS: ${{ contains(matrix.image, 'macos') && '-j 4' || '-j 5' }}
|
||||
MATRIX_IMAGE: '${{ matrix.image }}'
|
||||
TESTOPTS: ${{ contains(matrix.image, 'macos') && '-D_CURL_PREFILL=ON' || '' }} ${{ contains(matrix.image, 'windows') && '-DCMAKE_UNITY_BUILD_BATCH_SIZE=30' || '' }}
|
||||
OLD_CMAKE_VERSION: 3.19.8
|
||||
OLD_CMAKE_SHA256_LINUX_ARM: 807f5afb2a560e00af9640e496d5673afefc2888bf0ed076412884a5ebb547a1
|
||||
OLD_CMAKE_SHA256_MACOS_UNI: 0976d23d982af05dcbfb3aa34fcb62ead43bea27f0e3bb95222f2a78161423f2
|
||||
OLD_CMAKE_SHA256_WIN_INTEL: 2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-24.04-arm, macos-latest, windows-2022]
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0
|
||||
if: ${{ contains(matrix.image, 'windows') }}
|
||||
with:
|
||||
msystem: mingw64
|
||||
release: false
|
||||
update: false
|
||||
cache: false
|
||||
path-type: inherit
|
||||
install: >-
|
||||
mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd mingw-w64-x86_64-libpsl mingw-w64-x86_64-libssh2 mingw-w64-x86_64-nghttp2 mingw-w64-x86_64-openssl
|
||||
|
||||
- name: 'install prereqs'
|
||||
timeout-minutes: 3
|
||||
run: |
|
||||
if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
--location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-win64-x64.zip" --output pkg.bin
|
||||
sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OLD_CMAKE_SHA256_WIN_INTEL}" && unzip -q pkg.bin && rm -f pkg.bin
|
||||
printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-win64-x64/bin/cmake.exe > ~/old-cmake-path.txt
|
||||
elif [[ "${MATRIX_IMAGE}" = *'ubuntu'* ]]; then
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install libpsl-dev libssl-dev
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
--location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-Linux-aarch64.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${OLD_CMAKE_SHA256_LINUX_ARM}" && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-Linux-aarch64/bin/cmake > ~/old-cmake-path.txt
|
||||
else
|
||||
brew install libpsl openssl
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
--location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-macos-universal.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${OLD_CMAKE_SHA256_MACOS_UNI}" && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-macos-universal/CMake.app/Contents/bin/cmake > ~/old-cmake-path.txt
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'via ExternalProject'
|
||||
if: ${{ !contains(matrix.image, 'ubuntu') }}
|
||||
run: ./tests/cmake/test.sh ExternalProject ${TESTOPTS}
|
||||
- name: 'via FetchContent'
|
||||
run: ./tests/cmake/test.sh FetchContent ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
- name: 'via add_subdirectory'
|
||||
run: ./tests/cmake/test.sh add_subdirectory ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
- name: 'via find_package'
|
||||
run: ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
- name: 'via find_package (C++)'
|
||||
if: ${{ contains(matrix.image, 'ubuntu') }}
|
||||
run: TEST_CMAKE_FLAGS=-DTEST_CPP=ON ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
- name: 'via find_package (PREFER_CONFIG=ON)'
|
||||
if: ${{ contains(matrix.image, 'windows') }}
|
||||
run: |
|
||||
export TEST_CMAKE_FLAGS_PROVIDER='-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCURL_ZSTD=OFF'
|
||||
TEST_CMAKE_FLAGS_PROVIDER+=' -DNGHTTP2_INCLUDE_DIR=C:/msys64/mingw64/include -DNGHTTP2_LIBRARY=C:/msys64/mingw64/lib/libnghttp2.dll.a'
|
||||
export TEST_CMAKE_FLAGS_CONSUMER="${TEST_CMAKE_FLAGS_PROVIDER}"
|
||||
./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
|
||||
- name: 'via ExternalProject (old cmake)'
|
||||
if: ${{ contains(matrix.image, 'ubuntu') }}
|
||||
run: |
|
||||
export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)"
|
||||
if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then
|
||||
export CFLAGS='-arch arm64'
|
||||
fi
|
||||
if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then
|
||||
export TEST_CMAKE_GENERATOR='MSYS Makefiles'
|
||||
export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc'
|
||||
fi
|
||||
./tests/cmake/test.sh ExternalProject ${TESTOPTS}
|
||||
|
||||
- name: 'via add_subdirectory OpenSSL (old cmake)'
|
||||
run: |
|
||||
export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)"
|
||||
if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then
|
||||
export CFLAGS='-arch arm64'
|
||||
export TEST_CMAKE_FLAGS='-DCURL_USE_LIBPSL=OFF' # auto-detection does not work with old-cmake
|
||||
fi
|
||||
if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then
|
||||
export TEST_CMAKE_GENERATOR='MSYS Makefiles'
|
||||
export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DOPENSSL_ROOT_DIR=C:/msys64/mingw64'
|
||||
fi
|
||||
./tests/cmake/test.sh add_subdirectory ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
|
||||
- name: 'via find_package OpenSSL (old cmake)'
|
||||
run: |
|
||||
export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)"
|
||||
if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then
|
||||
export CFLAGS='-arch arm64'
|
||||
export TEST_CMAKE_FLAGS='-DCURL_USE_LIBPSL=OFF' # auto-detection does not work with old-cmake
|
||||
fi
|
||||
if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then
|
||||
export TEST_CMAKE_GENERATOR='MSYS Makefiles'
|
||||
export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DOPENSSL_ROOT_DIR=C:/msys64/mingw64'
|
||||
fi
|
||||
./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'Fuzzer'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/CMakeLists.txt'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
- 'tests/data/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/CMakeLists.txt'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
- 'tests/data/**'
|
||||
|
||||
concurrency:
|
||||
# Hard-coded workflow name to avoid colliding with curl-fuzzer's group
|
||||
group: curl-fuzz-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
uses: curl/curl-fuzzer/.github/workflows/ci.yml@master # zizmor: ignore[unpinned-uses]
|
||||
+862
@@ -0,0 +1,862 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'Linux HTTP/3'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
MAKEFLAGS: -j 5
|
||||
CURL_CI: github
|
||||
CURL_TEST_MIN: 1850
|
||||
DO_NOT_TRACK: '1'
|
||||
# renovate: datasource=github-releases depName=openssl/openssl versioning=semver extractVersion=^openssl-(?<version>.+)$ registryUrl=https://github.com
|
||||
OPENSSL_VERSION: 4.0.0
|
||||
# manually bumped
|
||||
OPENSSL_PREV_VERSION: 3.6.2
|
||||
OPENSSL_PREV_SHA256: aaf51a1fe064384f811daeaeb4ec4dce7340ec8bd893027eee676af31e83a04f
|
||||
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
|
||||
LIBRESSL_VERSION: 4.3.1
|
||||
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
|
||||
AWSLC_VERSION: 1.71.0
|
||||
# renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com
|
||||
BORINGSSL_VERSION: 0.20260413.0
|
||||
# renovate: datasource=github-tags depName=gnutls/nettle versioning=semver registryUrl=https://github.com
|
||||
NETTLE_VERSION: 3.10.2
|
||||
# renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver extractVersion=^nettle_?(?<version>.+)_release_.+$ registryUrl=https://github.com
|
||||
GNUTLS_VERSION: 3.8.11
|
||||
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
|
||||
WOLFSSL_VERSION: 5.9.1
|
||||
# renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
|
||||
NGHTTP3_VERSION: 1.15.0
|
||||
# renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
|
||||
NGTCP2_VERSION: 1.22.1
|
||||
# renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
|
||||
NGHTTP2_VERSION: 1.69.0
|
||||
# renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com
|
||||
QUICHE_VERSION: 0.24.7
|
||||
|
||||
jobs:
|
||||
build-cache:
|
||||
name: 'Build caches'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'cache openssl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openssl-http3-no-deprecated
|
||||
env:
|
||||
cache-name: cache-openssl-http3-no-deprecated
|
||||
with:
|
||||
path: ~/openssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }}
|
||||
|
||||
- name: 'cache openssl-prev'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openssl-prev-http3-no-deprecated
|
||||
env:
|
||||
cache-name: cache-openssl-prev-http3-no-deprecated
|
||||
with:
|
||||
path: ~/openssl-prev/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_PREV_VERSION }}
|
||||
|
||||
- name: 'cache libressl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-libressl
|
||||
env:
|
||||
cache-name: cache-libressl
|
||||
with:
|
||||
path: ~/libressl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
|
||||
|
||||
- name: 'cache awslc'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-awslc
|
||||
env:
|
||||
cache-name: cache-awslc
|
||||
with:
|
||||
path: ~/awslc/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }}
|
||||
|
||||
- name: 'cache boringssl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-boringssl
|
||||
env:
|
||||
cache-name: cache-boringssl
|
||||
with:
|
||||
path: ~/boringssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }}
|
||||
|
||||
- name: 'cache nettle'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nettle
|
||||
env:
|
||||
cache-name: cache-nettle
|
||||
with:
|
||||
path: ~/nettle/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }}
|
||||
|
||||
- name: 'cache gnutls'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-gnutls
|
||||
env:
|
||||
cache-name: cache-gnutls
|
||||
with:
|
||||
path: ~/gnutls/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }}
|
||||
|
||||
- name: 'cache wolfssl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-wolfssl
|
||||
env:
|
||||
cache-name: cache-wolfssl
|
||||
with:
|
||||
path: ~/wolfssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
|
||||
|
||||
- name: 'cache nghttp3'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nghttp3
|
||||
env:
|
||||
cache-name: cache-nghttp3
|
||||
with:
|
||||
path: ~/nghttp3/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP3_VERSION }}
|
||||
|
||||
- name: 'cache ngtcp2'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2
|
||||
env:
|
||||
cache-name: cache-ngtcp2
|
||||
with:
|
||||
path: ~/ngtcp2/build
|
||||
key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\
|
||||
${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}"
|
||||
|
||||
- name: 'cache ngtcp2 openssl-prev'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2-openssl-prev
|
||||
env:
|
||||
cache-name: cache-ngtcp2-openssl-prev
|
||||
with:
|
||||
path: ~/ngtcp2-openssl-prev/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_PREV_VERSION }}
|
||||
|
||||
- name: 'cache ngtcp2 boringssl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2-boringssl
|
||||
env:
|
||||
cache-name: cache-ngtcp2-boringssl
|
||||
with:
|
||||
path: ~/ngtcp2-boringssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.BORINGSSL_VERSION }}
|
||||
|
||||
- name: 'cache nghttp2'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nghttp2
|
||||
env:
|
||||
cache-name: cache-nghttp2
|
||||
with:
|
||||
path: ~/nghttp2/build
|
||||
key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\
|
||||
${{ env.NGTCP2_VERSION }}-${{ env.NGHTTP3_VERSION }}"
|
||||
|
||||
- id: settings
|
||||
if: >-
|
||||
${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' ||
|
||||
steps.cache-openssl-prev-http3-no-deprecated.outputs.cache-hit != 'true' ||
|
||||
steps.cache-libressl.outputs.cache-hit != 'true' ||
|
||||
steps.cache-awslc.outputs.cache-hit != 'true' ||
|
||||
steps.cache-boringssl.outputs.cache-hit != 'true' ||
|
||||
steps.cache-nettle.outputs.cache-hit != 'true' ||
|
||||
steps.cache-gnutls.outputs.cache-hit != 'true' ||
|
||||
steps.cache-wolfssl.outputs.cache-hit != 'true' ||
|
||||
steps.cache-nghttp3.outputs.cache-hit != 'true' ||
|
||||
steps.cache-ngtcp2.outputs.cache-hit != 'true' ||
|
||||
steps.cache-ngtcp2-openssl-prev.outputs.cache-hit != 'true' ||
|
||||
steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' ||
|
||||
steps.cache-nghttp2.outputs.cache-hit != 'true' }}
|
||||
|
||||
run: echo 'needs-build=true' >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: 'install build prereqs'
|
||||
if: ${{ steps.settings.outputs.needs-build == 'true' }}
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libtool autoconf automake pkgconf \
|
||||
libbrotli-dev libzstd-dev zlib1g-dev \
|
||||
libev-dev \
|
||||
libc-ares-dev \
|
||||
libp11-kit-dev autopoint bison gperf gtk-doc-tools libtasn1-bin # for GnuTLS
|
||||
echo 'CC=gcc-12' >> "$GITHUB_ENV"
|
||||
echo 'CXX=g++-12' >> "$GITHUB_ENV"
|
||||
|
||||
- name: 'build openssl'
|
||||
if: ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
|
||||
cd openssl
|
||||
./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated
|
||||
make
|
||||
make -j1 install_sw
|
||||
|
||||
- name: 'build openssl-prev'
|
||||
if: ${{ steps.cache-openssl-prev-http3-no-deprecated.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_PREV_VERSION}/openssl-${OPENSSL_PREV_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${OPENSSL_PREV_SHA256}" && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "openssl-${OPENSSL_PREV_VERSION}"
|
||||
./config --prefix=/home/runner/openssl-prev/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated
|
||||
make
|
||||
make -j1 install_sw
|
||||
|
||||
- name: 'build libressl'
|
||||
if: ${{ steps.cache-libressl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "libressl-${LIBRESSL_VERSION}"
|
||||
cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl/build
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'build awslc'
|
||||
if: ${{ steps.cache-awslc.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/awslabs/aws-lc/archive/refs/tags/v${AWSLC_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "aws-lc-${AWSLC_VERSION}"
|
||||
cmake -B . -G Ninja -DBUILD_SHARED_LIBS=ON -DBUILD_TOOL=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/awslc/build
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'build boringssl'
|
||||
if: ${{ steps.cache-boringssl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
mkdir boringssl-src
|
||||
cd boringssl-src
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
"https://boringssl.googlesource.com/boringssl/+archive/${BORINGSSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cmake -B . -G Ninja -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/boringssl/build
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'build nettle'
|
||||
if: ${{ steps.cache-nettle.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://ftpmirror.gnu.org/nettle/nettle-${NETTLE_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "nettle-${NETTLE_VERSION}"
|
||||
autoreconf -fi
|
||||
./configure --disable-dependency-tracking --prefix=/home/runner/nettle/build \
|
||||
--disable-static --disable-openssl --disable-documentation
|
||||
make install
|
||||
|
||||
- name: 'build gnutls'
|
||||
if: ${{ steps.cache-gnutls.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
"https://www.gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_VERSION%.*}/gnutls-${GNUTLS_VERSION}.tar.xz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin
|
||||
cd "gnutls-${GNUTLS_VERSION}"
|
||||
autoreconf -fi
|
||||
# required: libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin
|
||||
./configure --disable-dependency-tracking --prefix=/home/runner/gnutls/build \
|
||||
PKG_CONFIG_PATH=/home/runner/nettle/build/lib64/pkgconfig \
|
||||
LDFLAGS=-Wl,-rpath,/home/runner/nettle/build/lib64 \
|
||||
--with-included-libtasn1 --with-included-unistring \
|
||||
--disable-guile --disable-doc --disable-tests --disable-tools
|
||||
make install
|
||||
|
||||
- name: 'build wolfssl'
|
||||
if: ${{ steps.cache-wolfssl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl
|
||||
cd wolfssl
|
||||
./autogen.sh
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-all --enable-quic \
|
||||
--disable-benchmark --disable-crypttests --disable-examples
|
||||
make
|
||||
make install
|
||||
|
||||
- name: 'build nghttp3'
|
||||
if: ${{ steps.cache-nghttp3.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3
|
||||
cd nghttp3
|
||||
git submodule update --init --depth 1
|
||||
autoreconf -fi
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only
|
||||
make
|
||||
make install
|
||||
|
||||
- name: 'build ngtcp2'
|
||||
if: ${{ steps.cache-ngtcp2.outputs.cache-hit != 'true' }}
|
||||
# building twice to get crypto libs for ossl, libressl and awslc installed
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2
|
||||
cd ngtcp2
|
||||
autoreconf -fi
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \
|
||||
PKG_CONFIG_PATH=/home/runner/libressl/build/lib/pkgconfig \
|
||||
--with-openssl
|
||||
make install
|
||||
make clean
|
||||
export PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig
|
||||
PKG_CONFIG_PATH+=:/home/runner/nettle/build/lib64/pkgconfig
|
||||
PKG_CONFIG_PATH+=:/home/runner/gnutls/build/lib/pkgconfig
|
||||
PKG_CONFIG_PATH+=:/home/runner/wolfssl/build/lib/pkgconfig
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \
|
||||
--with-openssl --with-gnutls --with-wolfssl --with-boringssl \
|
||||
BORINGSSL_LIBS='-L/home/runner/awslc/build/lib -lssl -lcrypto' \
|
||||
BORINGSSL_CFLAGS='-I/home/runner/awslc/build/include'
|
||||
make install
|
||||
|
||||
- name: 'build ngtcp2 openssl-prev'
|
||||
if: ${{ steps.cache-ngtcp2-openssl-prev.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-openssl-prev
|
||||
cd ngtcp2-openssl-prev
|
||||
autoreconf -fi
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \
|
||||
PKG_CONFIG_PATH=/home/runner/openssl-prev/build/lib/pkgconfig \
|
||||
--with-openssl
|
||||
make install
|
||||
|
||||
- name: 'build ngtcp2 boringssl'
|
||||
if: ${{ steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl
|
||||
cd ngtcp2-boringssl
|
||||
autoreconf -fi
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \
|
||||
--with-openssl=no --with-boringssl \
|
||||
BORINGSSL_LIBS='-L/home/runner/boringssl/build/lib -lssl -lcrypto' \
|
||||
BORINGSSL_CFLAGS='-I/home/runner/boringssl/build/include'
|
||||
make install
|
||||
|
||||
- name: 'build nghttp2'
|
||||
if: ${{ steps.cache-nghttp2.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2
|
||||
cd nghttp2
|
||||
git submodule update --init --depth 1
|
||||
autoreconf -fi
|
||||
# required (for nghttpx application): libc-ares-dev libev-dev zlib1g-dev
|
||||
# optional (for nghttpx application): libbrotli-dev
|
||||
export PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig
|
||||
PKG_CONFIG_PATH+=:/home/runner/nghttp3/build/lib/pkgconfig
|
||||
PKG_CONFIG_PATH+=:/home/runner/ngtcp2/build/lib/pkgconfig
|
||||
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-app --enable-http3 \
|
||||
LDFLAGS=-Wl,-rpath,/home/runner/openssl/build/lib \
|
||||
--with-libbrotlienc --with-libbrotlidec
|
||||
make install
|
||||
|
||||
linux:
|
||||
name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
|
||||
needs: build-cache
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CURL_TRACE_PKG_CONFIG: '1'
|
||||
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
|
||||
MATRIX_INSTALL_PACKAGES: '${{ matrix.build.install_packages }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build:
|
||||
- name: 'openssl'
|
||||
tflags: '--min=1700'
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/openssl/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/openssl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ech --enable-ssls-export
|
||||
|
||||
- name: 'openssl'
|
||||
install_steps: skipall
|
||||
PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/openssl/build -DUSE_NGTCP2=ON
|
||||
-DCURL_DISABLE_LDAP=ON
|
||||
-DUSE_ECH=ON
|
||||
-DCMAKE_UNITY_BUILD=ON
|
||||
|
||||
- name: 'openssl-prev'
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/openssl-prev/build/lib
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/runner/openssl-prev/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp3/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp2-openssl-prev/build/lib/pkgconfig"
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/openssl-prev/build --with-ngtcp2=/home/runner/ngtcp2-openssl-prev/build --enable-ssls-export
|
||||
|
||||
- name: 'openssl-prev'
|
||||
tflags: '--min=1700'
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/runner/openssl-prev/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp3/build/lib/pkgconfig:\
|
||||
/home/runner/ngtcp2-openssl-prev/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp2/build/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/openssl-prev/build -DUSE_NGTCP2=ON
|
||||
-DCURL_DISABLE_LDAP=ON
|
||||
|
||||
- name: 'libressl'
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/libressl/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/libressl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
# Intentionally using '--with-ngtcp2=<path>' to test this way of configuration, in addition to bare '--with-ngtcp2' + 'PKG_CONFIG_PATH' in other jobs.
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/libressl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ssls-export
|
||||
--enable-unity
|
||||
|
||||
- name: 'libressl'
|
||||
PKG_CONFIG_PATH: /home/runner/libressl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/libressl/build -DUSE_NGTCP2=ON
|
||||
|
||||
- name: 'awslc'
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/awslc/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/awslc/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
# Intentionally using bare '--with-ngtcp2' + 'PKG_CONFIG_PATH' to test this way of configuration, in addition to '--with-ngtcp2=<path>' in other jobs.
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/awslc/build --with-ngtcp2 --enable-ssls-export
|
||||
|
||||
- name: 'awslc'
|
||||
PKG_CONFIG_PATH: /home/runner/awslc/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/awslc/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON
|
||||
|
||||
- name: 'boringssl'
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/boringssl/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/boringssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/boringssl/build --with-ngtcp2=/home/runner/ngtcp2-boringssl/build --enable-ssls-export
|
||||
|
||||
- name: 'boringssl'
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/runner/boringssl/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp3/build/lib/pkgconfig:\
|
||||
/home/runner/ngtcp2-boringssl/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp2/build/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/boringssl/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_UNITY_BUILD=ON
|
||||
|
||||
- name: 'gnutls'
|
||||
install_packages: libp11-kit-dev libssh-dev
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib -Wl,-rpath,/home/runner/nettle/build/lib64 -Wl,-rpath,/home/runner/ngtcp2/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/nettle/build/lib64/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
configure: >-
|
||||
--with-gnutls=/home/runner/gnutls/build --with-ngtcp2=/home/runner/ngtcp2/build --with-libssh --enable-ssls-export
|
||||
|
||||
- name: 'gnutls'
|
||||
install_packages: libp11-kit-dev libssh-dev
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/runner/nettle/build/lib64/pkgconfig:\
|
||||
/home/runner/gnutls/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp3/build/lib/pkgconfig:\
|
||||
/home/runner/ngtcp2/build/lib/pkgconfig:\
|
||||
/home/runner/nghttp2/build/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DCURL_USE_GNUTLS=ON -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH=ON
|
||||
-DCMAKE_UNITY_BUILD=ON
|
||||
|
||||
- name: 'wolfssl'
|
||||
install_packages: libssh2-1-dev
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/wolfssl/build/lib
|
||||
PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
configure: >-
|
||||
--with-wolfssl=/home/runner/wolfssl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ech --with-libssh2 --enable-ssls-export
|
||||
--enable-unity
|
||||
|
||||
- name: 'wolfssl'
|
||||
install_packages: libssh2-1-dev
|
||||
tflags: '--min=1900'
|
||||
PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
|
||||
generate: >-
|
||||
-DCURL_USE_WOLFSSL=ON -DUSE_NGTCP2=ON
|
||||
-DUSE_ECH=ON
|
||||
|
||||
- name: 'quiche'
|
||||
install_steps: skipall
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/quiche/target/release
|
||||
PKG_CONFIG_PATH: /home/runner/nghttp2/build/lib/pkgconfig
|
||||
configure: >-
|
||||
--with-openssl=/home/runner/quiche/quiche/deps/boringssl/src
|
||||
--with-quiche=/home/runner/quiche/target/release
|
||||
--with-ca-fallback
|
||||
--enable-unity
|
||||
|
||||
- name: 'quiche'
|
||||
PKG_CONFIG_PATH: /home/runner/nghttp2/build/lib/pkgconfig:/home/runner/quiche/target/release
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/quiche/quiche/deps/boringssl/src
|
||||
-DUSE_QUICHE=ON
|
||||
-DCURL_CA_FALLBACK=ON
|
||||
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
timeout-minutes: 2
|
||||
env:
|
||||
INSTALL_PACKAGES: >-
|
||||
${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'stunnel4 ' || '' }}
|
||||
${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') &&
|
||||
'apache2 apache2-dev libnghttp2-dev vsftpd dante-server libev-dev' || '' }}
|
||||
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libtool autoconf automake pkgconf \
|
||||
libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libidn2-0-dev libldap-dev libuv1-dev valgrind \
|
||||
${INSTALL_PACKAGES} \
|
||||
${MATRIX_INSTALL_PACKAGES}
|
||||
echo 'CC=gcc-12' >> "$GITHUB_ENV"
|
||||
echo 'CXX=g++-12' >> "$GITHUB_ENV"
|
||||
|
||||
- name: 'cache openssl'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openssl-http3-no-deprecated
|
||||
env:
|
||||
cache-name: cache-openssl-http3-no-deprecated
|
||||
with:
|
||||
path: ~/openssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache openssl-prev'
|
||||
if: ${{ contains(matrix.build.name, 'openssl-prev') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openssl-prev-http3-no-deprecated
|
||||
env:
|
||||
cache-name: cache-openssl-prev-http3-no-deprecated
|
||||
with:
|
||||
path: ~/openssl-prev/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_PREV_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache libressl'
|
||||
if: ${{ contains(matrix.build.name, 'libressl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-libressl
|
||||
env:
|
||||
cache-name: cache-libressl
|
||||
with:
|
||||
path: ~/libressl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache awslc'
|
||||
if: ${{ contains(matrix.build.name, 'awslc') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-awslc
|
||||
env:
|
||||
cache-name: cache-awslc
|
||||
with:
|
||||
path: ~/awslc/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache boringssl'
|
||||
if: ${{ contains(matrix.build.name, 'boringssl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-boringssl
|
||||
env:
|
||||
cache-name: cache-boringssl
|
||||
with:
|
||||
path: ~/boringssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache nettle'
|
||||
if: ${{ contains(matrix.build.name, 'gnutls') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nettle
|
||||
env:
|
||||
cache-name: cache-nettle
|
||||
with:
|
||||
path: ~/nettle/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache gnutls'
|
||||
if: ${{ contains(matrix.build.name, 'gnutls') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-gnutls
|
||||
env:
|
||||
cache-name: cache-gnutls
|
||||
with:
|
||||
path: ~/gnutls/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache wolfssl'
|
||||
if: ${{ contains(matrix.build.name, 'wolfssl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-wolfssl
|
||||
env:
|
||||
cache-name: cache-wolfssl
|
||||
with:
|
||||
path: ~/wolfssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache nghttp3'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nghttp3
|
||||
env:
|
||||
cache-name: cache-nghttp3
|
||||
with:
|
||||
path: ~/nghttp3/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP3_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache ngtcp2'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2
|
||||
env:
|
||||
cache-name: cache-ngtcp2
|
||||
with:
|
||||
path: ~/ngtcp2/build
|
||||
key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\
|
||||
${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}"
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache ngtcp2 openssl-prev'
|
||||
if: ${{ contains(matrix.build.name, 'openssl-prev') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2-openssl-prev
|
||||
env:
|
||||
cache-name: cache-ngtcp2-openssl-prev
|
||||
with:
|
||||
path: ~/ngtcp2-openssl-prev/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_PREV_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache ngtcp2 boringssl'
|
||||
if: ${{ contains(matrix.build.name, 'boringssl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-ngtcp2-boringssl
|
||||
env:
|
||||
cache-name: cache-ngtcp2-boringssl
|
||||
with:
|
||||
path: ~/ngtcp2-boringssl/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.BORINGSSL_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache nghttp2'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nghttp2
|
||||
env:
|
||||
cache-name: cache-nghttp2
|
||||
with:
|
||||
path: ~/nghttp2/build
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.NGTCP2_VERSION }}-${{ env.NGHTTP3_VERSION }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: 'cache quiche'
|
||||
if: ${{ contains(matrix.build.name, 'quiche') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-quiche
|
||||
env:
|
||||
cache-name: cache-quiche
|
||||
with:
|
||||
path: ~/quiche
|
||||
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.QUICHE_VERSION }}
|
||||
|
||||
- name: 'build quiche and boringssl'
|
||||
if: ${{ contains(matrix.build.name, 'quiche') && steps.cache-quiche.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
git clone --quiet --depth 1 --branch "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche
|
||||
cd quiche
|
||||
#### Work-around https://github.com/curl/curl/issues/7927 #######
|
||||
#### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
|
||||
sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
|
||||
|
||||
cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
|
||||
ln -s libquiche.so target/release/libquiche.so.0
|
||||
mkdir -v quiche/deps/boringssl/src/lib
|
||||
find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \;
|
||||
|
||||
# include dir
|
||||
# /home/runner/quiche/quiche/deps/boringssl/src/include
|
||||
# lib dir
|
||||
# /home/runner/quiche/quiche/deps/boringssl/src/lib
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build.configure }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
env:
|
||||
LDFLAGS: '${{ matrix.build.LDFLAGS }}'
|
||||
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
|
||||
MATRIX_GENERATE: '${{ matrix.build.generate }}'
|
||||
MATRIX_PKG_CONFIG_PATH: '${{ matrix.build.PKG_CONFIG_PATH }}'
|
||||
run: |
|
||||
[ -n "${MATRIX_PKG_CONFIG_PATH}" ] && export PKG_CONFIG_PATH="${MATRIX_PKG_CONFIG_PATH}"
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
[[ "${MATRIX_GENERATE}" = *'boringssl'* ]] && options=" -DBORINGSSL_VERSION=${BORINGSSL_VERSION}"
|
||||
cmake -B bld -G Ninja \
|
||||
-DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \
|
||||
-DCURL_WERROR=ON -DENABLE_DEBUG=ON \
|
||||
-DCURL_USE_LIBUV=ON -DCURL_ENABLE_NTLM=ON \
|
||||
-DTEST_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \
|
||||
-DHTTPD_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \
|
||||
${MATRIX_GENERATE} ${options}
|
||||
else
|
||||
[[ "${MATRIX_CONFIGURE}" = *'boringssl'* ]] && export CPPFLAGS="-DCURL_BORINGSSL_VERSION=\\\"${BORINGSSL_VERSION}\\\""
|
||||
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror --enable-debug --disable-static \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
--with-libuv --enable-ntlm \
|
||||
--with-test-nghttpx=/home/runner/nghttp2/build/bin/nghttpx \
|
||||
${MATRIX_CONFIGURE}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'curl -V'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
||||
bld/src/curl --disable -V
|
||||
|
||||
- name: 'build tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') }}
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target testdeps
|
||||
else
|
||||
make -C bld V=1 -C tests
|
||||
fi
|
||||
|
||||
- name: 'install test prereqs'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
run: |
|
||||
python3 -m venv ~/venv
|
||||
if bld/src/curl --disable -V 2>/dev/null | grep smb; then
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt
|
||||
fi
|
||||
|
||||
- name: 'run tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
env:
|
||||
TFLAGS: '${{ matrix.build.tflags }}'
|
||||
run: |
|
||||
TFLAGS+=' -n'
|
||||
source ~/venv/bin/activate
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target test-ci
|
||||
else
|
||||
make -C bld V=1 test-ci
|
||||
fi
|
||||
|
||||
- name: 'run tests (valgrind)'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
run: |
|
||||
export TFLAGS='-j6 --min=4 HTTP/3'
|
||||
source ~/venv/bin/activate
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target test-ci
|
||||
else
|
||||
make -C bld V=1 test-ci
|
||||
fi
|
||||
|
||||
- name: 'install pytest prereqs'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
run: |
|
||||
[ -d ~/venv ] || python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt
|
||||
|
||||
- name: 'run pytest (event based)'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
env:
|
||||
CURL_TEST_EVENT: 1
|
||||
PYTEST_ADDOPTS: '--color=yes'
|
||||
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target curl-pytest-ci
|
||||
else
|
||||
make -C bld V=1 pytest-ci
|
||||
fi
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: 'Labeler'
|
||||
|
||||
'on': [pull_request_target] # zizmor: ignore[dangerous-triggers]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
label:
|
||||
name: 'Labeler'
|
||||
runs-on: ubuntu-slim
|
||||
permissions:
|
||||
contents: read # To comply with https://github.com/actions/labeler documentation
|
||||
pull-requests: write # To edit labels on PRs
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Compile on an old version of Linux that has barely the minimal build
|
||||
# requirements for CMake. This tests that curl is still usable on really
|
||||
# outdated systems.
|
||||
#
|
||||
# Debian stretch is chosen as it closely matches some of the oldest major
|
||||
# versions we support (especially cmake); see docs/INTERNALS.md and it
|
||||
# is still supported (as of this writing).
|
||||
# stretch has ELTS support from Freexian until 2027-06-30
|
||||
# For ELTS info see https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/
|
||||
# The Debian key expires 2025-05-20, after which package signature
|
||||
# verification may need to be disabled.
|
||||
# httrack is one of the smallest downloaders, needed to bootstrap ELTS,
|
||||
# and doesn not conflict with the curl we are building.
|
||||
|
||||
name: 'Linux Old'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
MAKEFLAGS: -j 5
|
||||
CURL_CI: github
|
||||
CURL_TEST_MIN: 1560
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
cmake-autotools:
|
||||
name: 'autotools & cmake'
|
||||
runs-on: ubuntu-latest
|
||||
container: 'debian:stretch'
|
||||
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
# Remember, this shell is dash, not bash
|
||||
run: |
|
||||
sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list
|
||||
apt-get -o Dpkg::Use-Pty=0 update
|
||||
# See comment above if this fails after 2025-05-20
|
||||
apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends httrack
|
||||
httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb
|
||||
sha256sum freexian-archive-keyring_2022.06.08_all.deb && dpkg -i freexian-archive-keyring_2022.06.08_all.deb
|
||||
echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
|
||||
apt-get -o Dpkg::Use-Pty=0 update
|
||||
apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends \
|
||||
make automake autoconf libtool ninja-build gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libkrb5-dev libldap2-dev stunnel4
|
||||
# GitHub's actions/checkout needs newer glibc and libstdc++. The latter also depends on
|
||||
# gcc-8-base, but it does not actually seem used in our situation and is not available in
|
||||
# the main repo, so force the install.
|
||||
httrack --get https://deb.freexian.com/extended-lts/pool/main/g/glibc/libc6_2.28-10+deb10u5_amd64.deb
|
||||
httrack --get https://deb.freexian.com/extended-lts/pool/main/g/gcc-8/libstdc++6_8.3.0-6_amd64.deb
|
||||
sha256sum libc6_*_amd64.deb libstdc++6_*_amd64.deb && dpkg -i --force-depends libc6_*_amd64.deb libstdc++6_*_amd64.deb
|
||||
|
||||
- name: 'install prereqs (cmake)'
|
||||
env:
|
||||
CMAKE_VERSION: 3.18.0 # Earliest version supported by curl
|
||||
CMAKE_SHA256: 4d9a9d3351161073a67e49366d701b6fa4b0343781982dc5eef08a02a750d403
|
||||
run: |
|
||||
cd ~
|
||||
fn="cmake-${CMAKE_VERSION}-linux-x86_64"
|
||||
httrack --get "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${fn}.tar.gz"
|
||||
sha256sum "${fn}".tar*.gz | tee /dev/stderr | grep -qwF -- "${CMAKE_SHA256}" && tar -xf "${fn}".tar*.gz && rm -f "${fn}".tar*.gz
|
||||
mv "cmake-${CMAKE_VERSION}-Linux-x86_64" cmake
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'CM build-only configure (out-of-tree)'
|
||||
run: |
|
||||
~/cmake/bin/cmake -B bld-1 -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
|
||||
-DCURL_ENABLE_SSL=OFF -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF
|
||||
|
||||
- name: 'CM build-only build'
|
||||
run: |
|
||||
~/cmake/bin/cmake --build bld-1 --verbose
|
||||
~/cmake/bin/cmake --install bld-1 --verbose
|
||||
|
||||
- name: 'CM build-only curl -V'
|
||||
run: bld-1/src/curl --disable --version
|
||||
|
||||
- name: 'CM build-only configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld-1/CMakeFiles/CMake*.log 2>/dev/null || true
|
||||
|
||||
- name: 'CM build-only curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld-1/lib/curl_config.h | sort || true
|
||||
|
||||
# when this job can get a libssh version 0.9.0 or later, this should get
|
||||
# that enabled again
|
||||
# when this job can get c-ares 1.16.0 or later, we can enable that
|
||||
# again
|
||||
|
||||
- name: 'CM configure (out-of-tree, zstd, gssapi)'
|
||||
run: |
|
||||
~/cmake/bin/cmake -B bld-oldie -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
|
||||
-DCURL_ENABLE_SSL=OFF -DENABLE_ARES=OFF -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF \
|
||||
-DCURL_LIBCURL_VERSIONED_SYMBOLS=ON
|
||||
|
||||
- name: 'CM configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld-oldie/CMakeFiles/CMake*.log 2>/dev/null || true
|
||||
|
||||
- name: 'CM curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld-oldie/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld-oldie/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'CM build'
|
||||
run: ~/cmake/bin/cmake --build bld-oldie
|
||||
|
||||
- name: 'CM curl -V'
|
||||
run: bld-oldie/src/curl --disable --version
|
||||
|
||||
- name: 'CM install'
|
||||
run: ~/cmake/bin/cmake --install bld-oldie
|
||||
|
||||
- name: 'CM build tests'
|
||||
run: ~/cmake/bin/cmake --build bld-oldie --target testdeps
|
||||
|
||||
- name: 'CM run tests'
|
||||
run: ~/cmake/bin/cmake --build bld-oldie --target test-ci
|
||||
|
||||
- name: 'CM build examples'
|
||||
run: ~/cmake/bin/cmake --build bld-oldie --target curl-examples-build
|
||||
|
||||
- name: 'AM autoreconf'
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'AM configure (out-of-tree, zstd, gssapi)'
|
||||
run: |
|
||||
mkdir bld-am
|
||||
cd bld-am
|
||||
../configure --prefix="$PWD"/../curl-install-am --enable-unity --enable-warnings --enable-werror --disable-shared \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
--without-ssl --disable-ares --without-libssh2 --with-zstd --with-gssapi
|
||||
|
||||
- name: 'AM configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld-am/config.log 2>/dev/null || true
|
||||
|
||||
- name: 'AM curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld-am/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'AM build'
|
||||
run: make -C bld-am
|
||||
|
||||
- name: 'AM curl -V'
|
||||
run: bld-am/src/curl --disable --version
|
||||
|
||||
- name: 'AM install'
|
||||
run: make -C bld-am install
|
||||
|
||||
- name: 'AM build tests'
|
||||
run: make -C bld-am/tests all
|
||||
+994
@@ -0,0 +1,994 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'Linux'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
MAKEFLAGS: -j 5
|
||||
CURL_CI: github
|
||||
CURL_TEST_MIN: 1660
|
||||
DO_NOT_TRACK: '1'
|
||||
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
|
||||
LIBRESSL_VERSION: 4.3.1
|
||||
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
|
||||
WOLFSSL_VERSION: 5.9.1
|
||||
# renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver registryUrl=https://github.com
|
||||
MBEDTLS_VERSION: 4.0.0
|
||||
# manually bumped
|
||||
MBEDTLS_PREV_VERSION: 3.6.5
|
||||
MBEDTLS_PREV_SHA256: 4a11f1777bb95bf4ad96721cac945a26e04bf19f57d905f241fe77ebeddf46d8
|
||||
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
|
||||
AWSLC_VERSION: 1.71.0
|
||||
# renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com
|
||||
BORINGSSL_VERSION: 0.20260413.0
|
||||
# renovate: datasource=github-releases depName=openssl/openssl versioning=semver extractVersion=^openssl-(?<version>.+)$ registryUrl=https://github.com
|
||||
OPENSSL_VERSION: 4.0.0
|
||||
# renovate: datasource=github-tags depName=rustls/rustls-ffi versioning=semver registryUrl=https://github.com
|
||||
RUSTLS_VERSION: 0.15.3
|
||||
# handled in renovate.json
|
||||
OPENLDAP_VERSION: 2.6.10
|
||||
# renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
|
||||
NGHTTP2_VERSION: 1.69.0
|
||||
# renovate: datasource=github-releases depName=pizlonator/fil-c versioning=semver-coerced registryUrl=https://github.com
|
||||
FIL_C_VERSION: 0.678
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
|
||||
runs-on: ${{ matrix.build.image || 'ubuntu-latest' }}
|
||||
container: ${{ matrix.build.container }}
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
|
||||
MATRIX_INSTALL_PACKAGES: '${{ matrix.build.install_packages }}'
|
||||
MATRIX_INSTALL_STEPS: '${{ matrix.build.install_steps }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build:
|
||||
- name: 'libressl krb5'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libidn2-dev libnghttp2-dev libldap-dev libkrb5-dev
|
||||
install_steps: libressl-c-arm pytest codeset-test
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/libressl/lib
|
||||
configure: --with-openssl=/home/runner/libressl --with-gssapi --enable-debug
|
||||
|
||||
- name: 'libressl krb5 valgrind 1'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libnghttp2-dev libldap-dev libkrb5-dev valgrind
|
||||
install_steps: libressl-c-arm
|
||||
tflags: '--min=870 1 to 950'
|
||||
generate: -DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'libressl krb5 valgrind 2'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libnghttp2-dev libldap-dev libkrb5-dev valgrind
|
||||
install_steps: libressl-c-arm
|
||||
tflags: '--min=900 951 to 9999'
|
||||
generate: -DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'libressl clang'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: clang
|
||||
install_steps: libressl-c-arm
|
||||
CC: clang
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/libressl/lib
|
||||
configure: --with-openssl=/home/runner/libressl --enable-debug
|
||||
|
||||
- name: 'wolfssl-all'
|
||||
image: ubuntu-24.04-arm
|
||||
install_steps: wolfssl-all-arm
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-all/lib
|
||||
configure: --with-wolfssl=/home/runner/wolfssl-all --enable-ech --enable-debug
|
||||
|
||||
- name: 'wolfssl-opensslextra valgrind 1'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: valgrind
|
||||
install_steps: wolfssl-opensslextra-arm
|
||||
tflags: '--min=815 1 to 1000'
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib
|
||||
configure: --with-wolfssl=/home/runner/wolfssl-opensslextra --enable-ech --enable-debug
|
||||
|
||||
- name: 'wolfssl-opensslextra valgrind 2'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: valgrind
|
||||
install_steps: wolfssl-opensslextra-arm
|
||||
tflags: '--min=835 1001 to 9999'
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib
|
||||
configure: --with-wolfssl=/home/runner/wolfssl-opensslextra --enable-ech --enable-debug
|
||||
|
||||
- name: 'mbedtls gss valgrind 1'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libnghttp2-dev libidn2-dev libldap-dev libgss-dev valgrind
|
||||
install_steps: mbedtls-latest-arm
|
||||
tflags: '--min=850 1 to 1000'
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib
|
||||
PKG_CONFIG_PATH: /home/runner/mbedtls/lib/pkgconfig
|
||||
generate: -DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_USE_GSSAPI=ON -DCURL_DROP_UNUSED=ON
|
||||
|
||||
- name: 'mbedtls gss valgrind 2'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libnghttp2-dev libidn2-dev libldap-dev libgss-dev valgrind
|
||||
install_steps: mbedtls-latest-arm
|
||||
tflags: '--min=900 1001 to 9999'
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib
|
||||
PKG_CONFIG_PATH: /home/runner/mbedtls/lib/pkgconfig
|
||||
generate: -DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_USE_GSSAPI=ON
|
||||
|
||||
- name: 'mbedtls clang'
|
||||
install_packages: libssh-dev libnghttp2-dev libldap-dev clang
|
||||
install_steps: mbedtls-latest-intel pytest
|
||||
CC: clang
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib
|
||||
configure: --with-mbedtls=/home/runner/mbedtls --with-libssh --enable-debug --with-fish-functions-dir --with-zsh-functions-dir
|
||||
|
||||
- name: 'mbedtls-prev'
|
||||
install_packages: libssh2-1-dev libnghttp2-dev libuv1-dev
|
||||
install_steps: mbedtls-prev pytest
|
||||
PKG_CONFIG_PATH: /home/runner/mbedtls-prev/lib/pkgconfig # Requires v3.6.0
|
||||
generate: -DCURL_USE_MBEDTLS=ON -DCURL_USE_LIBUV=ON -DENABLE_DEBUG=ON
|
||||
|
||||
- name: 'mbedtls-pkg MultiSSL !pc'
|
||||
install_packages: libnghttp2-dev libmbedtls-dev
|
||||
install_steps: mbedtls-latest-intel skipall
|
||||
generate: >-
|
||||
-DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls
|
||||
-DMBEDTLS_INCLUDE_DIR=/home/runner/mbedtls/include
|
||||
-DMBEDTLS_LIBRARY=/home/runner/mbedtls/lib/libmbedtls.a
|
||||
-DMBEDX509_LIBRARY=/home/runner/mbedtls/lib/libmbedx509.a
|
||||
-DMBEDCRYPTO_LIBRARY=/home/runner/mbedtls/lib/libmbedcrypto.a
|
||||
-DCURL_USE_PKGCONFIG=OFF -DCURL_USE_OPENSSL=ON
|
||||
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF
|
||||
-DCURL_COMPLETION_FISH=ON -DCURL_COMPLETION_ZSH=ON
|
||||
|
||||
- name: 'awslc'
|
||||
install_steps: awslc pytest
|
||||
LDFLAGS: -Wl,-rpath,/home/runner/awslc/lib
|
||||
configure: --with-openssl=/home/runner/awslc --enable-ech --enable-ntlm
|
||||
|
||||
- name: 'awslc'
|
||||
install_packages: libidn2-dev
|
||||
install_steps: awslc
|
||||
generate: -DOPENSSL_ROOT_DIR=/home/runner/awslc -DUSE_ECH=ON -DCMAKE_UNITY_BUILD=OFF -DCURL_DROP_UNUSED=ON -DCURL_PATCHSTAMP=test-patch -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'boringssl'
|
||||
install_steps: boringssl pytest
|
||||
generate: -DOPENSSL_ROOT_DIR=/home/runner/boringssl -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl default'
|
||||
install_steps: pytest
|
||||
configure: --with-openssl --enable-debug --disable-unity
|
||||
|
||||
- name: 'openssl libssh2 sync-resolver valgrind 1 +analyzer'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev valgrind
|
||||
tflags: '--min=965 1 to 1000'
|
||||
generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_GCC_ANALYZER=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl libssh2 sync-resolver valgrind 2'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev valgrind
|
||||
tflags: '--min=920 1001 to 9999'
|
||||
generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl intel C89'
|
||||
install_packages: libssh-dev
|
||||
install_steps: pytest
|
||||
configure: CFLAGS=-std=gnu89 --with-openssl --with-libssh --enable-debug
|
||||
|
||||
- name: 'openssl arm C89'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libssh2-1-dev
|
||||
install_steps: pytest
|
||||
configure: CFLAGS=-std=gnu89 --with-openssl --with-libssh2 --enable-debug --disable-verbose
|
||||
|
||||
- name: 'openssl -O3 libssh valgrind 1'
|
||||
install_packages: libssh-dev valgrind
|
||||
CFLAGS: -O3
|
||||
tflags: '--min=950 1 to 1000'
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl -O3 libssh valgrind 2'
|
||||
install_packages: libssh-dev valgrind
|
||||
CFLAGS: -O3
|
||||
tflags: '--min=900 1001 to 9999'
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl clang krb5 openldap static'
|
||||
install_steps: openldap-static
|
||||
install_packages: libidn2-dev libkrb5-dev clang libssl-dev
|
||||
CC: clang
|
||||
configure: >-
|
||||
--enable-static --disable-shared --with-openssl --with-gssapi --enable-debug --disable-docs
|
||||
--disable-manual --with-ldap=/home/runner/openldap-static --with-ldap-lib=ldap --with-lber-lib=lber
|
||||
|
||||
- name: 'openssl clang krb5 LTO'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libssh2-1-dev libkrb5-dev clang
|
||||
install_steps: skiprun pytest
|
||||
CC: clang
|
||||
generate: -DCURL_USE_OPENSSL=ON -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LTO=ON
|
||||
|
||||
- name: 'openssl !ipv6 !--libcurl !--digest-auth'
|
||||
image: ubuntu-24.04-arm
|
||||
configure: --with-openssl --disable-ipv6 --enable-debug --disable-unity --disable-libcurl-option --disable-digest-auth --enable-ntlm
|
||||
|
||||
- name: 'curl_global_init_mem debug valgrind'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: valgrind
|
||||
tflags: '--min=1700'
|
||||
configure: >-
|
||||
--enable-init-mem-debug
|
||||
--with-openssl --disable-debug --enable-unity
|
||||
--enable-ntlm
|
||||
|
||||
- name: 'openssl https-only'
|
||||
image: ubuntu-24.04-arm
|
||||
tflags: '--min=1260'
|
||||
configure: >-
|
||||
--with-openssl --enable-debug --disable-unity
|
||||
--disable-dict --disable-gopher --disable-ldap --disable-telnet
|
||||
--disable-imap --disable-pop3 --disable-smtp
|
||||
--disable-rtsp
|
||||
--without-libssh2 --without-libssh
|
||||
--disable-tftp --disable-ftp --disable-file --disable-smb
|
||||
--enable-ntlm
|
||||
|
||||
- name: 'openssl torture 1'
|
||||
install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev
|
||||
tflags: '-t --shallow=25 --min=960 1 to 1000'
|
||||
torture: true
|
||||
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl torture 2'
|
||||
install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev
|
||||
tflags: '-t --shallow=25 --min=915 1001 to 9999'
|
||||
torture: true
|
||||
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'openssl i686'
|
||||
install_packages: gcc-14-i686-linux-gnu libssl-dev:i386 libssh2-1-dev:i386 libidn2-dev:i386 libc-ares-dev:i386 zlib1g-dev:i386
|
||||
CC: i686-linux-gnu-gcc-14
|
||||
LDFLAGS: -L/usr/lib/i386-linux-gnu
|
||||
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
configure: >-
|
||||
CPPFLAGS=-I/usr/include/i386-linux-gnu
|
||||
--host=i686-linux-gnu
|
||||
--with-openssl --with-libssh2 --with-libidn2 --enable-ares --enable-debug
|
||||
|
||||
- name: '!ssl !http !smtp !imap'
|
||||
image: ubuntu-24.04-arm
|
||||
tflags: '--min=500'
|
||||
configure: --without-ssl --enable-debug --disable-http --disable-smtp --disable-imap --disable-unity
|
||||
|
||||
- name: 'libressl Fil-C'
|
||||
install_steps: filc libressl-filc nghttp2-filc pytest
|
||||
tflags: '!776' # adds 1-9 minutes to the test run step, and fails consistently
|
||||
CC: /home/runner/filc/build/bin/filcc
|
||||
PKG_CONFIG_PATH: /home/runner/nghttp2/lib/pkgconfig
|
||||
generate: >-
|
||||
-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_TYPECHECK=ON
|
||||
-DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_LIBPSL=OFF
|
||||
-DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
|
||||
-DCURL_DISABLE_LDAP=ON -DUSE_LIBIDN2=OFF -DCURL_USE_LIBSSH2=OFF
|
||||
-DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'clang-tidy'
|
||||
install_packages: clang-20 clang-tidy-20 libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libkrb5-dev libgnutls28-dev
|
||||
install_steps: skiprun mbedtls-latest-intel rustls wolfssl-opensslextra-intel
|
||||
install_steps_brew: openssl@4 gsasl
|
||||
CC: clang-20
|
||||
LDFLAGS: >-
|
||||
-Wl,-rpath,/home/runner/wolfssl-opensslextra/lib
|
||||
-Wl,-rpath,/home/runner/mbedtls/lib
|
||||
-Wl,-rpath,/home/runner/rustls/lib
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl@4/lib
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/gsasl/lib
|
||||
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/runner/wolfssl-opensslextra/lib/pkgconfig:\
|
||||
/home/runner/mbedtls/lib/pkgconfig:\
|
||||
/home/runner/rustls/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/gsasl/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl@4
|
||||
-DCURL_USE_WOLFSSL=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON
|
||||
-DCURL_USE_GSASL=ON
|
||||
-DUSE_ECH=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON
|
||||
-DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20
|
||||
|
||||
- name: 'clang-tidy H3 c-ares !examples'
|
||||
install_packages: clang-20 clang-tidy-20 libidn2-dev libssh-dev libnghttp2-dev
|
||||
install_steps: skiprun
|
||||
install_steps_brew: libngtcp2 libnghttp3 c-ares
|
||||
CC: clang-20
|
||||
LDFLAGS: >-
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl/lib
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib
|
||||
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl -DUSE_NGTCP2=ON
|
||||
-DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_HTTPSRR=ON -DENABLE_ARES=ON
|
||||
-DCURL_DISABLE_VERBOSE_STRINGS=ON
|
||||
-DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20
|
||||
|
||||
- name: 'address-sanitizer'
|
||||
install_packages: clang-20 libssl-dev libssh-dev libidn2-dev libnghttp2-dev libubsan1 libasan8 libtsan2
|
||||
install_steps: pytest randcurl
|
||||
CC: clang-20
|
||||
CFLAGS: >-
|
||||
-fsanitize=address,bounds,leak,signed-integer-overflow,undefined
|
||||
-fno-sanitize-recover=address,bounds,leak,signed-integer-overflow,undefined
|
||||
-fPIC
|
||||
|
||||
LDFLAGS: >-
|
||||
-fsanitize=address,bounds,leak,signed-integer-overflow,undefined
|
||||
-fno-sanitize-recover=address,bounds,leak,signed-integer-overflow,undefined -ldl -lubsan
|
||||
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON
|
||||
|
||||
- name: 'address-sanitizer H3 c-ares'
|
||||
install_packages: clang-20 libubsan1 libasan8 libtsan2
|
||||
install_steps: pytest
|
||||
install_steps_brew: openssl@4 libssh2 libngtcp2 libnghttp3 c-ares
|
||||
CC: clang-20
|
||||
CFLAGS: >-
|
||||
-fsanitize=address,bounds,leak,signed-integer-overflow,undefined
|
||||
-fno-sanitize-recover=address,bounds,leak,signed-integer-overflow,undefined
|
||||
|
||||
LDFLAGS: >-
|
||||
-fsanitize=address,bounds,leak,signed-integer-overflow,undefined
|
||||
-fno-sanitize-recover=address,bounds,leak,signed-integer-overflow,undefined -ldl -lubsan
|
||||
-Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib
|
||||
|
||||
PKG_CONFIG_PATH: "\
|
||||
/home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\
|
||||
/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig"
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl@4 -DUSE_ECH=ON -DUSE_NGTCP2=ON
|
||||
-DUSE_SSLS_EXPORT=ON -DENABLE_ARES=ON
|
||||
|
||||
- name: 'thread-sanitizer'
|
||||
install_packages: clang-20 libtsan2
|
||||
install_steps: pytest openssl-tsan
|
||||
CC: clang-20
|
||||
CFLAGS: -fsanitize=thread -g
|
||||
LDFLAGS: -fsanitize=thread
|
||||
generate: -DOPENSSL_ROOT_DIR=/home/runner/openssl -DUSE_ECH=ON -DENABLE_DEBUG=ON
|
||||
|
||||
- name: 'memory-sanitizer'
|
||||
install_packages: clang-20
|
||||
install_steps: randcurl
|
||||
CC: clang-20
|
||||
CFLAGS: -fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g
|
||||
LDFLAGS: -fsanitize=memory
|
||||
LIBS: -ldl
|
||||
configure: --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug
|
||||
tflags: '--min=1540'
|
||||
|
||||
- name: 'event-based'
|
||||
install_packages: libssh-dev
|
||||
configure: --enable-debug --enable-static --disable-shared --disable-threaded-resolver --with-libssh --with-openssl --enable-ntlm
|
||||
tflags: '-n --test-event --min=1420'
|
||||
|
||||
- name: 'duphandle'
|
||||
image: ubuntu-24.04-arm
|
||||
install_packages: libssh-dev
|
||||
configure: --enable-debug --enable-static --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
|
||||
tflags: '-n --test-duphandle'
|
||||
|
||||
- name: 'rustls valgrind 1'
|
||||
install_packages: libnghttp2-dev libldap-dev valgrind
|
||||
install_steps: rust rustls
|
||||
tflags: '--min=820 1 to 1000'
|
||||
generate: -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DENABLE_DEBUG=ON
|
||||
|
||||
- name: 'rustls valgrind 2'
|
||||
install_packages: libnghttp2-dev libldap-dev valgrind
|
||||
install_steps: rust rustls
|
||||
tflags: '--min=830 1001 to 9999'
|
||||
generate: -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DENABLE_DEBUG=ON
|
||||
|
||||
- name: 'rustls'
|
||||
install_packages: libnghttp2-dev libldap-dev
|
||||
install_steps: rust rustls skiprun pytest
|
||||
configure: --with-rustls --enable-ech --enable-debug
|
||||
|
||||
- name: 'IntelC openssl'
|
||||
install_packages: libssl-dev
|
||||
install_steps: intelc
|
||||
CC: icc
|
||||
configure: --enable-debug --with-openssl
|
||||
|
||||
- name: 'Slackware !ssl gssapi gcc'
|
||||
# Flags used to build the curl Slackware package, except OpenSSL 1.1.0:
|
||||
# https://ftpmirror.infania.net/slackware/slackware64-current/source/n/curl/curl.SlackBuild
|
||||
configure: --enable-debug --without-ssl --with-libssh2 --with-gssapi --enable-ares --without-ca-bundle --with-ca-path=/etc/ssl/certs
|
||||
# Docker Hub image that `container-job` executes in
|
||||
container: 'andy5995/slackware-build-essential:15.0'
|
||||
|
||||
- name: 'Alpine MUSL https-rr'
|
||||
configure: --enable-debug --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl --enable-httpsrr --enable-ares --enable-threaded-resolver
|
||||
container: 'alpine:3.20'
|
||||
|
||||
- name: 'Alpine MUSL https-rr c-ares'
|
||||
configure: --enable-debug --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl --enable-httpsrr --enable-ares --disable-threaded-resolver
|
||||
container: 'alpine:3.20'
|
||||
|
||||
steps:
|
||||
- name: 'install prereqs'
|
||||
if: ${{ matrix.build.container == null && !contains(matrix.build.name, 'i686') }}
|
||||
timeout-minutes: 2
|
||||
env:
|
||||
INSTALL_PACKAGES_BREW: '${{ matrix.build.install_steps_brew }}'
|
||||
INSTALL_PACKAGES: >-
|
||||
${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'stunnel4' || '' }}
|
||||
${{ contains(matrix.build.install_steps, 'pytest') && 'apache2 apache2-dev libnghttp2-dev vsftpd dante-server' || '' }}
|
||||
|
||||
run: |
|
||||
ls -l /etc/apt/sources.list.d
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libtool autoconf automake pkgconf \
|
||||
libpsl-dev zlib1g-dev libbrotli-dev libzstd-dev \
|
||||
${INSTALL_PACKAGES} \
|
||||
${MATRIX_INSTALL_PACKAGES}
|
||||
if [ -n "${INSTALL_PACKAGES_BREW}" ]; then
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install ${INSTALL_PACKAGES_BREW}
|
||||
fi
|
||||
# Workaround for ubuntu-24.04-arm images having 0777 for /home/runner,
|
||||
# which breaks the test sshd server used in pytest.
|
||||
if [[ "$(uname -m)" = *'aarch64'* ]]; then
|
||||
ls -l /home
|
||||
chmod 0755 /home/runner
|
||||
fi
|
||||
|
||||
- name: 'install prereqs (i686)'
|
||||
if: ${{ contains(matrix.build.name, 'i686') }}
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install \
|
||||
libtool autoconf automake pkgconf stunnel4 \
|
||||
libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 \
|
||||
${MATRIX_INSTALL_PACKAGES}
|
||||
|
||||
- name: 'install prereqs (alpine)'
|
||||
if: ${{ startsWith(matrix.build.container, 'alpine') }}
|
||||
run: |
|
||||
apk add --no-cache build-base autoconf automake libtool perl openssl-dev \
|
||||
libssh2-dev zlib-dev brotli-dev zstd-dev libidn2-dev openldap-dev \
|
||||
krb5-dev libpsl-dev c-ares-dev \
|
||||
py3-impacket py3-asn1 py3-six py3-pycryptodomex \
|
||||
perl-time-hires openssh stunnel sudo git openssl
|
||||
|
||||
- name: 'install Fil-C'
|
||||
if: ${{ contains(matrix.build.install_steps, 'filc') }}
|
||||
run: |
|
||||
cd /home/runner
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/pizlonator/fil-c/releases/download/v${FIL_C_VERSION}/filc-${FIL_C_VERSION}-linux-x86_64.tar.xz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin && mv "filc-${FIL_C_VERSION}-linux-x86_64" filc
|
||||
cd filc
|
||||
./setup.sh
|
||||
|
||||
- name: 'cache libressl (c-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl-c-arm') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-libressl-c-arm
|
||||
env:
|
||||
cache-name: cache-libressl-c-arm
|
||||
with:
|
||||
path: ~/libressl
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
|
||||
|
||||
- name: 'build libressl (c-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl-c-arm') && steps.cache-libressl-c-arm.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "libressl-${LIBRESSL_VERSION}"
|
||||
cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl -DCURL_ENABLE_NTLM=ON
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache libressl (filc)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl-filc') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-libressl-filc
|
||||
env:
|
||||
cache-name: cache-libressl-filc
|
||||
with:
|
||||
path: ~/libressl
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}-${{ env.FIL_C_VERSION }}
|
||||
|
||||
- name: 'build libressl (filc)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl-filc') && steps.cache-libressl-filc.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "libressl-${LIBRESSL_VERSION}"
|
||||
cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl \
|
||||
-DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc -DENABLE_ASM=OFF
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache nghttp2 (filc)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-nghttp2-filc
|
||||
env:
|
||||
cache-name: cache-nghttp2-filc
|
||||
with:
|
||||
path: ~/nghttp2
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.FIL_C_VERSION }}
|
||||
|
||||
- name: 'build nghttp2 (filc)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') && steps.cache-nghttp2-filc.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2_VERSION}/nghttp2-${NGHTTP2_VERSION}.tar.xz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin
|
||||
cd "nghttp2-${NGHTTP2_VERSION}"
|
||||
cmake -B . -G Ninja -DENABLE_LIB_ONLY=ON -DBUILD_TESTING=OFF -DENABLE_DOC=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/nghttp2 \
|
||||
-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache wolfssl (all-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-all-arm') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-wolfssl-all-arm
|
||||
env:
|
||||
cache-name: cache-wolfssl-all-arm
|
||||
with:
|
||||
path: ~/wolfssl-all
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
|
||||
|
||||
- name: 'build wolfssl (all-arm)' # does not support `OPENSSL_COEXIST`
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-all-arm') && steps.cache-wolfssl-all-arm.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "wolfssl-${WOLFSSL_VERSION}-stable"
|
||||
./autogen.sh
|
||||
./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-all --enable-tls13 --enable-harden --enable-all \
|
||||
--disable-benchmark --disable-crypttests --disable-examples
|
||||
make install
|
||||
|
||||
- name: 'cache wolfssl (opensslextra-intel)' # does support `OPENSSL_COEXIST`
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-intel') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-wolfssl-opensslextra-intel
|
||||
env:
|
||||
cache-name: cache-wolfssl-opensslextra-intel
|
||||
with:
|
||||
path: ~/wolfssl-opensslextra
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
|
||||
|
||||
- name: 'build wolfssl (opensslextra-intel)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-intel') && steps.cache-wolfssl-opensslextra-intel.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "wolfssl-${WOLFSSL_VERSION}-stable"
|
||||
./autogen.sh
|
||||
./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-opensslextra --enable-tls13 --enable-harden --enable-ech --enable-opensslextra \
|
||||
--disable-benchmark --disable-crypttests --disable-examples
|
||||
make install
|
||||
|
||||
- name: 'cache wolfssl (opensslextra-arm)' # does support `OPENSSL_COEXIST`
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-arm') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-wolfssl-opensslextra-arm
|
||||
env:
|
||||
cache-name: cache-wolfssl-opensslextra-arm
|
||||
with:
|
||||
path: ~/wolfssl-opensslextra
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
|
||||
|
||||
- name: 'build wolfssl (opensslextra-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-arm') && steps.cache-wolfssl-opensslextra-arm.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "wolfssl-${WOLFSSL_VERSION}-stable"
|
||||
./autogen.sh
|
||||
./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-opensslextra --enable-tls13 --enable-harden --enable-ech --enable-opensslextra \
|
||||
--disable-benchmark --disable-crypttests --disable-examples
|
||||
make install
|
||||
|
||||
- name: 'cache mbedtls (latest-intel)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-intel') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-mbedtls-latest-intel
|
||||
env:
|
||||
cache-name: cache-mbedtls-latest-intel
|
||||
with:
|
||||
path: ~/mbedtls
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_VERSION }}
|
||||
|
||||
- name: 'build mbedtls (latest-intel)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-intel') && steps.cache-mbedtls-latest-intel.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_VERSION}/mbedtls-${MBEDTLS_VERSION}.tar.bz2" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xjf pkg.bin && rm -f pkg.bin
|
||||
cd "mbedtls-${MBEDTLS_VERSION}"
|
||||
./scripts/config.py set MBEDTLS_THREADING_C
|
||||
./scripts/config.py set MBEDTLS_THREADING_PTHREAD
|
||||
cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls \
|
||||
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache mbedtls (latest-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-arm') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-mbedtls-latest-arm
|
||||
env:
|
||||
cache-name: cache-mbedtls-latest-arm
|
||||
with:
|
||||
path: ~/mbedtls
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_VERSION }}
|
||||
|
||||
- name: 'build mbedtls (latest-arm)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-arm') && steps.cache-mbedtls-latest-arm.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_VERSION}/mbedtls-${MBEDTLS_VERSION}.tar.bz2" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xjf pkg.bin && rm -f pkg.bin
|
||||
cd "mbedtls-${MBEDTLS_VERSION}"
|
||||
./scripts/config.py set MBEDTLS_THREADING_C
|
||||
./scripts/config.py set MBEDTLS_THREADING_PTHREAD
|
||||
cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls \
|
||||
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache mbedtls (prev)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-prev') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-mbedtls-prev
|
||||
env:
|
||||
cache-name: cache-mbedtls-prev
|
||||
with:
|
||||
path: ~/mbedtls-prev
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_PREV_VERSION }}
|
||||
|
||||
- name: 'build mbedtls (prev)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'mbedtls-prev') && steps.cache-mbedtls-prev.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_PREV_VERSION}/mbedtls-${MBEDTLS_PREV_VERSION}.tar.bz2" --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${MBEDTLS_PREV_SHA256}" && tar -xjf pkg.bin && rm -f pkg.bin
|
||||
cd "mbedtls-${MBEDTLS_PREV_VERSION}"
|
||||
./scripts/config.py set MBEDTLS_THREADING_C
|
||||
./scripts/config.py set MBEDTLS_THREADING_PTHREAD
|
||||
cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls-prev \
|
||||
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache openldap (static)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'openldap-static') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openldap-static
|
||||
env:
|
||||
cache-name: cache-openldap-static
|
||||
with:
|
||||
path: ~/openldap-static
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENLDAP_VERSION }}
|
||||
|
||||
- name: 'build openldap (static)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'openldap-static') && steps.cache-openldap-static.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-${OPENLDAP_VERSION}.tgz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "openldap-${OPENLDAP_VERSION}"
|
||||
autoreconf -fi
|
||||
./configure --prefix=/home/runner/openldap-static --enable-static --disable-shared --disable-slapd
|
||||
make install
|
||||
|
||||
- name: 'cache openssl (thread sanitizer)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-openssl-tsan
|
||||
env:
|
||||
cache-name: cache-openssl-tsan
|
||||
with:
|
||||
path: ~/openssl
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }}
|
||||
|
||||
- name: 'build openssl (thread sanitizer)'
|
||||
if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') && steps.cache-openssl-tsan.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
git clone --quiet --depth 1 --branch "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
|
||||
cd openssl
|
||||
CC=clang CFLAGS='-fsanitize=thread' LDFLAGS='-fsanitize=thread' ./config --prefix=/home/runner/openssl --libdir=lib no-makedepend no-apps no-docs no-tests
|
||||
make
|
||||
make -j1 install_sw
|
||||
|
||||
- name: 'cache awslc'
|
||||
if: ${{ contains(matrix.build.install_steps, 'awslc') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-awslc
|
||||
env:
|
||||
cache-name: cache-awslc
|
||||
with:
|
||||
path: ~/awslc
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }}
|
||||
|
||||
- name: 'build awslc'
|
||||
if: ${{ contains(matrix.build.install_steps, 'awslc') && steps.cache-awslc.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/awslabs/aws-lc/archive/refs/tags/v${AWSLC_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "aws-lc-${AWSLC_VERSION}"
|
||||
cmake -B . -G Ninja -DCMAKE_INSTALL_PREFIX=/home/runner/awslc -DBUILD_TOOL=OFF -DBUILD_TESTING=OFF
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache boringssl'
|
||||
if: ${{ contains(matrix.build.install_steps, 'boringssl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-boringssl
|
||||
env:
|
||||
cache-name: cache-boringssl
|
||||
with:
|
||||
path: ~/boringssl
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }}
|
||||
|
||||
- name: 'build boringssl'
|
||||
if: ${{ contains(matrix.build.install_steps, 'boringssl') && steps.cache-boringssl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
mkdir boringssl-src
|
||||
cd boringssl-src
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
"https://boringssl.googlesource.com/boringssl/+archive/${BORINGSSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cmake -B . -G Ninja -DCMAKE_INSTALL_PREFIX=/home/runner/boringssl -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
- name: 'cache rustls'
|
||||
if: ${{ contains(matrix.build.install_steps, 'rustls') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-rustls
|
||||
env:
|
||||
cache-name: cache-rustls
|
||||
with:
|
||||
path: ~/rustls
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.RUSTLS_VERSION }}
|
||||
|
||||
- name: 'fetch rustls deb'
|
||||
if: ${{ contains(matrix.build.install_steps, 'rustls') && steps.cache-rustls.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--location "https://github.com/rustls/rustls-ffi/releases/download/v${RUSTLS_VERSION}/librustls_${RUSTLS_VERSION}_amd64.deb.zip" --output pkg.bin
|
||||
sha256sum pkg.bin && unzip pkg.bin -d rustls && rm -f pkg.bin
|
||||
|
||||
- name: 'build rustls'
|
||||
# Note: we do not check cache-hit here. If the cache is hit, we need to dpkg install the deb.
|
||||
if: ${{ contains(matrix.build.install_steps, 'rustls') }}
|
||||
run: sudo dpkg -i ~/rustls/"librustls_${RUSTLS_VERSION}_amd64.deb"
|
||||
|
||||
- name: 'install Intel compilers'
|
||||
if: ${{ contains(matrix.build.install_steps, 'intelc') }}
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
|
||||
--compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
|
||||
sudo tee /etc/apt/trusted.gpg.d/intel-sw.asc >/dev/null
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo add-apt-repository 'deb https://apt.repos.intel.com/oneapi all main'
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
printenv >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build.configure }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
env:
|
||||
CC: '${{ matrix.build.CC }}'
|
||||
CFLAGS: '${{ matrix.build.CFLAGS }}'
|
||||
LDFLAGS: '${{ matrix.build.LDFLAGS }}'
|
||||
LIBS: '${{ matrix.build.LIBS }}'
|
||||
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
|
||||
MATRIX_GENERATE: '${{ matrix.build.generate }}'
|
||||
MATRIX_PKG_CONFIG_PATH: '${{ matrix.build.PKG_CONFIG_PATH }}'
|
||||
run: |
|
||||
[[ "${MATRIX_INSTALL_STEPS}" = *'awslc'* ]] && sudo apt-get -o Dpkg::Use-Pty=0 purge libssl-dev
|
||||
[ -n "${MATRIX_PKG_CONFIG_PATH}" ] && export PKG_CONFIG_PATH="${MATRIX_PKG_CONFIG_PATH}"
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake -B bld -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
||||
-DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \
|
||||
${MATRIX_GENERATE}
|
||||
else
|
||||
mkdir bld && cd bld && \
|
||||
../configure --prefix="$HOME"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
${MATRIX_CONFIGURE}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'single-use function check'
|
||||
if: ${{ (contains(matrix.build.configure, '--disable-unity') || contains(matrix.build.generate, '-DCMAKE_UNITY_BUILD=OFF')) && !contains(matrix.build.install_steps, 'filc') }}
|
||||
run: |
|
||||
git config --global --add safe.directory "*"
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
libcurla=bld/lib/libcurl.a
|
||||
else
|
||||
libcurla=bld/lib/.libs/libcurl.a
|
||||
fi
|
||||
./scripts/singleuse.pl --unit "${libcurla}"
|
||||
|
||||
- name: 'curl -V'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
||||
bld/src/curl --disable -V
|
||||
|
||||
- name: 'curl install'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --install bld --strip
|
||||
else
|
||||
make -C bld V=1 install
|
||||
fi
|
||||
|
||||
- name: 'build tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') }}
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target testdeps
|
||||
else
|
||||
make -C bld V=1 -C tests
|
||||
fi
|
||||
|
||||
- name: 'install test prereqs'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && matrix.build.container == null }}
|
||||
run: |
|
||||
python3 -m venv ~/venv
|
||||
if bld/src/curl --disable -V 2>/dev/null | grep smb; then
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt
|
||||
fi
|
||||
|
||||
- name: 'run tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 20 || 10 }}
|
||||
env:
|
||||
TEST_TARGET: ${{ matrix.build.torture && 'test-torture' || 'test-ci' }}
|
||||
TFLAGS: '${{ matrix.build.tflags }}'
|
||||
run: |
|
||||
if [ "${TEST_TARGET}" = 'test-ci' ] && [[ "${MATRIX_INSTALL_PACKAGES}" = *'valgrind'* ]]; then
|
||||
TFLAGS+=' -j6'
|
||||
TFLAGS+=' !776' # skip long-running flaky test
|
||||
if [[ "${MATRIX_INSTALL_PACKAGES}" = *'libgss-dev'* ]]; then
|
||||
TFLAGS+=' ~2077 ~2078' # memory leaks from Curl_auth_decode_spnego_message() -> gss_init_sec_context()
|
||||
fi
|
||||
elif [ "${TEST_TARGET}" != 'test-ci' ]; then
|
||||
TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture
|
||||
fi
|
||||
[ -f ~/venv/bin/activate ] && source ~/venv/bin/activate
|
||||
if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then
|
||||
locale || true
|
||||
export LC_ALL=C
|
||||
export LC_CTYPE=C
|
||||
export LC_NUMERIC=fr_FR.UTF-8
|
||||
fi
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target "${TEST_TARGET}"
|
||||
else
|
||||
make -C bld V=1 "${TEST_TARGET}"
|
||||
fi
|
||||
|
||||
- name: 'install pytest prereqs'
|
||||
if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
||||
run: |
|
||||
[ -d ~/venv ] || python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt
|
||||
|
||||
- name: 'run pytest'
|
||||
if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
||||
env:
|
||||
PYTEST_ADDOPTS: '--color=yes'
|
||||
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
|
||||
run: |
|
||||
[ -f ~/venv/bin/activate ] && source ~/venv/bin/activate
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target curl-pytest-ci
|
||||
else
|
||||
make -C bld V=1 pytest-ci
|
||||
fi
|
||||
|
||||
- name: 'randcurl'
|
||||
if: ${{ contains(matrix.build.install_steps, 'randcurl') }}
|
||||
run: |
|
||||
mkdir run
|
||||
cd run
|
||||
../.github/scripts/randcurl.pl 60 ../bld/src/curl
|
||||
|
||||
- name: 'build examples'
|
||||
if: ${{ !contains(matrix.build.install_packages, 'valgrind') && !contains(matrix.build.name, '!examples') }}
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target curl-examples-build
|
||||
else
|
||||
make -C bld V=1 examples
|
||||
fi
|
||||
+771
@@ -0,0 +1,771 @@
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'macOS'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
# Apple APIs and the macos-version-min value required to avoid deprecation
|
||||
# warnings with llvm/clang, and/or the feature getting enabled at build-time
|
||||
# or runtime:
|
||||
#
|
||||
# - 10.7 Lion (2011) - GSS (build-time, deprecated MIT Kerberos shim)
|
||||
# - 10.9 Mavericks (2013) - LDAP (build-time, deprecated), OCSP (runtime)
|
||||
# - 10.11 El Capitan (2015) - connectx() (runtime)
|
||||
# - 10.12 Sierra (2016) - clock_gettime() (build-time, runtime)
|
||||
# - 10.14 Mojave (2018) - SecTrustEvaluateWithError() (runtime)
|
||||
|
||||
env:
|
||||
CURL_CI: github
|
||||
CURL_TEST_MIN: 1750
|
||||
DO_NOT_TRACK: '1'
|
||||
MAKEFLAGS: -j 4
|
||||
LDFLAGS: -w # suppress 'object file was built for newer macOS version than being linked' warnings
|
||||
|
||||
jobs:
|
||||
ios:
|
||||
name: "iOS, ${{ (matrix.build.generator && format('CM-{0}', matrix.build.generator)) || (matrix.build.generate && 'CM' || 'AM' )}} ${{ matrix.build.name }} arm64"
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
|
||||
CC: 'clang'
|
||||
LDFLAGS: ''
|
||||
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
|
||||
MATRIX_OPTIONS: ${{ matrix.build.options }}
|
||||
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
|
||||
LIBRESSL_VERSION: 4.3.1
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build:
|
||||
- name: 'libressl'
|
||||
install_steps: libressl
|
||||
configure: --with-openssl=/Users/runner/libressl --without-libpsl
|
||||
|
||||
- name: 'libressl'
|
||||
install_steps: libressl
|
||||
# FIXME: Could not make OPENSSL_ROOT_DIR work. CMake seems to prepend sysroot to it.
|
||||
generator: Xcode
|
||||
xcode: '' # default Xcode. Set it once to silence actionlint.
|
||||
options: --config Debug
|
||||
generate: >-
|
||||
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=OFF
|
||||
-DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl
|
||||
-DOPENSSL_INCLUDE_DIR=/Users/runner/libressl/include
|
||||
-DOPENSSL_SSL_LIBRARY=/Users/runner/libressl/lib/libssl.a
|
||||
-DOPENSSL_CRYPTO_LIBRARY=/Users/runner/libressl/lib/libcrypto.a
|
||||
-DCURL_USE_LIBPSL=OFF -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
steps:
|
||||
- name: 'brew install'
|
||||
if: ${{ matrix.build.configure }}
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
# shellcheck disable=SC2181
|
||||
while [[ $? == 0 ]]; do
|
||||
for i in 1 2 3; do
|
||||
if brew update && brew install automake libtool; then
|
||||
break 2
|
||||
else
|
||||
echo "Error: wait to try again: $i"
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
false Too many retries
|
||||
done
|
||||
|
||||
- name: 'toolchain versions'
|
||||
run: |
|
||||
command -v "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcodebuild -sdk -version | grep '^Path:' || true
|
||||
xcrun --sdk iphoneos --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk iphoneos --show-sdk-version || true
|
||||
echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::'
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
|
||||
|
||||
- name: 'cache libressl'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl') }}
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-libressl
|
||||
env:
|
||||
cache-name: cache-libressl
|
||||
with:
|
||||
path: ~/libressl
|
||||
key: iOS-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
|
||||
|
||||
- name: 'build libressl'
|
||||
if: ${{ contains(matrix.build.install_steps, 'libressl') && steps.cache-libressl.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
--location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin
|
||||
sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
|
||||
cd "libressl-${LIBRESSL_VERSION}"
|
||||
cmake -B . -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX=/Users/runner/libressl \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DLIBRESSL_APPS=OFF \
|
||||
-DLIBRESSL_TESTS=OFF
|
||||
cmake --build .
|
||||
cmake --install . --verbose
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build.configure }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
env:
|
||||
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
|
||||
MATRIX_GENERATE: '${{ matrix.build.generate }}'
|
||||
MATRIX_GENERATOR: '${{ matrix.build.generator }}'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos
|
||||
[ -n "${MATRIX_GENERATOR}" ] && options="-G ${MATRIX_GENERATOR}"
|
||||
cmake -B bld -G Ninja -D_CURL_PREFILL=ON \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DUSE_APPLE_IDN=ON \
|
||||
${MATRIX_GENERATE} ${options}
|
||||
else
|
||||
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
CFLAGS="-isysroot $(xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)" \
|
||||
--host=aarch64-apple-darwin \
|
||||
--with-apple-idn \
|
||||
${MATRIX_CONFIGURE}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'curl info'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' --
|
||||
|
||||
- name: 'build tests'
|
||||
if: ${{ matrix.build.generate }} # skip for autotools to save time
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target testdeps --verbose
|
||||
else
|
||||
make -C bld V=1 -C tests
|
||||
fi
|
||||
|
||||
- name: 'build examples'
|
||||
if: ${{ matrix.build.generate }} # skip for autotools to save time
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target curl-examples-build --verbose
|
||||
else
|
||||
make -C bld examples V=1
|
||||
fi
|
||||
|
||||
macos:
|
||||
name: "${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.compiler }} ${{ matrix.build.name }}"
|
||||
runs-on: ${{ matrix.build.image || 'macos-15' }}
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
|
||||
CC: '${{ matrix.build.compiler }}'
|
||||
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
|
||||
MATRIX_COMPILER: '${{ matrix.build.compiler }}'
|
||||
MATRIX_INSTALL: '${{ matrix.build.install }}'
|
||||
MATRIX_INSTALL_STEPS: '${{ matrix.build.install_steps }}'
|
||||
MATRIX_MACOS_VERSION_MIN: '${{ matrix.build.macos-version-min }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build:
|
||||
- name: '!ssl !debug brotli zstd'
|
||||
compiler: gcc-13
|
||||
configure: --without-ssl --with-brotli --with-zstd --with-apple-idn
|
||||
tflags: '--min=1520'
|
||||
xcode: '' # default Xcode. Set it once to silence actionlint.
|
||||
|
||||
- name: '!ssl libssh2 AppleIDN'
|
||||
compiler: clang
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH2=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_SSL=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
|
||||
tflags: '--min=1630'
|
||||
|
||||
- name: 'OpenSSL libssh c-ares'
|
||||
compiler: clang
|
||||
install: openssl@4 libssh
|
||||
configure: --enable-debug --with-libssh --with-openssl=/opt/homebrew/opt/openssl@4 --enable-ech --enable-ares --with-fish-functions-dir --with-zsh-functions-dir
|
||||
|
||||
- name: 'OpenSSL libssh'
|
||||
compiler: llvm@18
|
||||
install: libssh libnghttp3
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
|
||||
|
||||
- name: '!ssl HTTP-only c-ares'
|
||||
macos-version-min: '10.15' # Catalina (2019)
|
||||
compiler: clang
|
||||
tflags: '--min=960'
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DENABLE_ARES=ON
|
||||
-DCURL_ENABLE_SSL=OFF -DHTTP_ONLY=ON
|
||||
-DCURL_DISABLE_ALTSVC=ON -DENABLE_UNIX_SOCKETS=OFF
|
||||
-DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_NGHTTP2=OFF
|
||||
-DCURL_USE_GSSAPI=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF
|
||||
-DCURL_BROTLI=OFF -DCURL_ZLIB=OFF -DCURL_ZSTD=OFF
|
||||
-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
- name: 'LibreSSL !ldap +examples'
|
||||
compiler: clang
|
||||
install: libressl
|
||||
install_steps: pytest
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
|
||||
-DCURL_USE_LIBSSH2=OFF -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'OpenSSL 10.15 C89'
|
||||
macos-version-min: '10.15'
|
||||
compiler: clang
|
||||
install: libnghttp3 libngtcp2
|
||||
install_steps: pytest
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF
|
||||
-DCMAKE_C_STANDARD=90 -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'OpenSSL SecTrust'
|
||||
compiler: clang
|
||||
install: libnghttp3 libngtcp2
|
||||
install_steps: pytest
|
||||
configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl --with-ngtcp2 --with-apple-sectrust --enable-ntlm
|
||||
|
||||
- name: 'OpenSSL event-based'
|
||||
compiler: clang
|
||||
generate: -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_ENABLE_NTLM=ON
|
||||
tflags: '--test-event --min=1400'
|
||||
|
||||
- name: 'OpenSSL gsasl AppleIDN SecTrust +examples'
|
||||
compiler: clang
|
||||
install: openssl@4 libnghttp3 libngtcp2 gsasl
|
||||
generate: >-
|
||||
-DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON -DCURL_USE_GSASL=ON -DUSE_APPLE_IDN=ON -DUSE_NGTCP2=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON
|
||||
-DUSE_APPLE_SECTRUST=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'MultiSSL AppleIDN clang-tidy +examples'
|
||||
image: macos-26
|
||||
compiler: clang
|
||||
install: llvm gnutls nettle libressl krb5 mbedtls gsasl rustls-ffi libssh fish
|
||||
install_steps: skiprun
|
||||
chkprefill: _chkprefill
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DEFAULT_SSL_BACKEND=openssl
|
||||
-DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DENABLE_ARES=ON -DCURL_USE_GSASL=ON
|
||||
-DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_APPLE_IDN=ON -DUSE_SSLS_EXPORT=ON
|
||||
-DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
|
||||
-DCURL_BROTLI=ON -DCURL_ZSTD=ON
|
||||
-DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy
|
||||
-DCURL_COMPLETION_FISH=ON -DCURL_COMPLETION_ZSH=ON
|
||||
-DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'HTTP/3 clang-tidy'
|
||||
image: macos-26
|
||||
compiler: clang
|
||||
install: llvm libnghttp3 libngtcp2 openldap krb5
|
||||
install_steps: skipall
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON
|
||||
-DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include
|
||||
-DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib
|
||||
-DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib
|
||||
-DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
|
||||
-DCURL_BROTLI=ON -DCURL_ZSTD=ON
|
||||
-DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy
|
||||
-DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'LibreSSL openldap krb5 c-ares +examples'
|
||||
compiler: clang
|
||||
install: libressl krb5 openldap
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON
|
||||
-DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
|
||||
-DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include
|
||||
-DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib
|
||||
-DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib
|
||||
|
||||
- name: 'wolfSSL !ldap brotli zstd'
|
||||
compiler: clang
|
||||
install: brotli wolfssl zstd
|
||||
install_steps: pytest
|
||||
generate: -DCURL_USE_WOLFSSL=ON -DCURL_DISABLE_LDAP=ON -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'mbedTLS !ldap brotli zstd MultiSSL AppleIDN'
|
||||
compiler: llvm@18
|
||||
install: brotli mbedtls zstd
|
||||
install_steps: codeset-test
|
||||
generate: -DCURL_USE_MBEDTLS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls -DCURL_USE_OPENSSL=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'GnuTLS !ldap krb5 +examples'
|
||||
compiler: clang
|
||||
install: gnutls nettle krb5
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF
|
||||
-DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
|
||||
-DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_ENABLE_NTLM=ON
|
||||
|
||||
- name: 'aws-lc +analyzer'
|
||||
compiler: gcc-15
|
||||
install: aws-lc
|
||||
generate: >-
|
||||
-DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DUSE_ECH=ON
|
||||
-DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_GCC_ANALYZER=ON
|
||||
|
||||
- name: 'Rustls'
|
||||
compiler: clang
|
||||
install: rustls-ffi
|
||||
generate: -DENABLE_DEBUG=ON -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DCURL_DISABLE_LDAP=ON -DCURL_ENABLE_NTLM=ON
|
||||
tflags: '--min=1730'
|
||||
|
||||
- name: 'OpenSSL torture 1'
|
||||
compiler: clang
|
||||
install: openssl@4 libnghttp3
|
||||
install_steps: torture
|
||||
generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON
|
||||
tflags: '-t --shallow=25 --min=480 1 to 500'
|
||||
|
||||
- name: 'OpenSSL torture 2'
|
||||
compiler: clang
|
||||
install: openssl@4 libnghttp3
|
||||
install_steps: torture
|
||||
generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON
|
||||
tflags: '-t --shallow=25 --min=730 501 to 1250'
|
||||
|
||||
- name: 'OpenSSL torture 3'
|
||||
compiler: clang
|
||||
install: openssl@4 libnghttp3
|
||||
install_steps: torture
|
||||
generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON
|
||||
tflags: '-t --shallow=25 --min=628 1251 to 9999'
|
||||
|
||||
steps:
|
||||
- name: 'brew unlink openssl'
|
||||
if: ${{ contains(matrix.build.install, 'aws-lc') || contains(matrix.build.install, 'libressl') || contains(matrix.build.install, 'openssl@4') }}
|
||||
run: |
|
||||
if [ -d "$(brew --prefix)"/include/openssl ]; then
|
||||
brew unlink openssl
|
||||
fi
|
||||
|
||||
- name: 'brew install'
|
||||
timeout-minutes: 5
|
||||
# Run this command with retries because of spurious failures seen
|
||||
# while running the tests, for example
|
||||
# https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
|
||||
env:
|
||||
INSTALL_PACKAGES: >-
|
||||
${{ matrix.build.generate && 'ninja' || 'automake libtool' }}
|
||||
${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'nghttp2 stunnel' || '' }}
|
||||
${{ contains(matrix.build.install_steps, 'pytest') && 'caddy httpd vsftpd' || '' }}
|
||||
|
||||
run: |
|
||||
# shellcheck disable=SC2181
|
||||
while [[ $? == 0 ]]; do
|
||||
for i in 1 2 3; do
|
||||
if brew update && brew install pkgconf libpsl libssh2 ${INSTALL_PACKAGES} ${MATRIX_INSTALL}; then
|
||||
break 2
|
||||
else
|
||||
echo "Error: wait to try again: $i"
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
false Too many retries
|
||||
done
|
||||
|
||||
- name: 'toolchain versions'
|
||||
run: |
|
||||
[[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
|
||||
[[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot
|
||||
command -v "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-version || true
|
||||
ls -l /Library/Developer/CommandLineTools/SDKs || true
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build.configure }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
env:
|
||||
MATRIX_CHKPREFILL: '${{ matrix.build.chkprefill }}'
|
||||
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
|
||||
MATRIX_GENERATE: '${{ matrix.build.generate }}'
|
||||
run: |
|
||||
if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then
|
||||
sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for
|
||||
else
|
||||
sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
fi
|
||||
|
||||
if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
|
||||
CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
|
||||
CC+=" --sysroot=${sysroot}"
|
||||
CC+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
for _chkprefill in '' ${MATRIX_CHKPREFILL}; do
|
||||
options=''
|
||||
[ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}"
|
||||
[[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' -DVSFTPD=NO' # Skip ~20 tests that stretch run time by 7x on macOS
|
||||
[ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF'
|
||||
cmake -B "bld${_chkprefill}" -G Ninja -D_CURL_PREFILL=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \
|
||||
${MATRIX_GENERATE} ${options}
|
||||
done
|
||||
if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then
|
||||
echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::'
|
||||
false
|
||||
fi
|
||||
else
|
||||
export CFLAGS
|
||||
if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
|
||||
options+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
if [ "${MATRIX_COMPILER}" != 'clang' ]; then
|
||||
options+=" --with-sysroot=${sysroot}"
|
||||
CFLAGS+=" --sysroot=${sysroot}"
|
||||
fi
|
||||
[ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}"
|
||||
[[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' --with-test-vsftpd=no' # Skip ~20 tests that stretch run time by 7x on macOS
|
||||
mkdir bld && cd bld && ../configure --prefix="$PWD"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
--with-libpsl="$(brew --prefix libpsl)" \
|
||||
${MATRIX_CONFIGURE} ${options}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'curl -V'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' --
|
||||
bld/src/curl --disable --version
|
||||
|
||||
- name: 'curl install'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --install bld --strip
|
||||
else
|
||||
make -C bld V=1 install
|
||||
fi
|
||||
|
||||
- name: 'build tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') }}
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target testdeps
|
||||
else
|
||||
make -C bld V=1 -C tests
|
||||
fi
|
||||
|
||||
- name: 'install test prereqs'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
run: |
|
||||
python3 -m venv ~/venv
|
||||
if bld/src/curl --disable -V 2>/dev/null | grep smb; then
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt
|
||||
fi
|
||||
|
||||
- name: 'run tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
timeout-minutes: ${{ contains(matrix.build.install_steps, 'torture') && 20 || 10 }}
|
||||
env:
|
||||
TEST_TARGET: ${{ contains(matrix.build.install_steps, 'torture') && 'test-torture' || 'test-ci' }}
|
||||
TFLAGS: '${{ matrix.build.tflags }}'
|
||||
run: |
|
||||
TFLAGS="-j20 ${TFLAGS}"
|
||||
if [ "${TEST_TARGET}" != 'test-ci' ]; then
|
||||
TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture
|
||||
fi
|
||||
source ~/venv/bin/activate
|
||||
if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then
|
||||
locale || true
|
||||
export LC_ALL=C
|
||||
export LC_CTYPE=C
|
||||
export LC_NUMERIC=fr_FR.UTF-8
|
||||
fi
|
||||
rm -f ~/.curlrc
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target "${TEST_TARGET}"
|
||||
else
|
||||
make -C bld V=1 "${TEST_TARGET}"
|
||||
fi
|
||||
|
||||
- name: 'install pytest prereqs'
|
||||
if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
||||
run: |
|
||||
[ -d ~/venv ] || python3 -m venv ~/venv
|
||||
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt
|
||||
|
||||
- name: 'run pytest'
|
||||
if: ${{ contains(matrix.build.install_steps, 'pytest') }}
|
||||
env:
|
||||
PYTEST_ADDOPTS: '--color=yes'
|
||||
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
|
||||
run: |
|
||||
source ~/venv/bin/activate
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target curl-pytest-ci
|
||||
else
|
||||
make -C bld V=1 pytest-ci
|
||||
fi
|
||||
|
||||
- name: 'build examples'
|
||||
if: ${{ contains(matrix.build.name, '+examples') }}
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose --target curl-examples-build
|
||||
else
|
||||
make -C bld examples V=1
|
||||
fi
|
||||
|
||||
combinations: # Test buildability with host OS, Xcode / SDK, compiler, target-OS, built tool, combinations
|
||||
name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }}"
|
||||
runs-on: ${{ matrix.image }}
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.xcode && format('_{0}', matrix.xcode) || '' }}.app/Contents/Developer"
|
||||
CC: '${{ matrix.compiler }}'
|
||||
MATRIX_BUILD: '${{ matrix.build }}'
|
||||
MATRIX_COMPILER: '${{ matrix.compiler }}'
|
||||
MATRIX_IMAGE: '${{ matrix.image }}'
|
||||
MATRIX_MACOS_VERSION_MIN: '${{ matrix.macos-version-min }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Sources:
|
||||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
|
||||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
|
||||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
||||
compiler: [gcc-13, gcc-14, gcc-15, llvm@15, llvm@18, llvm@20, clang]
|
||||
# Xcode support matrix as of 2025-10, with default macOS SDK versions and OS names, years:
|
||||
# * = default Xcode on the runner.
|
||||
# macos-14: 15.0.1, 15.1, 15.2, 15.3,*15.4
|
||||
# macos-15: 16.0, 16.1, 16.2, 16.3,*16.4, 26.0
|
||||
# macos-26: 16.4 *26.0
|
||||
# macOSSDK: 14.0, 14.2, 14.2, 14.4, 14.5, 15.0, 15.1, 15.2, 15.4, 15.5, 26.0
|
||||
# Sonoma (2023) Sequoia (2024) Tahoe (2025)
|
||||
# https://github.com/actions/runner-images/tree/main/images/macos
|
||||
# https://en.wikipedia.org/wiki/MacOS_version_history
|
||||
image: [macos-14, macos-15, macos-26]
|
||||
xcode: [''] # default Xcodes
|
||||
macos-version-min: ['']
|
||||
build: [autotools, cmake]
|
||||
exclude:
|
||||
# Combinations not covered by runner images:
|
||||
- { image: macos-14, compiler: 'llvm@18' }
|
||||
- { image: macos-14, compiler: 'llvm@20' }
|
||||
- { image: macos-15, compiler: 'llvm@15' }
|
||||
- { image: macos-15, compiler: 'llvm@20' }
|
||||
- { image: macos-26, compiler: 'llvm@15' }
|
||||
- { image: macos-26, compiler: 'llvm@18' }
|
||||
# Covered by the main workflow
|
||||
- { image: macos-15, compiler: 'gcc-13' }
|
||||
- { image: macos-15, compiler: 'llvm@18' }
|
||||
- { image: macos-15, compiler: 'clang' }
|
||||
# Reduce build combinations, by dropping less interesting ones
|
||||
- { image: macos-26, compiler: 'gcc-13' }
|
||||
- { compiler: 'gcc-14' , build: cmake }
|
||||
# Reduce autotools to just one job that is also build with cmake
|
||||
- { compiler: 'gcc-13' , build: autotools }
|
||||
- { compiler: 'gcc-14' , build: autotools }
|
||||
- { compiler: 'gcc-15' , build: autotools }
|
||||
- { compiler: 'llvm@15', build: autotools }
|
||||
- { compiler: 'llvm@18', build: autotools }
|
||||
- { compiler: 'llvm@20', build: autotools }
|
||||
- { image: macos-14, build: autotools }
|
||||
- { image: macos-15, build: autotools }
|
||||
steps:
|
||||
- name: 'install autotools'
|
||||
if: ${{ matrix.build == 'autotools' }}
|
||||
run: |
|
||||
# shellcheck disable=SC2181
|
||||
while [[ $? == 0 ]]; do
|
||||
for i in 1 2 3; do
|
||||
if brew update && brew install automake libtool; then
|
||||
break 2
|
||||
else
|
||||
echo "Error: wait to try again: $i"
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
false Too many retries
|
||||
done
|
||||
|
||||
- name: 'toolchain versions'
|
||||
run: |
|
||||
[[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
|
||||
[[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot
|
||||
command -v "${CC}"; "${CC}" --version || true
|
||||
xcodebuild -version || true
|
||||
xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
|
||||
xcrun --sdk macosx --show-sdk-version || true
|
||||
ls -l /Library/Developer/CommandLineTools/SDKs || true
|
||||
echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::'
|
||||
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
|
||||
echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build == 'autotools' }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure / ${{ matrix.build }}'
|
||||
run: |
|
||||
if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then
|
||||
# Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409
|
||||
"$(brew --prefix gcc@13)"/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders
|
||||
fi
|
||||
|
||||
if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then
|
||||
sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for
|
||||
else
|
||||
sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
|
||||
fi
|
||||
|
||||
if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
|
||||
CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
|
||||
CC+=" --sysroot=${sysroot}"
|
||||
CC+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
[ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}"
|
||||
# would pick up nghttp2, libidn2, and libssh2
|
||||
cmake -B bld -G Ninja -D_CURL_PREFILL=ON \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
|
||||
-DCMAKE_OSX_SYSROOT="${sysroot}" \
|
||||
-DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \
|
||||
-DCMAKE_IGNORE_PREFIX_PATH="$(brew --prefix)" \
|
||||
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
-DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF \
|
||||
-DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \
|
||||
-DUSE_APPLE_IDN=ON -DUSE_APPLE_SECTRUST=ON \
|
||||
${options}
|
||||
else
|
||||
export CFLAGS
|
||||
if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
|
||||
options+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
if [ "${MATRIX_COMPILER}" != 'clang' ]; then
|
||||
options+=" --with-sysroot=${sysroot}"
|
||||
CFLAGS+=" --sysroot=${sysroot}"
|
||||
fi
|
||||
[ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}"
|
||||
# would pick up nghttp2, libidn2, but libssh2 is disabled by default
|
||||
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-static \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
--disable-docs --disable-manual \
|
||||
--with-openssl="$(brew --prefix openssl)" \
|
||||
--without-nghttp2 --without-libidn2 \
|
||||
--without-libpsl \
|
||||
--with-apple-idn --with-apple-sectrust \
|
||||
${options}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'build / ${{ matrix.build }}'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'curl -V'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' --
|
||||
bld/src/curl --disable --version
|
||||
+447
@@ -0,0 +1,447 @@
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: 'non-native'
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'Dockerfile'
|
||||
- 'projects/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
CURL_CI: github
|
||||
CURL_TEST_MIN: 1820
|
||||
DO_NOT_TRACK: '1'
|
||||
|
||||
jobs:
|
||||
netbsd:
|
||||
name: 'NetBSD, CM clang openssl ${{ matrix.arch }}'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ['x86_64']
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: 'cmake'
|
||||
uses: cross-platform-actions/action@233156312992f3f169d8d0c633c21d12a5d30455 # v1.0.0
|
||||
env:
|
||||
MATRIX_ARCH: '${{ matrix.arch }}'
|
||||
with:
|
||||
environment_variables: CURL_CI CURL_TEST_MIN DO_NOT_TRACK MATRIX_ARCH
|
||||
operating_system: 'netbsd'
|
||||
version: '10.1'
|
||||
architecture: ${{ matrix.arch }}
|
||||
run: |
|
||||
# https://pkgsrc.se/
|
||||
time sudo pkgin -y install cmake ninja-build pkg-config perl brotli mit-krb5 openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket
|
||||
time cmake -B bld -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
-DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
-DCURL_USE_GSSAPI=ON \
|
||||
-DCURL_ENABLE_NTLM=ON \
|
||||
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
|
||||
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
|
||||
time cmake --build bld
|
||||
time cmake --install bld
|
||||
bld/src/curl --disable --version
|
||||
if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU
|
||||
time cmake --build bld --target testdeps
|
||||
export TFLAGS='-j8'
|
||||
time cmake --build bld --target test-ci
|
||||
fi
|
||||
echo '::group::build examples'
|
||||
time cmake --build bld --target curl-examples-build
|
||||
echo '::endgroup::'
|
||||
|
||||
openbsd:
|
||||
name: 'OpenBSD, CM clang libressl ${{ matrix.arch }}'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ['x86_64']
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: 'cmake'
|
||||
uses: cross-platform-actions/action@233156312992f3f169d8d0c633c21d12a5d30455 # v1.0.0
|
||||
env:
|
||||
MATRIX_ARCH: '${{ matrix.arch }}'
|
||||
with:
|
||||
environment_variables: CURL_CI CURL_TEST_MIN DO_NOT_TRACK MATRIX_ARCH
|
||||
operating_system: 'openbsd'
|
||||
version: '7.7'
|
||||
architecture: ${{ matrix.arch }}
|
||||
run: |
|
||||
# https://openbsd.app/
|
||||
# https://www.openbsd.org/faq/faq15.html
|
||||
time sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 py3-six py3-impacket
|
||||
time cmake -B bld -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
-DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
-DCURL_ENABLE_NTLM=ON \
|
||||
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
|
||||
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
|
||||
time cmake --build bld
|
||||
time cmake --install bld
|
||||
bld/src/curl --disable --version
|
||||
if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU
|
||||
time cmake --build bld --target testdeps
|
||||
export TFLAGS='-j8 !2707' # Skip 2707 'ws: Peculiar frame sizes' on suspicion of hangs
|
||||
time cmake --build bld --target test-ci
|
||||
fi
|
||||
echo '::group::build examples'
|
||||
time cmake --build bld --target curl-examples-build
|
||||
echo '::endgroup::'
|
||||
|
||||
freebsd:
|
||||
name: "FreeBSD, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} openssl${{ matrix.desc }} ${{ matrix.arch }}"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { build: 'autotools', arch: 'x86_64', compiler: 'clang' }
|
||||
- { build: 'cmake' , arch: 'x86_64', compiler: 'clang', options: '-DCMAKE_UNITY_BUILD=OFF', desc: ' !unity !runtests !examples' }
|
||||
- { build: 'autotools', arch: 'arm64' , compiler: 'clang', desc: ' !examples' }
|
||||
- { build: 'cmake' , arch: 'arm64' , compiler: 'clang' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: '${{ matrix.build }}'
|
||||
uses: cross-platform-actions/action@233156312992f3f169d8d0c633c21d12a5d30455 # v1.0.0
|
||||
env:
|
||||
CC: '${{ matrix.compiler }}'
|
||||
MATRIX_ARCH: '${{ matrix.arch }}'
|
||||
MATRIX_BUILD: '${{ matrix.build }}'
|
||||
MATRIX_DESC: '${{ matrix.desc }}'
|
||||
MATRIX_OPTIONS: '${{ matrix.options }}'
|
||||
with:
|
||||
environment_variables: CC CURL_CI CURL_TEST_MIN DO_NOT_TRACK MATRIX_ARCH MATRIX_BUILD MATRIX_DESC MATRIX_OPTIONS
|
||||
operating_system: 'freebsd'
|
||||
version: '14.3'
|
||||
architecture: ${{ matrix.arch }}
|
||||
run: |
|
||||
export CURL_CI=github
|
||||
|
||||
# https://ports.freebsd.org/
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time sudo pkg install -y cmake-core ninja perl5 \
|
||||
pkgconf brotli krb5-devel openldap26-client libidn2 libnghttp2 stunnel py311-impacket
|
||||
else
|
||||
time sudo pkg install -y autoconf automake libtool \
|
||||
pkgconf brotli krb5-devel openldap26-client libidn2 libnghttp2 stunnel py311-impacket
|
||||
export MAKEFLAGS=-j3
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time cmake -B bld -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
-DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
-DCURL_USE_GSSAPI=ON \
|
||||
${MATRIX_OPTIONS} \
|
||||
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
|
||||
else
|
||||
time autoreconf -fi
|
||||
if [ "${MATRIX_ARCH}" != 'x86_64' ]; then
|
||||
options='--disable-manual --disable-docs' # Slow with autotools, skip on emulated CPU
|
||||
fi
|
||||
mkdir bld && cd bld
|
||||
time ../configure --prefix="$HOME"/curl-install --enable-unity --enable-debug --enable-warnings --enable-werror --disable-static \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
--with-openssl \
|
||||
--with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \
|
||||
${options} \
|
||||
${MATRIX_OPTIONS} \
|
||||
|| { tail -n 1000 config.log; false; }
|
||||
cd ..
|
||||
fi
|
||||
|
||||
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
|
||||
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time cmake --build bld
|
||||
time cmake --install bld
|
||||
else
|
||||
time make -C bld install
|
||||
fi
|
||||
|
||||
bld/src/curl --disable --version
|
||||
|
||||
if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time cmake --build bld --target testdeps
|
||||
else
|
||||
time make -C bld -C tests
|
||||
fi
|
||||
if [ "${MATRIX_DESC#*!runtests*}" = "${MATRIX_DESC}" ]; then
|
||||
export TFLAGS='-j8'
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time cmake --build bld --verbose --target test-ci
|
||||
else
|
||||
time make -C bld V=1 test-ci
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_DESC#*!examples*}" = "${MATRIX_DESC}" ]; then
|
||||
echo '::group::build examples'
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
time cmake --build bld --target curl-examples-build
|
||||
else
|
||||
time make -C bld examples
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
fi
|
||||
|
||||
android:
|
||||
name: "Android ${{ matrix.platform }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.name }} arm64"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
LDFLAGS: -s
|
||||
MAKEFLAGS: -j 5
|
||||
MATRIX_BUILD: '${{ matrix.build }}'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { build: 'autotools', platform: '21', name: "!ssl !zstd",
|
||||
options: '--without-ssl --without-libpsl --without-zstd' }
|
||||
|
||||
- { build: 'cmake' , platform: '21', name: "!ssl !zstd",
|
||||
options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' }
|
||||
|
||||
- { build: 'autotools', platform: '35', name: "!ssl !zstd",
|
||||
options: '--without-ssl --without-libpsl --without-zstd' }
|
||||
|
||||
- { build: 'cmake' , platform: '35', name: "!ssl !zstd",
|
||||
options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' }
|
||||
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'autoreconf'
|
||||
if: ${{ matrix.build == 'autotools' }}
|
||||
run: autoreconf -fi
|
||||
|
||||
- name: 'configure'
|
||||
env:
|
||||
MATRIX_OPTIONS: '${{ matrix.options }}'
|
||||
MATRIX_PLATFORM: '${{ matrix.platform }}'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then # https://developer.android.com/ndk/guides/cmake
|
||||
cmake -B bld -G Ninja \
|
||||
-DANDROID_ABI=arm64-v8a \
|
||||
-DANDROID_PLATFORM="android-${MATRIX_PLATFORM}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DCMAKE_WARN_DEPRECATED=OFF \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
${MATRIX_OPTIONS}
|
||||
else
|
||||
TOOLCHAIN="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
|
||||
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-shared \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
CC="$TOOLCHAIN/bin/aarch64-linux-android${MATRIX_PLATFORM}-clang" \
|
||||
AR="$TOOLCHAIN/bin/llvm-ar" \
|
||||
RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \
|
||||
--host="aarch64-linux-android${MATRIX_PLATFORM}" \
|
||||
${MATRIX_OPTIONS}
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --verbose
|
||||
else
|
||||
make -C bld V=1
|
||||
fi
|
||||
|
||||
- name: 'curl info'
|
||||
run: |
|
||||
find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
||||
|
||||
- name: 'build tests'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --target testdeps
|
||||
else
|
||||
make -C bld -C tests
|
||||
fi
|
||||
|
||||
- name: 'build examples'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --target curl-examples-build
|
||||
else
|
||||
make -C bld examples
|
||||
fi
|
||||
|
||||
msdos:
|
||||
name: "MS-DOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} djgpp !ssl i586"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
LDFLAGS: -s
|
||||
MAKEFLAGS: -j 5
|
||||
MATRIX_BUILD: '${{ matrix.build }}'
|
||||
# renovate: datasource=github-releases depName=andrewwutw/build-djgpp versioning=semver-coerced registryUrl=https://github.com
|
||||
TOOLCHAIN_VERSION: 3.4
|
||||
TOOLCHAIN_SHA256: 8464f17017d6ab1b2bb2df4ed82357b5bf692e6e2b7fee37e315638f3d505f00
|
||||
strategy:
|
||||
matrix:
|
||||
build: [autotools, cmake]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: 'install packages'
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 install libfl2
|
||||
|
||||
- name: 'cache compiler (djgpp)'
|
||||
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
||||
id: cache-compiler
|
||||
with:
|
||||
path: ~/djgpp
|
||||
key: ${{ runner.os }}-djgpp-${{ env.TOOLCHAIN_VERSION }}-amd64
|
||||
|
||||
- name: 'install compiler (djgpp)'
|
||||
if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
cd ~
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused \
|
||||
--location "https://github.com/andrewwutw/build-djgpp/releases/download/v${TOOLCHAIN_VERSION}/djgpp-linux64-gcc1220.tar.bz2" --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${TOOLCHAIN_SHA256}" && tar -xjf pkg.bin && rm -f pkg.bin
|
||||
cd djgpp
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
https://www.delorie.com/pub/djgpp/current/v2tk/wat3211b.zip --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF faa2222ab5deb2c2aac229c760bf4d45aca5379f5af97865c308a0467046b67a && unzip -q pkg.bin && rm -f pkg.bin
|
||||
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
|
||||
https://www.delorie.com/pub/djgpp/current/v2tk/zlb13b.zip --output pkg.bin
|
||||
sha256sum pkg.bin | tee /dev/stderr | grep -qwF f3d2fa8129e7591c7e79074306d8ab91a70ec172cc01baedeae74992285dd3a3 && unzip -q pkg.bin && rm -f pkg.bin
|
||||
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'configure'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake -B bld -G Ninja \
|
||||
-DCMAKE_SYSTEM_NAME=DOS \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=x86 \
|
||||
-DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \
|
||||
-DCMAKE_C_COMPILER="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
-DCMAKE_UNITY_BUILD=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF \
|
||||
-DZLIB_INCLUDE_DIR="$HOME"/djgpp/include \
|
||||
-DZLIB_LIBRARY="$HOME"/djgpp/lib/libz.a \
|
||||
-DWATT_ROOT="$HOME"/djgpp/net/watt
|
||||
else
|
||||
autoreconf -fi
|
||||
mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-shared \
|
||||
--disable-dependency-tracking --enable-option-checking=fatal \
|
||||
CC="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-gcc \
|
||||
AR="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-ar \
|
||||
RANLIB="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-ranlib \
|
||||
WATT_ROOT="$HOME"/djgpp/net/watt \
|
||||
--host=i586-pc-msdosdjgpp \
|
||||
--without-ssl --without-libpsl \
|
||||
--with-zlib="$HOME"/djgpp
|
||||
fi
|
||||
|
||||
- name: 'configure log'
|
||||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'curl_config.h'
|
||||
run: |
|
||||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld
|
||||
else
|
||||
make -C bld
|
||||
fi
|
||||
|
||||
- name: 'curl info'
|
||||
run: |
|
||||
find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 file --
|
||||
find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' --
|
||||
|
||||
- name: 'build tests'
|
||||
if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --target testdeps
|
||||
else
|
||||
make -C bld -C tests
|
||||
fi
|
||||
|
||||
- name: 'build examples'
|
||||
if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
cmake --build bld --target curl-examples-build
|
||||
else
|
||||
make -C bld examples
|
||||
fi
|
||||
+1195
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user