Skip to content

wit: sort packages in topological order when rendering WIT #707

wit: sort packages in topological order when rendering WIT

wit: sort packages in topological order when rendering WIT #707

Workflow file for this run

name: Go
on:
push:
branches:
- main
pull_request:
env:
wasm-tools-version: "1.218.0"
wasmtime-version: "25.0.1"
jobs:
# Vet Go code
vet-go:
name: Vet Go code
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Vet Go code
run: go vet ./...
# Test with Go
test-go:
name: Test with Go
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
go-version: ["1.22", "1.23"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Set up wasm-tools
uses: bytecodealliance/actions/wasm-tools/setup@v1
with:
version: ${{ env.wasm-tools-version }}
- name: Run Go tests
run: go test -v ./...
- name: Run Go tests with race detector
run: go test -v -race ./...
- name: Test Go without cgo
env:
CGO_ENABLED: 0
run: go test -v ./...
- name: Verify repo is unchanged
run: git diff --exit-code HEAD
# Test with TinyGo
test-tinygo:
name: Test with TinyGo
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
go-version: ["1.22", "1.23"]
tinygo-version: ["0.32.0", "0.33.0"]
exclude:
- go-version: "1.23"
tinygo-version: "0.31.2"
- go-version: "1.23"
tinygo-version: "0.32.0"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Set up TinyGo
uses: acifani/setup-tinygo@v2
with:
tinygo-version: ${{ matrix.tinygo-version }}
- name: Set up wasm-tools
uses: bytecodealliance/actions/wasm-tools/setup@v1
with:
version: ${{ env.wasm-tools-version }}
- name: Test with TinyGo
run: tinygo test -v ./...
- name: Verify repo is unchanged
run: git diff --exit-code HEAD
# Test with WebAssembly
test-wasm:
name: Test with WebAssembly
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
go-version: ["1.22", "1.23"]
tinygo-version: ["0.32.0", "0.33.0"]
exclude:
- go-version: "1.23"
tinygo-version: "0.31.2"
- go-version: "1.23"
tinygo-version: "0.32.0"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Set up TinyGo
uses: acifani/setup-tinygo@v2
with:
tinygo-version: ${{ matrix.tinygo-version }}
- name: Set up wasm-tools
uses: bytecodealliance/actions/wasm-tools/setup@v1
with:
version: ${{ env.wasm-tools-version }}
- name: Set up Wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: ${{ env.wasmtime-version }}
- name: Add Go wasm exec to $PATH
run: echo "$(go env GOROOT)/misc/wasm" >> $GITHUB_PATH
- name: Test wasm/wasip1 with Go
env:
GOARCH: wasm
GOOS: wasip1
run: go test -v ./...
- name: Test wasm/wasip1 with TinyGo 0.32.0
if: ${{ matrix.tinygo-version == '0.32.0' }}
run: tinygo test -v -target=wasi ./...
- name: Test wasm/wasip1 with TinyGo >= 0.33.0
if: ${{ matrix.tinygo-version != '0.32.0' }}
run: tinygo test -v -target=wasip1 ./...
- name: Test wasm/wasip2 with TinyGo >= 0.33.0
if: ${{ matrix.tinygo-version != '0.32.0' }}
run: tinygo test -v -target=wasip2 ./...
- name: Verify repo is unchanged
run: git diff --exit-code HEAD