Skip to content

Commit

Permalink
ci: build libcurl without http
Browse files Browse the repository at this point in the history
For even smaller trurl binaries, and faster builds with libcurl built
without http support.

Also move http/80 tests to imap/143 for default-port tests.
We need IMAP already for IMAP options support.

Also mark tests relying on IMAP default port to require libcurl with
IMAP enabled.

ARM64 `trurl.exe` sizes:
- Before: 465KB https://github.com/curl/trurl/actions/runs/6903445608
- After, no http: 324KB https://github.com/curl/trurl/actions/runs/6903509264
- no http, no unity: 245KB https://github.com/curl/trurl/actions/runs/6903576741
- no http, no imap, unity: 243KB https://github.com/curl/trurl/actions/runs/6906597033
- no http, no imap, no unity: 189KB https://github.com/curl/trurl/actions/runs/6903738976

Closes #255
  • Loading branch information
vszakats committed Nov 17, 2023
1 parent 61db01d commit 96b4f40
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/curl-for-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/curl/curl-for-win
mv curl-for-win/* .
export CW_CONFIG='-dev-zero-imap-osnotls-osnoidn-nocurltool-win'
export CW_CONFIG='-dev-zero-imap-osnotls-osnoidn-nohttp-nocurltool-win'
export CW_REVISION='${{ github.sha }}'
. ./_versions.sh
docker trust inspect --pretty "${DOCKER_IMAGE}"
Expand Down
22 changes: 13 additions & 9 deletions tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,14 @@
{
"input": {
"arguments": [
"http://curl.se:22/",
"imap://curl.se:22/",
"-s",
"port=80"
"port=143"
]
},
"required": ["imap-options"],
"expected": {
"stdout": "http://curl.se/\n",
"stdout": "imap://curl.se/\n",
"stderr": "",
"returncode": 0
}
Expand Down Expand Up @@ -323,13 +324,14 @@
"arguments": [
"--default-port",
"--url",
"http://curl.se/we/are.html",
"imap://curl.se/we/are.html",
"--get",
"{port}"
]
},
"required": ["imap-options"],
"expected": {
"stdout": "80\n",
"stdout": "143\n",
"stderr": "",
"returncode": 0
}
Expand Down Expand Up @@ -506,13 +508,14 @@
"input": {
"arguments": [
"--url",
"http://curl.se/we/are.html",
"imap://curl.se/we/are.html",
"-g",
"{default:port}"
]
},
"required": ["imap-options"],
"expected": {
"stdout": "80\n",
"stdout": "143\n",
"stderr": "",
"returncode": 0
}
Expand Down Expand Up @@ -1716,14 +1719,15 @@
{
"input": {
"arguments": [
"http://example.com/",
"imap://example.com/",
"--get",
"port: {port}, default:port: {default:port}"
]
},
"required": ["imap-options"],
"expected": {
"returncode": 0,
"stdout": "port: , default:port: 80\n"
"stdout": "port: , default:port: 143\n"
}
},
{
Expand Down

0 comments on commit 96b4f40

Please sign in to comment.