Skip to content

Commit

Permalink
Update to upstream TinyGo 0.27.0 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Feb 13, 2023
1 parent 0d6d8a3 commit 1afad8c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 122 deletions.
68 changes: 0 additions & 68 deletions .github/workflows/buildtools-tinygo.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ on:

env:
GO_VERSION: 1.19
TINYGO_VERSION: 0.26.0
WABT_VERSION: 1.0.29
TINYGO_VERSION: 0.27.0
# Test against latest two releases and latest dev
ENVOY_IMAGES: >
envoyproxy/envoy:v1.24-latest
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/nightly-coraza-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:

env:
GO_VERSION: 1.19
TINYGO_VERSION: 0.26.0
WABT_VERSION: 1.0.29
TINYGO_VERSION: 0.27.0

jobs:
test:
Expand All @@ -25,15 +24,11 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: true

- name: Install TinyGo and wabt
- name: Install TinyGo
run: |
gh release download v${TINYGO_VERSION} -p '*.linux-amd64.tar.gz' -D ~ -R github.com/tinygo-org/tinygo
tar -xf ~/tinygo${TINYGO_VERSION}.linux-amd64.tar.gz -C $HOME
echo "$HOME/tinygo/bin" >> $GITHUB_PATH
gh release download ${WABT_VERSION} -p '*-ubuntu.tar.gz' -D ~ -R github.com/WebAssembly/wabt
tar -xf ~/wabt-${WABT_VERSION}-ubuntu.tar.gz -C $HOME
echo "$HOME/wabt-${WABT_VERSION}/bin" >> $GITHUB_PATH
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
21 changes: 0 additions & 21 deletions buildtools/tinygo/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions buildtools/tinygo/wasi-libc.Dockerfile

This file was deleted.

13 changes: 2 additions & 11 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

var minGoVersion = "1.19"
var tinygoMinorVersion = "0.26"
var tinygoMinorVersion = "0.27"
var addLicenseVersion = "04bfe4ee9ca5764577b029acc6a1957fd1997153" // https://github.com/google/addlicense
var golangCILintVer = "v1.48.0" // https://github.com/golangci/golangci-lint/releases
var gosImportsVer = "v0.3.1" // https://github.com/rinchsan/gosimports/releases/tag/v0.3.1
Expand Down Expand Up @@ -185,16 +185,7 @@ func Build() error {
}
}

wd, err := os.Getwd()
if err != nil {
return err
}

script := fmt.Sprintf(`
cd /src && \
tinygo build -gc=custom -opt=2 -o %s -scheduler=none -target=wasi %s`, filepath.Join("build", "mainraw.wasm"), buildTagArg)
if err := sh.RunV("docker", "run", "--pull=always", "--rm", "-v", fmt.Sprintf("%s:/src", wd), "ghcr.io/corazawaf/coraza-proxy-wasm/buildtools-tinygo:sha-96443bb",
"bash", "-c", script); err != nil {
if err := sh.RunV("tinygo", "build", "-gc=custom", "-opt=2", "-o", filepath.Join("build", "mainraw.wasm"), "-scheduler=none", "-target=wasi", buildTagArg); err != nil {
return err
}

Expand Down

0 comments on commit 1afad8c

Please sign in to comment.