From 0a8bfc57efa5fa9b64317233ad3666a0e955f0d2 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 11 Feb 2020 17:23:42 -0500 Subject: [PATCH] all: support Go 1.14 --- .circleci/config.yml | 15 +++++++++++---- Dockerfile | 4 ++-- azure-pipelines.yml | 2 +- builder/config.go | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 67ae7342..49886102 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -232,8 +232,8 @@ commands: - run: name: "Install dependencies" command: | - curl https://dl.google.com/go/go1.13.darwin-amd64.tar.gz -o go1.13.darwin-amd64.tar.gz - sudo tar -C /usr/local -xzf go1.13.darwin-amd64.tar.gz + curl https://dl.google.com/go/go1.14.darwin-amd64.tar.gz -o go1.14.darwin-amd64.tar.gz + sudo tar -C /usr/local -xzf go1.14.darwin-amd64.tar.gz ln -s /usr/local/go/bin/go /usr/local/bin/go HOMEBREW_NO_AUTO_UPDATE=1 brew install qemu - restore_cache: @@ -327,14 +327,20 @@ jobs: steps: - test-linux: llvm: "10" + test-llvm10-go114: + docker: + - image: circleci/golang:1.14-buster + steps: + - test-linux: + llvm: "10" assert-test-linux: docker: - - image: circleci/golang:1.13-stretch + - image: circleci/golang:1.14-stretch steps: - assert-test-linux build-linux: docker: - - image: circleci/golang:1.13-stretch + - image: circleci/golang:1.14-stretch steps: - build-linux build-macos: @@ -352,6 +358,7 @@ workflows: - test-llvm9-go111 - test-llvm10-go112 - test-llvm10-go113 + - test-llvm10-go114 - build-linux - build-macos - assert-test-linux diff --git a/Dockerfile b/Dockerfile index 4632c4fb..6d958125 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# TinyGo base stage installs Go 1.13, LLVM 10 and the TinyGo compiler itself. -FROM golang:1.13 AS tinygo-base +# TinyGo base stage installs Go 1.14, LLVM 10 and the TinyGo compiler itself. +FROM golang:1.14 AS tinygo-base RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \ echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main" >> /etc/apt/sources.list && \ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 135dcf41..40a222a1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,7 +12,7 @@ jobs: steps: - task: GoTool@0 inputs: - version: '1.13.8' + version: '1.14.1' - checkout: self - task: CacheBeta@0 displayName: Cache LLVM source diff --git a/builder/config.go b/builder/config.go index 8bb3a116..aabf82ac 100644 --- a/builder/config.go +++ b/builder/config.go @@ -25,8 +25,8 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) { if err != nil { return nil, fmt.Errorf("could not read version from GOROOT (%v): %v", goroot, err) } - if major != 1 || (minor != 11 && minor != 12 && minor != 13) { - return nil, fmt.Errorf("requires go version 1.11, 1.12, or 1.13, got go%d.%d", major, minor) + if major != 1 || minor < 11 || minor > 14 { + return nil, fmt.Errorf("requires go version 1.11, 1.12, 1.13, or 1.14, got go%d.%d", major, minor) } clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT")) return &compileopts.Config{