Skip to content

Commit

Permalink
chore(deps): updating dependencies and adding dependabot (#59)
Browse files Browse the repository at this point in the history
* chore(deps): updating dependencies and adding dependabot

* bumping gomod min version to match wazero

* updating actions based on latest go version

* bumping tinygo version

* removing unneccessary wasm files

* adding wasm files to ignore file

* trying a different tinygo version

* trying something to make sure we are using the right tinygo

* maybe build flags

* using docker for tinygo to avoid environmental weirdness

* cleaing up actions config

* wrapping go version in quotes
  • Loading branch information
madflojo committed Jun 16, 2024
1 parent 89be944 commit 333f74f
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 22 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
14 changes: 2 additions & 12 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: '1.20'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown

- name: Set up TinyGo
run: | # Installing via curl so commands are similar on OS/x
tinygo_version=0.25.0
curl -sSL https://github.com/tinygo-org/tinygo/releases/download/v${tinygo_version}/tinygo${tinygo_version}.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf -
echo "TINYGOROOT=/usr/local/tinygo" >> $GITHUB_ENV
echo "/usr/local/tinygo/bin" >> $GITHUB_PATH
- name: Build Wasm
run: make build-wasm

- name: Test
run: go test -v ./...

- name: Run Example
run: go run example/main.go waPC!
run: make tests
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ vendor

# Mac stuff
.DS_Store

# Generated wasm files
*.wasm
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/wapc/wapc-go

go 1.18
go 1.20

require (
github.com/Workiva/go-datastructures v1.0.53
github.com/Workiva/go-datastructures v1.1.5
github.com/bytecodealliance/wasmtime-go v1.0.0
github.com/tetratelabs/wazero v1.0.0
github.com/tetratelabs/wazero v1.7.3
github.com/wasmerio/wasmer-go v1.0.4
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig=
github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A=
github.com/Workiva/go-datastructures v1.1.5 h1:5YfhQ4ry7bZc2Mc7R0YZyYwpf5c6t1cEFvdAhd6Mkf4=
github.com/Workiva/go-datastructures v1.1.5/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A=
github.com/bytecodealliance/wasmtime-go v1.0.0 h1:9u9gqaUiaJeN5IoD1L7egD8atOnTGyJcNp8BhkL9cUU=
github.com/bytecodealliance/wasmtime-go v1.0.0/go.mod h1:jjlqQbWUfVSbehpErw3UoWFndBXRRMvfikYH6KsCwOg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -10,8 +10,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/tetratelabs/wazero v1.0.0 h1:sCE9+mjFex95Ki6hdqwvhyF25x5WslADjDKIFU5BXzI=
github.com/tetratelabs/wazero v1.0.0/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ=
github.com/tetratelabs/wazero v1.7.3 h1:PBH5KVahrt3S2AHgEjKu4u+LlDbbk+nsGE3KLucy6Rw=
github.com/tetratelabs/wazero v1.7.3/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=
github.com/wasmerio/wasmer-go v1.0.4 h1:MnqHoOGfiQ8MMq2RF6wyCeebKOe84G88h5yv+vmxJgs=
Expand Down
2 changes: 1 addition & 1 deletion hello/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build:
@echo "----------"
@echo "Building Go wasm Guest"
@echo "----------"
tinygo build -o hello.wasm -scheduler=none --no-debug -target=wasi main.go
docker run -v `pwd`/:/build -w /build tinygo/tinygo:0.25.0 tinygo build -o hello.wasm -scheduler=none --no-debug -target=wasi main.go
Binary file removed hello/hello.wasm
Binary file not shown.
Binary file removed testdata/as/hello.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion testdata/go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build:
@echo "----------"
@echo "Building Go wasm Guest"
@echo "----------"
tinygo build -o hello.wasm -scheduler=none --no-debug -target=wasi main.go
docker run -v `pwd`/:/build -w /build tinygo/tinygo:0.25.0 tinygo build -o hello.wasm -scheduler=none --no-debug -target=wasi main.go
Binary file removed testdata/go/hello.wasm
Binary file not shown.
Binary file removed testdata/rust/hello.wasm
Binary file not shown.

0 comments on commit 333f74f

Please sign in to comment.