Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

update: reduce dynamic allocation #7

update: reduce dynamic allocation

update: reduce dynamic allocation #7

Workflow file for this run

name: "Release WATM"
# Build only on new tags
on:
push:
tags:
- '*'
env:
CGO_ENABLED: 0
jobs:
tinygo_v0_artifacts:
name: "Build tinygo_v0_${{ matrix.watm.name }}.wasm"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
watm: [
{ name: "plain", scheduler: "none", gc: "conservative", tags: "purego" },
{ name: "reverse", scheduler: "none", gc: "conservative", tags: "purego" },
{ name: "utls", scheduler: "asyncify", gc: "conservative", tags: "purego" }
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.30.0'
- name: Build WATM Artifacts
run: tinygo build -o tinygo_v0_${{ matrix.watm.name }}.wasm
-target=wasi -no-debug -scheduler=${{ matrix.watm.scheduler }}
-gc=${{ matrix.watm.gc }} -tags=${{ matrix.watm.tags }}
./tinygo/v0/examples/${{ matrix.watm.name }}/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: tinygo_v0_${{ matrix.watm.name }}
path: tinygo_v0_${{ matrix.watm.name }}.wasm
retention-days: 1
release:
needs: tinygo_v0_artifacts
name: "Release WATM Examples for ${{ github.ref_name }}"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: release-${{ github.ref_name }} # all artifacts
- name: List Artifacts
run: ls -R release-${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ github.ref_name }}
files: |
release-${{ github.ref_name }}/*/*.wasm