Skip to content

Commit

Permalink
fix: deps version and workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Gaukas Wang <[email protected]>
  • Loading branch information
gaukas committed Jul 23, 2024
1 parent 083fb51 commit cb3f48e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 67 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,6 @@ 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
Expand Down Expand Up @@ -76,7 +44,6 @@ jobs:

release:
needs:
- watm_tinygo_v0_artifacts
- watm_tinygo_v1_artifacts
name: "Release WATM Examples for ${{ github.ref_name }}"
runs-on: ubuntu-latest
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/watm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@ jobs:
go build -v ./...
go test -v ./...
watm_build_tinygo_v0_examples:
name: "build ${{ matrix.examples }}.v0.tinygo.wasm w/ tinygo ${{ matrix.tinygo }} (go${{ matrix.go }})"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tinygo: [ "0.32.0" ] # latest tinygo version ONLY (1)
go: [ "1.21.x", "1.22.x" ] # latest 2 stable versions of Go. TODO: bump to 1.22.x once tinygo support added.
examples: [ "plain", "reverse", "utls" ] # Add examples here per ones under tinygo/v0/examples
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: ${{ matrix.tinygo }}
- name: Build
run: |
mkdir -p tmp
tinygo build -o tmp/${{ matrix.examples }}.wasm -target=wasi -tags=purego ./${{ matrix.examples }}/
working-directory: ./tinygo/v0/examples/

watm_build_tinygo_v1_examples:
name: "build ${{ matrix.examples }}.v1.tinygo.wasm w/ tinygo ${{ matrix.tinygo }} (go${{ matrix.go }})"
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions tinygo/snippets/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/refraction-networking/wazero v1.6.6-w h1:GopGAQ5/Rah0vzGImewwOrOaXFR+FmgWlgGKs1JpVlw=
github.com/refraction-networking/wazero v1.6.6-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/refraction-networking/wazero v1.7.3-w h1:Br3UuVPrKAD3pUSIlpT1+iBIYMbs8h2wS4d0ziU9Yoc=
github.com/refraction-networking/wazero v1.7.3-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
3 changes: 1 addition & 2 deletions tinygo/snippets/poll_oneoff/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ var pollWasm []byte

func main() {
ctx := context.Background()
ctx = context.WithValue(ctx, experimental.FunctionListenerFactoryKey{},
logging.NewHostLoggingListenerFactory(os.Stderr, logging.LogScopeFilesystem|logging.LogScopePoll|logging.LogScopeSock))
ctx = experimental.WithFunctionListenerFactory(ctx, logging.NewHostLoggingListenerFactory(os.Stderr, logging.LogScopeFilesystem|logging.LogScopePoll|logging.LogScopeSock))

r := wazero.NewRuntime(ctx)
defer r.Close(ctx)
Expand Down
6 changes: 3 additions & 3 deletions tinygo/v1/examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replace github.com/refraction-networking/watm => ../../../

require (
github.com/CosmWasm/tinyjson v0.9.0
github.com/refraction-networking/utls v1.6.6-wasm
github.com/refraction-networking/utls v1.6.7-wasm
github.com/refraction-networking/watm v0.6.5
)

Expand All @@ -17,6 +17,6 @@ require (
github.com/cloudflare/circl v1.3.9 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/sys v0.22.0 // indirect
)
8 changes: 4 additions & 4 deletions tinygo/v1/examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/refraction-networking/utls v1.6.6-wasm h1:fayTy1wZzzNSZqJ9rzMgDOoGVLS9/u0YIRQ9fUurlc0=
github.com/refraction-networking/utls v1.6.6-wasm/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
github.com/refraction-networking/utls v1.6.7-wasm h1:Ckc7ep+I9/9qeuXBrF3Lkx248sgUGt1JJBpya5hpth4=
github.com/refraction-networking/utls v1.6.7-wasm/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=

0 comments on commit cb3f48e

Please sign in to comment.