Giter Site home page Giter Site logo

jcbhmr / setup-wasm-tools Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 594 KB

๐Ÿ‘ฉโ€๐Ÿ’ป wasm-tools installer for GitHub Actions

JavaScript 88.94% TypeScript 11.06%
actions github-action github-actions wasm-tools webassembly installer

setup-wasm-tools's Introduction

Setup wasm-tools

๐Ÿ‘ฉโ€๐Ÿ’ป wasm-tools installer for GitHub Actions

- uses: jcbhmr/setup-wasm-tools@v2
- run: cargo build --target wasm32-wasi
- run: wasm-tools print target/wasm32-wasi/debug/*.wasm

๐ŸŸช Installs wasm-tools globally
๐Ÿ”ข Supports semver ranges
๐Ÿ“ Caches the wasm-tools installation

Usage

GitHub Actions GitHub

๐Ÿš€ Here's what you're after:

on: push
jobs:
  job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jcbhmr/setup-wasm-tools@v2
      - run: cargo build --target wasm32-wasi
      - run: wasm-tools print target/wasm32-wasi/debug/*.wasm

Inputs

  • wasm-tools-version: Which version of wasm-tools to install. This can be an exact version specifier such as 1.0.0 or a semver range like ~1.0.0 or 1.x. Use latest to always install the latest release. Defaults to latest.

  • wasm-tools-token: The GitHub token to use when fetching the version list from bytecodealliance/wasm-tools. You shouldn't have to touch this. The default is the github.token if you're on github.com or unauthenticated (rate limited) if you're not on github.com.

Outputs

  • wasm-tools-version: The version of wasm-tools that was installed. This will be something like 1.0.0 or similar.

  • cache-hit: Whether or not wasm-tools was restored from the runner's cache or download anew.

Development

Node.js

How do I test my changes?
Open a Draft Pull Request and some magic GitHub Actions will run to test the action.

setup-wasm-tools's People

Contributors

rajatjindal avatar jcbhmr avatar alexcrichton avatar

Stargazers

 avatar

Watchers

 avatar

setup-wasm-tools's Issues

Action version resolution never works

Hi,

I would really like to use this action but it seems like it always fails no matter what version I specify, or even if I leave it to be the default:

node:internal/per_context/domexception:53
    ErrorCaptureStackTrace(this);
    ^
Error: ption [Error]: 1.207 resolved to null
    at new DOMException (node:internal/per_context/domexception:53:5)
    at file:///D:/a/_actions/jcbhmr/setup-wasm-tools/v2/dist/main.js:27422:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

https://github.com/rdunnington/bytebox/actions/runs/9142457688/job/25138027232#step:7:16

I'm using it like this:

      - name: Setup wasm-tools 
        uses: jcbhmr/setup-wasm-tools@v2
        with:
          wasm-tools-version: 1.207

https://github.com/rdunnington/bytebox/pull/37/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR42-R45

I'm not the most experienced GitHub actions user so I could be doing something wrong, feel free to let me know. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.