Git Product home page Git Product logo

setup-tinygo's Introduction

setup-tinygo

Check dist/ Validate

This actions sets up a TinyGo environment for GitHub Actions.

Usage

Basic

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'

With matrix expansion

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        tinygo: ['0.29.0', '0.30.0']
    name: TinyGo ${{ matrix.tinygo }}
    steps:
      - uses: actions/checkout@v2
      - uses: acifani/setup-tinygo@v2
        with:
          tinygo-version: ${{ matrix.tinygo }}

With custom Go version

TinyGo needs Go and, by default, this action will use whatever version is available in the runner. If you want to control the Go version, you can use actions/setup-go before acifani/setup-tinygo

steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v2
    with:
      go-version: 1.21
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'

With custom Binaryen version

This action will install Binaryen which is needed for building WASM on Windows and MacOS. You can customize the version with the dedicated input value

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'
      binaryen-version: '116'

Without Binaryen

If you don't need Binaryen, you can omit the installation

steps:
  - uses: actions/checkout@v2
  - uses: acifani/setup-tinygo@v2
    with:
      tinygo-version: '0.30.0'
      install-binaryen: 'false'

setup-tinygo's People

Contributors

acifani avatar dependabot[bot] avatar sg0hsmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

setup-tinygo's Issues

[Feature Request] Allow install binaryen only

Firstly, thank you for your awesome project!
Because of some bugs I couldn't apply tinygo in my project, I use go compiler to generate wasm. but I still use binaryen to optimise wasm.
I noticed that your project already provides a perfect binaryen setup, I was wondering if it would be possible to provide an option that would allow me to skip the installation of tinygo, e.g. by passing in false?

Able to omit binaryen installation

Sometimes, for example for compiling WebAssembly plugins with TinyGo binaryen installation is not needed.
It would be nice to have an option, to omit binaryen installation for reducing traffic and resource consumption

error: could not find wasm-opt, set the WASMOPT environment variable to override (macOS runner)

๐Ÿ‘‹๐Ÿป I've been trying to use this action but finding that I get the following error on the macOS runner:

error: could not find wasm-opt, set the WASMOPT environment variable to override

I then found this tinygo issue: tinygo-org/tinygo#2319 which suggests:

brew install binaryen wasm-tools

But looks like even though these two packages install fine, I still get the error.

Any ideas on how to resolve this issue?

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.