From cf09e1dbc08e4c9cffb2dd889b512b9c4fbc153c Mon Sep 17 00:00:00 2001 From: Johan Brandhorst Date: Tue, 26 Feb 2019 21:18:43 +0000 Subject: [PATCH] Add tinygo build job --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 18e5ad9..215d438 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,16 @@ hello: cp $$(go env GOROOT)/misc/wasm/wasm_exec.html ./html/index.html cp $$(go env GOROOT)/misc/wasm/wasm_exec.js ./html/wasm_exec.js +.PHONY: tinygo +tinygo: + rm -f ./html/* + docker run --rm -v $$(pwd):/go/src/github.com/johanbrandhorst/wasm-experiments --entrypoint /bin/bash tinygo/tinygo:latest -c "\ + cd /go/src/github.com/johanbrandhorst/wasm-experiments && \ + tinygo build -o ./html/test.wasm -target wasm ./$(target)/main.go && \ + cp /go/src/github.com/tinygo-org/tinygo/targets/wasm_exec.js ./html/wasm_exec.js\ + " + cp $$(go env GOROOT)/misc/wasm/wasm_exec.html ./html/index.html + .PHONY: channels channels: rm -f ./html/*