Skip to content

More CI tragets: Linux 32bit, Windows and Cosmopolitan #393

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nickva
Copy link
Contributor

@nickva nickva commented Mar 20, 2025

Atomics support in Windows requires libwinpthread*.dll at runtime. One way to get it is to install it with MinGW package, and copy alongside the executable.

Update test Makefile targets for windows executables.

Allow running tests with Wine: make WINE=wine CONFIG_WIN3=y.... That's useful when Wine binfmt support cannot be installed such as on the CI hosts.

Add PPC64LE architecture and try to fix flaky multi-arch CI in gcc: tonistiigi/binfmt#215

Fix issue: #390

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch 2 times, most recently from e4feb5b to 129b3c1 Compare March 25, 2025 16:17
@bellard
Copy link
Owner

bellard commented Mar 25, 2025

removing pthreads for windows is not needed. You should instead copy the msys pthread library to the current directory before running the tests.

@nickva
Copy link
Contributor Author

nickva commented Mar 25, 2025

will do, thank you

Sorry for misunderstanding, I misunderstood that pthreads wasn't going to work for windows, but I think it's workers that won't work on windows but atomics should.

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 129b3c1 to 2097f8c Compare March 25, 2025 21:46
@nickva nickva changed the title More ci targets and windows fixes More CI tragets: Linux 32bit, Windows (MinGW/Wine) and Cosmopolitan Mar 25, 2025
@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 2097f8c to 54b562d Compare March 25, 2025 21:56
@nickva
Copy link
Contributor Author

nickva commented Mar 25, 2025

Updated: brought back pthreads for windows, copy winpthreads dll alongside executables and make it easier to run tests with wine. Also added a windows+msys2 and linux LTO target

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch 6 times, most recently from cd1cb49 to 3590531 Compare March 29, 2025 04:43
@bellard
Copy link
Owner

bellard commented Apr 5, 2025

MSYSTEM is basically the same as WIN32, so you may be able to simplify the Makefile by just setting CONFIG_WIN32 in this case and setting avoiding setting CROSS_PREFIX.

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch 3 times, most recently from 4238645 to 341d43c Compare April 5, 2025 18:57
@nickva
Copy link
Contributor Author

nickva commented Apr 5, 2025

MSYSTEM is basically the same as WIN32, so you may be able to simplify the Makefile by just setting CONFIG_WIN32 in this case and setting avoiding setting CROSS_PREFIX.

Thanks for the suggestion, that worked pretty well. Updated the PR.

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 975502b to 341d43c Compare April 7, 2025 14:59
@nickva
Copy link
Contributor Author

nickva commented Apr 7, 2025

I see the multi-arch CI step failing intermittently with a segfault in gcc. It's not a quickjs issue: tonistiigi/binfmt#215

EDIT: this should fix the flakiness tonistiigi/binfmt#215 (comment), also added PPC64LE, previously that arch seemed to lead to segfaults in gcc almost every time

Screenshot 2025-04-07 at 11 33 31 AM

@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 341d43c to 4ab34d2 Compare April 7, 2025 15:24
@nickva nickva changed the title More CI tragets: Linux 32bit, Windows (MinGW/Wine) and Cosmopolitan More CI tragets: Linux 32bit, Windows and Cosmopolitan Apr 7, 2025
@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 4ab34d2 to 1d0514e Compare April 7, 2025 17:10
nickva added a commit to apache/couchdb that referenced this pull request Apr 7, 2025
 * break statement with labels fixes [1]
 * fix buffer overflow in bjson string + bigint reader [2]
 * bigint fixes [3] [4]
 * weak map gc fix [5]
 * segfault on large number of properties [6]
 * undefined is a valid variable name in global scope [7]

[1] bellard/quickjs#275
[2] bellard/quickjs#399
[3] bellard/quickjs@083b7bab01
[4] bellard/quickjs@fa706d5622
[5] bellard/quickjs#393
[6] bellard/quickjs#111
[7] bellard/quickjs#370
nickva added a commit to apache/couchdb that referenced this pull request Apr 8, 2025
 * break statement with labels fixes [1]
 * fix buffer overflow in bjson string + bigint reader [2]
 * bigint fixes [3] [4]
 * weak map gc fix [5]
 * segfault on large number of properties [6]
 * undefined is a valid variable name in global scope [7]

[1] bellard/quickjs#275
[2] bellard/quickjs#399
[3] bellard/quickjs@083b7bab01
[4] bellard/quickjs@fa706d5622
[5] bellard/quickjs#393
[6] bellard/quickjs#111
[7] bellard/quickjs#370
@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 1d0514e to 06664db Compare April 10, 2025 18:21
@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from 06664db to e2eddb7 Compare April 21, 2025 15:10
@nickva
Copy link
Contributor Author

nickva commented Apr 21, 2025

Rebased on the latest master. Tests pass. I think it's ready for another look.

Wonder if it makes sense to add a tests262 CI stage as well? Maybe as a separate PR

@bellard
Copy link
Owner

bellard commented Apr 22, 2025

One more detail: you can now enable test_worker.js when CONFIG_WIN32=y.

Atomics support in Windows requires libwinpthread*.dll at runtime. One
way to get it is to install it with MinGW package, and copy alongside
the executable.

Update test Makefile targets for windows executables.

Allow running tests with Wine: `make WINE=wine CONFIG_WIN3=y
...`. That's useful when Wine binfmt support cannot be installed such
as on the CI hosts.

Add PPC64LE architecture and try to fix flaky multi-arch CI in gcc:
tonistiigi/binfmt#215
@nickva nickva force-pushed the more-ci-targets-and-windows-fixes branch from e2eddb7 to c0958ee Compare April 22, 2025 14:48
@nickva
Copy link
Contributor Author

nickva commented Apr 22, 2025

One more detail: you can now enable test_worker.js when CONFIG_WIN32=y.

Updated, test_worker.js passes with wine and on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants