1
0
mirror of https://github.com/taigrr/wasm-experiments synced 2025-01-18 04:03:21 -08:00

Add tinygo build job

This commit is contained in:
Johan Brandhorst 2019-02-26 21:18:43 +00:00
parent 879c37868b
commit cf09e1dbc0
No known key found for this signature in database
GPG Key ID: 266C7D9B44EAA057

View File

@ -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/*