update: better utls WATM with improved JSON conf (#13) #6
Workflow file for this run
This file contains 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
name: "Release" | |
# Build only on new tags | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
CGO_ENABLED: 0 | |
jobs: | |
watm_tinygo_v0_artifacts: | |
name: "watm: build ${{ matrix.watm.name }}.v0.tinygo.wasm with TinyGo" | |
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.22.x" | |
- uses: acifani/setup-tinygo@v2 | |
with: | |
tinygo-version: '0.32.0' | |
- name: Build WATM Artifacts | |
run: tinygo build -o ../../../${{ matrix.watm.name }}.v0.tinygo.wasm | |
-target=wasi -no-debug -scheduler=${{ matrix.watm.scheduler }} | |
-gc=${{ matrix.watm.gc }} -tags=${{ matrix.watm.tags }} | |
./${{ matrix.watm.name }}/ | |
working-directory: ./tinygo/v0/examples/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.watm.name }}.v0.tinygo | |
path: ${{ matrix.watm.name }}.v0.tinygo.wasm | |
retention-days: 1 | |
watm_tinygo_v1_artifacts: | |
name: "watm: build ${{ matrix.watm.name }}.v1.tinygo.wasm with TinyGo" | |
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.22.x" | |
- uses: acifani/setup-tinygo@v2 | |
with: | |
tinygo-version: '0.32.0' | |
- name: Build WATM Artifacts | |
run: tinygo build -o ../../../${{ matrix.watm.name }}.v1.tinygo.wasm | |
-target=wasi -no-debug -scheduler=${{ matrix.watm.scheduler }} | |
-gc=${{ matrix.watm.gc }} -tags=${{ matrix.watm.tags }} | |
./${{ matrix.watm.name }}/ | |
working-directory: ./tinygo/v1/examples/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.watm.name }}.v1.tinygo | |
path: ${{ matrix.watm.name }}.v1.tinygo.wasm | |
retention-days: 1 | |
release: | |
needs: | |
- watm_tinygo_v0_artifacts | |
name: "Release WATM Examples for ${{ github.ref_name }}" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
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@v2 | |
# if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: ${{ github.ref_name }} | |
files: | | |
release-${{ github.ref_name }}/**/*.wasm | |
prerelease: true | |
body: | | |
Automatically build for ${{ github.ref_name }} by softprops/action-gh-release. Attached artifacts are not automatically validated or tested with the latest WATER. |