Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Wasm: Reenable the CI for Wasm #7998

Merged
merged 4 commits into from
Mar 30, 2020
Merged

Wasm: Reenable the CI for Wasm #7998

merged 4 commits into from
Mar 30, 2020

Conversation

yowl
Copy link
Contributor

@yowl yowl commented Feb 21, 2020

Seems like the only way to test this is to create a PR and keep editing it until it works....

First commit just to see if I'm on the right track and can add a Wasm platform to the matrix and see what it runs. Have commented out other platforms, I will redo the push squashing commits when it works.

What's required is to install emscripten 1.39.4 (or later) activate it, set up the env, then run build wasm {configuration} ... I think.

Have changed the running of test from Firefox to Node (which I use from the Emscripten source) with the hope that will alleviate some of the timeout problems that used to occur in Jenkins.

Not sure I've got the matrix logic in the right place, but couldn't see somewhere better.

build wasm release is not in as its broken - #8012

There was an issue with the SSL certificate for googleapis.com and downloading from there using python. Emscripten does this to start its install. The error was intermittent but if it occurred, retrying did not help. I understand python (later versions of v2 and v3) on windows use the machine certificate store, so my theory is that depending on the agent the store is different and it either fails or succeeds, just a theory. I added some powershell to do the same download and that always seems to succeed, and if the python download failed, and the powershell download is performed, then the python download succeeds. So it could be that the powershell download using System.Net.Security.SslStream is changing the machine certs, at least that's my best theory, and that's the approach here which has succeed 6 times consequitively. Upgrading python is not necessary so I've left it out. The native tools download of python is not used by the emscripten install as it just pulls python from the path, and the native tools download does not change the path.

@MichalStrehovsky
Copy link
Member

The buildpipeline directory controls official builds and package publishing. For CI, you only need to worry about the YAML files in eng.

@yowl
Copy link
Contributor Author

yowl commented Feb 22, 2020

having various problems . One might be xunit and just recording this link in case its relevant
dotnet/standard#481

@MichalStrehovsky
Copy link
Member

I'm wondering if the RyuJIT restore issue you're getting now is fallout from #8001 (I touched the project). Not sure what RIDs we set up when restoring the RyuJIT.depproj. Maybe master is broken for wasm right now in general?

@yowl
Copy link
Contributor Author

yowl commented Feb 26, 2020

@MichalStrehovsky you suspect https://github.com/dotnet/corert/pull/8001/files#diff-d7bea50ef95c95c2ed222c77540b7f8a ?

It does seem to be taking for ever now when build wasm is run on a clean clone. It seems to get stuck on "dotnet.exe" exec E:\GitHub\corerttest\Tools\dotnetcli\sdk\2.1.510\MSBuild.dll -maxcpucount -verbosity:m E:\GitHub\corerttest\buildscripts\..\build.proj /nologo /t:Restore /flp:v=normal;LogFile=E:\GitHub\corerttest\buildscripts\..\bin\Logs\msbuild_WebAssembly__wasm__Debug.log /p:NuPkgRid=win-x64 /maxcpucount /p:OSGroup=WebAssembly /p:Configuration=Debug /p:Platform=wasm which doesn't appear to have hung, in that in ProcExp, the threads tab is moving but its only clocking a tiny amount of cpu, e.g. 0.02 %

Virtual memory of this dotnet.exe looks like its 2TB which may or may not be interesting:

image

@yowl
Copy link
Contributor Author

yowl commented Feb 26, 2020

A red herring perhaps, its just errored with

  Failed to download package 'runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp.5.0.0-alpha.1.19563.6' from 'https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.win-x64.microsoft.private.corefx.netcoreapp/5.0.0-alpha.1.19563.6/runtime.win-x64.microsoft.private.corefx.netcoreapp.5.0.0-alpha.1.19563.6.nupkg'.
  Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    An existing connection was forcibly closed by the remote host

Although it did then go on to write

E:\GitHub\corerttest\Tools\depProj.targets(83,5): error : Error no assets were resolved from NuGet packages. [E:\GitHub\corerttest\src\ILCompiler\RyuJIT\RyuJIT.depproj]

If I run build wasm again without cleaning the repo, it fails immediately with the RyuJIT.depproj problem.

@yowl
Copy link
Contributor Author

yowl commented Feb 26, 2020

I tried again today on a clean repo and the HTTP error was just transient and has gone, but the RyuJIT problem persists.

E:\GitHub\corerttest\Tools\depProj.targets(83,5): error : Error no assets were resolved from NuGet packages. [E:\GitHub\corerttest\src\ILCompiler\RyuJIT\RyuJIT.depproj]

@MichalStrehovsky
Copy link
Member

I think it's because I used TargetsUnix in the RyuJIT.depproj to decide whether we want to grab clrjit or libclrjit. Can you try switching that to Condition="'$(OSEnvironment)'!='Windows_NT'" (and ==, respectively)?

@yowl
Copy link
Contributor Author

yowl commented Feb 26, 2020

@MichalStrehovsky Yes, that fixes it, thanks

@yowl
Copy link
Contributor Author

yowl commented Feb 26, 2020

Want me to create a separate PR for that, would seem like a good idea?

@MichalStrehovsky
Copy link
Member

Want me to create a separate PR for that, would seem like a good idea?

Yes, thanks. And sorry for breaking it in the first place.

@yowl yowl changed the title WIP: Wasm: Reenable the CI for Wasm Wasm: Reenable the CI for Wasm Feb 27, 2020
@yowl
Copy link
Contributor Author

yowl commented Feb 27, 2020

When this downloads emscripten it just puts it in the root, should I move that to Tools?

@yowl yowl changed the title Wasm: Reenable the CI for Wasm WIP: Wasm: Reenable the CI for Wasm Feb 27, 2020
@yowl
Copy link
Contributor Author

yowl commented Feb 27, 2020

WIP again, left some hard coded stuff

@yowl yowl changed the title WIP: Wasm: Reenable the CI for Wasm Wasm: Reenable the CI for Wasm Feb 27, 2020
eng/build-job.yml Outdated Show resolved Hide resolved
@yowl
Copy link
Contributor Author

yowl commented Mar 9, 2020

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 7998 in repo dotnet/corert

@yowl
Copy link
Contributor Author

yowl commented Mar 24, 2020

I've finished with this and I ran 5 consecutive tests so I think this approach is going to work. I only have this empirical evidence that this is ok, if we put it in and it starts failing I can always pull it again?

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise, thanks!

@@ -0,0 +1,20 @@
mkdir "%1" 2>nul
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the files you added in eng/common to eng?

CoreRT repo is not on Arcade yet, but this layout is kind of a prep for that. The runtime repo has explanation: https://github.com/dotnet/runtime/tree/master/eng/common#dont-touch-this-folder

Use pyhton3 from native-tools explicitly
reset commits
@MichalStrehovsky MichalStrehovsky merged commit 3c19189 into dotnet:master Mar 30, 2020
@filipnavara
Copy link
Member

Thanks, @yowl!

@yowl yowl deleted the wasm-ci branch March 30, 2020 13:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants