-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automated Windows builds and tests. Use curl-for-win with llvm + mingw64, and a minimal libcurl build with no external dependencies to build x64, ARM64 and x86 `trurl.exe`. Boost build performance by not building the curl tool [EXPERIMENTAL]. Use a customized curl-for-win build with disabled TLS to further reduce footprint and build time. Non-UNITY libcurl builds can make turl binaries about 120KB smaller, but they require 2x build times (4m vs. 2m), so opted not to use those here. Also enable tests and fix issues along the way: - libcurl with IDN support cannot be used because trurl itself lacks UNICODE support and thus fails to accept non-ASCII strings via the command-line. ``` expected: 'https://xn--rksmrgs-5wao1o.se/\n' got: '' 104: failed 'https://räksmörgås.se' -g '{puny:host}' ``` Ref: https://github.com/curl/trurl/actions/runs/6863796328/job/18664263891#step:3:4406 - add `test.py` support for a runner like `wine`. Via `--runner=<bin>` option. This disables `valgrind` tests. - add `test.py` to override the default `trurl` binary to test. Via `--trurl=<bin>` option. - skip `stderr` tests when using a runner. (`wine` does trash `stderr` output) - fix to enable `punycode2idn` only when libcurl has IDN support. - delete line-ending spaces from `test.json`. - add `--keep-port` to 6 tests to avoid relying on libcurl builds with specific protocols enabled, such as HTTPS or FTP. - add a new test with default-port using http/80. - update 4 tests to use http/imap instead of https/imaps to make them work with no-TLS libcurl. - build libcurl with IMAP to make 'options' URL field extraction work in tests. Fixes #109 Closes #249
- Loading branch information
Showing
4 changed files
with
155 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright (C) Viktor Szakats. See LICENSE.md | ||
# SPDX-License-Identifier: curl | ||
--- | ||
name: curl-for-win | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
permissions: {} | ||
|
||
env: | ||
CW_GET: 'curl' | ||
CW_MAP: '0' | ||
CW_JOBS: '3' | ||
CW_PKG_NODELETE: '1' | ||
CW_PKG_FLATTEN: '1' | ||
DOCKER_CONTENT_TRUST: '1' | ||
|
||
jobs: | ||
win-llvm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'trurl' | ||
fetch-depth: 8 | ||
- name: 'build' | ||
env: | ||
CW_LLVM_MINGW_DL: '1' | ||
CW_LLVM_MINGW_ONLY: '0' | ||
CW_TURL_TEST: '1' | ||
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_REVISION='${{ github.sha }}' | ||
. ./_versions.sh | ||
docker trust inspect --pretty "${DOCKER_IMAGE}" | ||
time docker pull "${DOCKER_IMAGE}" | ||
docker images --digests | ||
time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ | ||
--env-file <(env | grep -a -E \ | ||
'^(CW_|GITHUB_)') \ | ||
"${DOCKER_IMAGE}" \ | ||
sh -c ./_ci-linux-debian.sh | ||
- name: 'list dependencies' | ||
run: cat urls.txt | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: 'trurl-windows' | ||
retention-days: 5 | ||
path: curl-*-*-*/trurl* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.