From 86f48da59457f6edf87004e1d80c03548c8f78fd Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 25 Nov 2019 10:39:16 +0100 Subject: [PATCH] ci: build with Go 1.13 on Windows The default Go version is 1.12. Because Go 1.13 introduced language changes (improved numeric constants), TinyGo compiled with Go 1.12 cannot handle Go 1.13 code such as the Go 1.13 standard library. Use Go 1.13 to build TinyGo on Azure Pipelines to fix this. --- Makefile | 1 + azure-pipelines.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2aef0857..d5671a40 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,7 @@ tinygo-test: .PHONY: smoketest smoketest: + $(TINYGO) version # test all examples $(TINYGO) build -size short -o test.hex -target=pca10040 examples/blinky1 @$(MD5SUM) test.hex diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6e25acc0..5c811911 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,14 +50,16 @@ jobs: inputs: targetType: inline script: | - export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu" + export PATH="/c/Go1.13/bin:$PATH:./llvm-build/bin:/c/Program Files/qemu" + unset GOROOT make test - task: Bash@3 displayName: Build TinyGo release tarball inputs: targetType: inline script: | - export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu" + export PATH="/c/Go1.13/bin:$PATH:./llvm-build/bin:/c/Program Files/qemu" + unset GOROOT make release -j4 - publish: $(System.DefaultWorkingDirectory)/build/release.tar.gz displayName: Publish tarball as artifact @@ -67,5 +69,6 @@ jobs: inputs: targetType: inline script: | - export PATH="$PATH:./llvm-build/bin:/c/Program Files/qemu" + export PATH="/c/Go1.13/bin:$PATH:./llvm-build/bin:/c/Program Files/qemu" + unset GOROOT make smoketest TINYGO=build/tinygo AVR=0 RISCV=0