brettcannon opened issue #6101:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
It would be great if wasmtime had an official GitHub Action to install the binary on to
$PATH
. Bonus if you allow for controlling what version to install.Benefit
The
install.sh
script assumes you source your shell's config file after installation. But that typically doesn't happen in CI (e.g. GitHub Actions). Do you either have to manipulate$PATH
or symlinkwasmtime
into a directory already on$PATH
(at least while wasmtime isn't available from the OS).Implementation
I have a hacked solution for my CI at https://github.com/brettcannon/cpython-wasi-build/blob/4c2f137fb9d15f62a296151c1f13ba77c0102755/.github/workflows/release.yml#L32 , but admittedly its structure is based on copying from a Dockerfile and so may not be optimal for reuse.
Alternatives
https://github.com/marketplace/actions/set-up-wasmtime , although it doesn't seem to support the concept of "latest".
rajatjindal commented on issue #6101:
I have implemented a GitHub action for setting up wasmtime. The code is currently available here: https://github.com/rajatjindal/github-action
Few notes:
- I have tested it for setting up wasmtime on
Linux/Macos/Windows
withx86_64
arch.- I think having the action in its repo would make managing the action releases easier.
- UX would be similar to the following:
- name: setup wasmtime uses: bytecodealliance/github-actions/wasmtime/setup@v1 with: ## optional, defaults to latest version: v12.0.0 ## optional github_token: ${{ github.token }}
- we can change
bytecodealliance/github-actions/wasmtime/setup@v1
(which seems a bit verbose) tobytecodealliance/setup-wasmtime@v1
. One downside of doing that is if we decide to add more functionality to actions in the future.- The string
v1
above refers to the tag on the action repo. As long as the changes to the actions are backward compatible, we can keep moving thev1
tag to newer releases.- User can pin to specific release using the complete tag or commit sha.
Happy to address any feedback folks might have here.
thanks
rajatjindal edited a comment on issue #6101:
I have implemented a poc for GitHub action for setting up wasmtime. The code is currently available here: https://github.com/rajatjindal/github-action
Few notes:
- I have tested it for setting up wasmtime on
Linux/Macos/Windows
withx86_64
arch.- I think having the action in its repo would make managing the action releases easier.
- UX would be similar to the following:
- name: setup wasmtime uses: bytecodealliance/github-actions/wasmtime/setup@v1 with: ## optional, defaults to latest version: v12.0.0 ## optional github_token: ${{ github.token }}
- we can change
bytecodealliance/github-actions/wasmtime/setup@v1
(which seems a bit verbose) tobytecodealliance/setup-wasmtime@v1
. One downside of doing that is if we decide to add more functionality to actions in the future.- The string
v1
above refers to the tag on the action repo. As long as the changes to the actions are backward compatible, we can keep moving thev1
tag to newer releases.- User can pin to specific release using the complete tag or commit sha.
Happy to address any feedback folks might have here.
thanks
rajatjindal edited a comment on issue #6101:
I have implemented a poc of GitHub action for setting up wasmtime. The code is currently available here: https://github.com/rajatjindal/github-action
Few notes:
- I have tested it for setting up wasmtime on
Linux/Macos/Windows
withx86_64
arch.- I think having the action in its repo would make managing the action releases easier.
- UX would be similar to the following:
- name: setup wasmtime uses: bytecodealliance/github-actions/wasmtime/setup@v1 with: ## optional, defaults to latest version: v12.0.0 ## optional github_token: ${{ github.token }}
- we can change
bytecodealliance/github-actions/wasmtime/setup@v1
(which seems a bit verbose) tobytecodealliance/setup-wasmtime@v1
. One downside of doing that is if we decide to add more functionality to actions in the future.- The string
v1
above refers to the tag on the action repo. As long as the changes to the actions are backward compatible, we can keep moving thev1
tag to newer releases.- User can pin to specific release using the complete tag or commit sha.
Happy to address any feedback folks might have here.
thanks
rajatjindal commented on issue #6101:
I have extended the action poc to also support setting up
wasm-tools
now.
alexcrichton commented on issue #6101:
Nice! That all looks reasonable to me and I think would be good to add :+1:
rajatjindal commented on issue #6101:
this issue can be closed now that we have a GitHub action to setup
wasmtime
(andwasm-tools
)
pchickey closed issue #6101:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
It would be great if wasmtime had an official GitHub Action to install the binary on to
$PATH
. Bonus if you allow for controlling what version to install.Benefit
The
install.sh
script assumes you source your shell's config file after installation. But that typically doesn't happen in CI (e.g. GitHub Actions). Do you either have to manipulate$PATH
or symlinkwasmtime
into a directory already on$PATH
(at least while wasmtime isn't available from the OS).Implementation
I have a hacked solution for my CI at https://github.com/brettcannon/cpython-wasi-build/blob/4c2f137fb9d15f62a296151c1f13ba77c0102755/.github/workflows/release.yml#L32 , but admittedly its structure is based on copying from a Dockerfile and so may not be optimal for reuse.
Alternatives
https://github.com/marketplace/actions/set-up-wasmtime , although it doesn't seem to support the concept of "latest".
Last updated: Nov 22 2024 at 17:03 UTC