Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI job to verify build on Windows #109

Closed
2 tasks
bagder opened this issue Apr 8, 2023 · 6 comments · Fixed by #249
Closed
2 tasks

CI job to verify build on Windows #109

bagder opened this issue Apr 8, 2023 · 6 comments · Fixed by #249
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bagder
Copy link
Member

bagder commented Apr 8, 2023

  • merge a Windows capable build (makefile?)
  • add a CI job that verifies that trurl builds and works fine on Windows
@bagder bagder added the enhancement New feature or request label Apr 8, 2023
@havbon
Copy link
Contributor

havbon commented Apr 8, 2023

I added another job in the makefile.yml
have a look: https://github.com/havbon/trurl/actions

I got it to work using cygwin's gcc compiler without changing the makefile at all.

In my opinion that is the easiest way to compile trurl on windows

@bagder bagder added the help wanted Extra attention is needed label Apr 17, 2023
@havbon
Copy link
Contributor

havbon commented Apr 19, 2023

The main issue is find is that it is difficult to find libcurl packages for windows which includes both ".lib" files and "curl.h", which is needed for the msvc compiler...

Any idea where to find that?

@jay
Copy link
Member

jay commented Apr 19, 2023

note @krishean is working on this in #110

@jacobmealey
Copy link
Contributor

jacobmealey commented Aug 8, 2023

Is this issue still applicable with the merging of #110 and #113?

@vszakats
Copy link
Member

vszakats commented Nov 9, 2023

Conceptually, this could use the ready-made official curl binaries from https://curl.se/windows/. Then pick a suitable mingw-w64 toolchain, and build trurl with them. This would duplicate some of what curl-for-win does already. To make maintenance bearable (i.e. avoid maintaining two copies of the same logic), using llvm-mingw seems to be the best option, as it has most of the necessary options configured out of the box, and also supports all CPUs and other bits.

Another approach is to download the curl-for-win repo, configure for 'pico' (smallest) build
and let it build trurl automatically (along with curl itself). That would require just a tiny amount of extra code to maintain. [UPDATE: added 'zero' builds to build with zero external dependencies.]

@vszakats
Copy link
Member

vszakats commented Nov 9, 2023

PR with the second approach outlined above: #249

vszakats added a commit to vszakats/trurl that referenced this issue Nov 9, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 9, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 10, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 10, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 10, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 11, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 11, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 11, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 13, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Disable UNITY builds in curl to make `trurl` binaries about 120KB
smaller each.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Disable UNITY builds in curl to make `trurl` binaries about 120KB
smaller each. Regain some of the lost build performance by not building
the curl tool [EXPERIMENTAL]. Use a customized curl-for-win build with
disabled TLS to further reduce footprint.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Disable UNITY builds in curl to make `trurl` binaries about 120KB
smaller each. Regain some of the lost build performance by not building
the curl tool [EXPERIMENTAL]. Use a customized curl-for-win build with
disabled TLS to further reduce footprint.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl build with
no external dependencies to build x64, ARM64 and x86 `trurl.exe`.

Disable UNITY builds in curl to make `trurl` binaries about 120KB
smaller each. Regain some of the lost build performance by not building
the curl tool [EXPERIMENTAL]. Use a customized curl-for-win build with
disabled TLS to further reduce footprint.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl 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.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl 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.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
Add automated Windows builds.

Use curl-for-win with llvm + mingw64, and a minimal curl 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.

Ref: curl#109
Closes curl#249
vszakats added a commit to vszakats/trurl that referenced this issue Nov 14, 2023
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 curl#109
Closes curl#249
vszakats added a commit that referenced this issue Nov 14, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants