-
Notifications
You must be signed in to change notification settings - Fork 36
Use node version 22 to run wasm based tests #400
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #400 +/- ##
=======================================
Coverage 81.77% 81.77%
=======================================
Files 20 20
Lines 845 845
Branches 87 87
=======================================
Hits 691 691
Misses 154 154 🚀 New features to boost your workflow:
|
|
Okay I am just confused here. The test C++ emscripten job shows the following at the 40 second mark itself. I'm not sure what is it waiting for there after. I added the exit runtime flag to force the exit once main runs but that didn't help The emscripten_wasm (osx15-arm, macos-15) jobs times out not doing anything after showing success and just runs till the 4 minute mark. Even other jobs like deploy run for 4 mins even though the tests have already been executed. I don't expect that to happen through node (atleast doesn't happen locally ... I always build the .js and not the .html through emrun) @mcbarton as you introduced the testing in the browser thingy, do you know what's happening here ? The native kernel tests pass under a minute, I see no reason why the wasm kernel tests should take more than a minute in that case ! |
As far as I can tell it is running the browser tests fine. Its when it uses the node where it stalls (put an echo command such as 'running Emscripten C++ tests in node' just before the node command). This stalling when trying to run the tests in node has happens to me locally when it tries to use emsdk 3.1.73 old version of node. I think there is a strong possibility it is not using the node 24 you install (maybe try a node --version command after you do the echo command). The Emscripten C++ tests can run with the old node emsdk currently uses, but it takes a long time (on the ci runners you have to remove the timeout and it takes about 20 minutes before it starts running the C++ tests in node). With the latest node it runs instantly for me. |
|
@anutosh491 To see how long it takes for the Emscripten C++ tests to run with emsdk 3.1.73 version of node see this PR I have open #386 . This should all be fixed when we upgrade to emsdk version 4 |
Hmm, I still don't understand if you're proposing something to be done here ? Do you have a current way ahead ? |
If you see the new ci output it prints node version v16.20.2 . What is happening is your installing a new node version, but with the changes you've made to the ci its now using the version which comes with emsdk version 3.1.73 which is quite old. Instead of using the action, get emsdk 3.1.73 in Emscripten forge to install node 24 using emsdk install node-24.7.0-64bit and it should be be able to run within the 4 minute timeout. Otherwise remove the time limit and the tests will run in that old version eventually. |
|
Not sure that works for me locally |
This is working on my Macbook, so unsure why your Macbook doesn't accept it |
|
Weird, would you like to take over ? The goal here was to upgrade the node version cause node 20 gives a memory out of bounds error for #398 , whereas there is nothing wrong with the change/test added there. Upgrading to 23/24 should fix that ! |
66419a1 to
a451d5b
Compare
|
cc @mcbarton we didn't realize we could simply fetch nodejs24 from conda-forge and address this (makes it a 2 line change and I'll update the readme too) |
|
@anutosh491 Is node 22 is not new enough? I would prefer the emscripten forge recipes PR goes in now its been approved, and we use the node from the build environment. If you need node 24, then maybe update the emsdk recipe to be node 24 rather than node 22 like I set it. You could fix 2 tasks at the same time if your willing to approve #386 , since that uses node from tue build environment (the node being whatever you set it to in the emscripten forge PR), and gives xeus-cpp to have a target which automatically runs the c++ tests in node |
Anything above node 20 is ! |
|
@mcbarton I'm all confused after something went in that I'm not aware of. Due to which now I see resolve conflicts. Could you tell me what's the appropriate way to resolve this. I still want to make use of nodejs 22 from conda-forge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be running our tests through a node version added to the xeus-lite-host environment. We should be using the same one which is used during the configure stage of our Emscripten build. Without this your using node 16 through the CMAKE_CROSSCOMPILING_EMULATOR , and then running your tests in node 22. This inconsistency could cause our tests to fail for random reasons which would be hard to debug, and would almost certainly get worse as the node from the build environment gets more and more outdated. What needs to be done is for the node used in the Emscripten forge recipe to be updated to a newer version (to whatever matches the version the upstream emsdk), and a mechanism should be put in place that keeps the MacOS emsdk provided by Emscripten forge upto date with the Linux version.
Although I have no evidence towards this, the emsdk versions not being kept in sync could explain why sometimes in the past we have seen cases where we have had Emscripten jobs fail for one system, but not the other (see https://github.com/compiler-research/xeus-cpp/actions/runs/14780201517 and https://github.com/compiler-research/xeus-cpp/actions/runs/15210235224 for examples where this has happened).
@SylvainCorlay I would like your opinion on this matter.
I would be in favour of just dropping the macos emscripten build once we switch to emscripten 4-x. I don't think it's adding any value (or ever has). @DerThorsten's comment emscripten-forge/recipes#1689 (comment) here clearly mentions why. I leave it up to him, if he feels like maintaining a MacOs build. If yes good, if not still good. When it comes to wasm we just need a good clean build and nothing else. Has been discussed before (emscripten-forge/recipes#1689 (comment)) It just feels like unneccessary annoying maintainance to me at this point. The only point behind this PR was to get #398 in (which was a bug pointed out by a real xeus-cpp user that Johan fixed). So we should have worked towards getting it in. The CI should aid the developer and not stand against it. This feels like a big battle to get a small bug fix in.
That being said, I really don't want to keep this PR waiting. Node 16 isn't good enough, Node 22 is. Emscripten 4-x would bring it along when that migration happens (but that has time). Till then we need a temporary fix. I'll just prefer to get it from conda-forge till then (no big deal). If a user/contributor wants to run the test, they can do the same. |
9ab86bd to
d60b546
Compare
|
Hey @mcbarton , as Vassil and I discussed on discord (message link) That being said, I've also dropped the osx26 runner for emscripten. We have discussed this in the past on discord. Even if we allow multiple platforms in the CI for emscripten, multiple runners doesn't really contribute here. Our native kernels still use osx15, when we drop those in the future, we can do the same for emscripten and drop osx15 for osx26. But yeah untill then just 1 runner per platform is more than sufficient. This PR is now ready to go in on my end. Some other small changes in the readme being I've shifted the install step after the build step which is how it should be logically. |
Hi @anutosh491 I have read through your latest PR changes and have some questions. Maybe I am missing something, but not sure how changing I don't agree that its logical to move the install step to before the browser tests have been run. I don't understand why you would want to install something into your environment that you haven't fully tested. You even put in your changes In the ci section on 'Test Emscripten xeus-cpp in browser' you moved the command which created the On the subject of having just one MacOS job I am not too fussed. I just don't understand why you decided on deleting the more recent MacOS runner. Surely if we are keeping just one then we would want the latest one. |
check-xeus-cpp does not compile anything—it simply runs That’s a runtime step, not a build step ! |
This is a general improvement. The xeus-lite-host env has nothing to do with the browser tests. I just moved it to where it should be ! |
That target may run that command, but it depends on test_xeus_cpp which is a build target (see Line 101 in 190caf6
|
I think you missed my point that moving |
Ahhh okay Sorry, I'll put this back. |
We are just using node as the runtime for the js file here. It does not build anything. I can't explain this any better. You don't need emcmake or emmake untill its a cmake config or a make step ! We were just running |
Even though I still don't understand how its not needed, I'll accept on this point that you are right since the ci passes. |
Cool, let @vgvassilev take the call here.
I clearly remember suggesting that we have a
|
Description
Refer #398 (comment)
Type of change
Please tick all options which are relevant.