Skip to content

Commit

Permalink
ci: update Go versions and streamline build process (#15)
Browse files Browse the repository at this point in the history
* ci: update Go versions and streamline build process

Expanded testing to cover Go 1.18 to 1.23. Convinced our CI to use
Makefiles instead of clumsy individual commands—robots deserve some
stability too.

* chore: disabling unsupported versions

* ci: reduce test versions to modern survivalists

Trimmed down our Go and TinyGo versions, keeping only the ones
that didn't break under pressure. Who knew YAML had survival instincts?
  • Loading branch information
madflojo authored Jan 20, 2025
1 parent 5e87e10 commit 64c818e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
# This version must be <= max version of earliest TinyGo supported and >= min version of latest.
matrix:
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy
- "1.18" # Minimum Go version of latest TinyGo even if EOL.
- "1.22"
- "1.23"
tinygo-version: # Note: TinyGo only supports latest: https://github.com/tinygo-org/tinygo/releases
- "0.23.0" # Earliest version to support 1.18
- "0.26.0" # Latest
- "0.33.0"
- "0.34.0"
# - "0.35.0" // Currently Broken

steps:
- name: Set up Go
Expand All @@ -41,10 +43,10 @@ jobs:
uses: actions/checkout@v3

- name: Build example
run: tinygo build -o example/hello.wasm -scheduler=none --no-debug -target=wasi example/hello.go
run: make build

- name: Build test wasm
run: cd internal/e2e; make

- name: Test
run: go test -v ./...
run: make tests
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build:
tinygo build -o example/hello.wasm -scheduler=none --no-debug -target=wasi example/hello.go
$(MAKE) -C internal/e2e build

tests:
go test -v ./...
$(MAKE) -C internal test
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/wapc/wapc-guest-tinygo

go 1.16
go 1.18
2 changes: 2 additions & 0 deletions internal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
go test -v ./...

0 comments on commit 64c818e

Please sign in to comment.