[wasi] CI: Provision wasi-sdk, and wasmtime only when needed - #82454
Merged
Merged
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing Issue Detailsnull
|
lewing
approved these changes
Feb 25, 2023
For a directory specified as a helix correlation payload, the helix
tasks will attempt to write a `.payload` file to the directory. But if the
directory is not writable then we need to stage the payload in a
writable location, before passing the path to helix.
For example, if we have `wasi-sdk` installed on the system as:
`WASI_SDK_PATH=/usr/local/wasi-sdk`
.. then we can stage it by copying to
`artifacts/obj/helix-staging/wasi-sdk`, and then using that staging path
for the helix correlation payload.
This was already being done for `EMSDK`, and `WasiSdk` in two separate
targets. And now needs to be done for `wasmtime` also. Instead of having
completely separate targets for all this, add a new mechanism to specify
helix dependencies to stage.
For example:
```xml
<ItemGroup>
<HelixDependenciesToStage Condition="'$(NeedsWasmtime)' == 'true'" SourcePath="$(WasmtimeDir)" Include="$(WasmtimeDirForHelixPayload)" />
</ItemGroup>
```
.. and the payload can use specified as
```xml
<HelixCorrelationPayload Include="$(WasmtimeDirForHelixPayload)" Destination="wasmtime" Condition="'$(NeedsWasmtime)' == 'true'" />
```
These were getting created with all the wasi builds sharing the same prefixes causing them to get overwritten.
wasi-sdk, and wasmtime only when needed
radical
marked this pull request as ready for review
March 2, 2023 09:01
pavelsavara
reviewed
Mar 2, 2023
Member
Author
|
Failures are unrelated, and known. |
steveisok
approved these changes
Mar 2, 2023
Member
Author
|
Remaining builds are completely unrelated. Merging this early to free up some resources. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provision wasmtime, wasi-sdk on CI only if needed
On the linux VMs we have
wasi-sdk, andwasmtimeprovisioned already. With this PRthe jobs will use those instead of downloading fresh copies for every build.
Add generic support for staging helix payloads
For a directory specified as a helix correlation payload, the helix
tasks will attempt to write a
.payloadfile to the directory. But if thedirectory is not writable then we need to stage the payload in a
writable location, before passing the path to helix.
For example, if we have
wasi-sdkinstalled on the system as:WASI_SDK_PATH=/usr/local/wasi-sdk.. then we can stage it by copying to
artifacts/obj/helix-staging/wasi-sdk, and then using that staging pathfor the helix correlation payload.
This was already being done for
EMSDK, andWasiSdkin two separatetargets. And now needs to be done for
wasmtimealso. Instead of havingcompletely separate targets for all this, add a new mechanism to specify
helix dependencies to stage.
For example:
.. and the payload can use specified as
Fixes #82391