diff options
author | Samuel Marks <samuelmarks@gmail.com> | 2019-02-26 12:12:13 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | 06de3ff42efa5e53e56284d08928ee598cf40751 (patch) | |
tree | c7cf316c1930eb6456fbaaeb19e699d7c3b9b20e | |
parent | 1a2059fc4e00a34fb555dff1528d6a1e88e7a1ec (diff) | |
download | go-tangerine-06de3ff42efa5e53e56284d08928ee598cf40751.tar.gz go-tangerine-06de3ff42efa5e53e56284d08928ee598cf40751.tar.zst go-tangerine-06de3ff42efa5e53e56284d08928ee598cf40751.zip |
travis, appveyor, Dockerfile: upgrade to Go 1.12
Include serveral DEXON specific fixes.
-rw-r--r-- | .travis.yml | 48 | ||||
-rw-r--r-- | Dockerfile | 5 | ||||
-rw-r--r-- | Dockerfile.alltools | 6 | ||||
-rw-r--r-- | appveyor.yml | 4 | ||||
-rw-r--r-- | core/tx_pool_test.go | 2 | ||||
-rw-r--r-- | crypto/bn256/cloudflare/main_test.go | 2 | ||||
-rw-r--r-- | crypto/bn256/google/main_test.go | 2 | ||||
-rw-r--r-- | internal/build/util.go | 4 |
8 files changed, 28 insertions, 45 deletions
diff --git a/.travis.yml b/.travis.yml index f59b817b9..0ee610b06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,20 +10,7 @@ matrix: - os: linux dist: xenial sudo: required - go: 1.10.x - script: - - sudo modprobe fuse - - sudo chmod 666 /dev/fuse - - sudo chown root:$USER /etc/fuse.conf - - make libbls - - go run build/ci.go install - - travis_retry go run build/ci.go test -coverage $TEST_PACKAGES - - # These are the latest Go versions. - - os: linux - dist: xenial - sudo: required - go: 1.11.x + go: 1.12.x script: - sudo modprobe fuse - sudo chmod 666 /dev/fuse @@ -33,7 +20,7 @@ matrix: - travis_retry go run build/ci.go test -coverage $TEST_PACKAGES - os: osx - go: 1.11.x + go: 1.12.x script: - echo "Increase the maximum number of open file descriptors on macOS" - NOFILE=20480 @@ -56,7 +43,7 @@ matrix: # This builder only tests code linters on latest version of Go - os: linux dist: xenial - go: 1.11.x + go: 1.12.x env: - lint git: @@ -64,14 +51,15 @@ matrix: script: - go run build/ci.go lint - - os: osx - go: 1.11.x + - os: linux + dist: xenial + go: 1.12.x env: - smoke-test git: submodules: false script: - - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig make all + - make gdex - cd test - ./run_test.sh --ignore-log - cd .. @@ -81,16 +69,12 @@ matrix: - ./run_test.sh --continue --ignore-log - cd .. - ./build/recovery-test.sh - addons: - homebrew: - packages: - - ethereum # This builder does the Ubuntu PPA upload #- if: type = push # os: linux - # dist: trusty - # go: 1.11.x + # dist: xenial + # go: 1.12.x # env: # - ubuntu-ppa # git: @@ -110,7 +94,7 @@ matrix: os: linux dist: xenial sudo: required - go: 1.11.x + go: 1.12.x env: - gcp-linux git: @@ -146,10 +130,10 @@ matrix: # -upload dexon-builds #- if: type = push # os: linux - # dist: trusty + # dist: xenial # services: # - docker - # go: 1.11.x + # go: 1.12.x # env: # - gcp-linux-mips # git: @@ -182,7 +166,7 @@ matrix: # -upload dexon-builds #- if: type = push # os: linux - # dist: trusty + # dist: xenial # addons: # apt: # packages: @@ -220,7 +204,7 @@ matrix: # -upload dexon-builds - if: type = push os: osx - go: 1.11.x + go: 1.12.x env: - gcp-osx - gcp-ios @@ -249,8 +233,8 @@ matrix: # - go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload dexon-builds - if: type = cron os: linux - dist: trusty - go: 1.11.x + dist: xenial + go: 1.12.x env: - gcp-purge git: diff --git a/Dockerfile b/Dockerfile index 8a187c5b9..01490d5b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -# Build Gdex in a stock Go builder container -FROM golang:1.11-alpine3.9 as builder +FROM golang:1.12-alpine as builder RUN apk add --no-cache make gcc musl-dev linux-headers g++ gmp-dev openssl-dev pkgconfig @@ -7,7 +6,7 @@ ADD . /dexon RUN cd /dexon && make clean && DOCKER=alpine make gdex all # Pull Gdex into a second stage deploy alpine container -FROM alpine:3.9 +FROM alpine:latest RUN apk add --no-cache ca-certificates libstdc++ curl gmp openssl COPY --from=builder /dexon/build/bin/gdex /usr/local/bin/ diff --git a/Dockerfile.alltools b/Dockerfile.alltools index e8c022fd2..9c85a8802 100644 --- a/Dockerfile.alltools +++ b/Dockerfile.alltools @@ -1,5 +1,5 @@ -# Build Gdex in a stock Go builder container -FROM golang:1.11-alpine3.9 as builder +# Build Geth in a stock Go builder container +FROM golang:1.12-alpine as builder RUN apk add --no-cache make gcc musl-dev linux-headers g++ gmp-dev openssl-dev pkgconfig @@ -7,7 +7,7 @@ ADD . /dexon RUN cd /dexon && make clean && DOCKER=alpine make all # Pull all binaries into a second stage deploy alpine container -FROM alpine:3.9 +FROM alpine:latest RUN apk add --no-cache ca-certificates libstdc++ gmp openssl COPY --from=builder /dexon/build/bin/* /usr/local/bin/ diff --git a/appveyor.yml b/appveyor.yml index 9ed4f114e..515f3d9fb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,8 +23,8 @@ environment: install: - git submodule update --init - rmdir C:\go /s /q - - appveyor DownloadFile https://storage.googleapis.com/golang/go1.11.5.windows-%GETH_ARCH%.zip - - 7z x go1.11.5.windows-%GETH_ARCH%.zip -y -oC:\ > NUL + - appveyor DownloadFile https://dl.google.com/go/go1.12.windows-%GETH_ARCH%.zip + - 7z x go1.12.windows-%GETH_ARCH%.zip -y -oC:\ > NUL - go version - gcc --version diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go index 70d4a351a..2b362bdd4 100644 --- a/core/tx_pool_test.go +++ b/core/tx_pool_test.go @@ -131,7 +131,7 @@ func validateEvents(events chan NewTxsEvent, count int) error { case ev := <-events: received = append(received, ev.Txs...) case <-time.After(time.Second): - return fmt.Errorf("event #%d not fired", received) + return fmt.Errorf("event #%d not fired", len(received)) } } if len(received) > count { diff --git a/crypto/bn256/cloudflare/main_test.go b/crypto/bn256/cloudflare/main_test.go index 0230f1b19..c0c85457b 100644 --- a/crypto/bn256/cloudflare/main_test.go +++ b/crypto/bn256/cloudflare/main_test.go @@ -13,7 +13,7 @@ func TestRandomG2Marshal(t *testing.T) { t.Error(err) continue } - t.Logf("%d: %x\n", n, g2.Marshal()) + t.Logf("%v: %x\n", n, g2.Marshal()) } } diff --git a/crypto/bn256/google/main_test.go b/crypto/bn256/google/main_test.go index 0230f1b19..c0c85457b 100644 --- a/crypto/bn256/google/main_test.go +++ b/crypto/bn256/google/main_test.go @@ -13,7 +13,7 @@ func TestRandomG2Marshal(t *testing.T) { t.Error(err) continue } - t.Logf("%d: %x\n", n, g2.Marshal()) + t.Logf("%v: %x\n", n, g2.Marshal()) } } diff --git a/internal/build/util.go b/internal/build/util.go index a41ecfbed..b34371c2d 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -143,9 +143,9 @@ func CopyFile(dst, src string, mode os.FileMode) { // so that go commands executed by build use the same version of Go as the 'host' that runs // build code. e.g. // -// /usr/lib/go-1.11/bin/go run build/ci.go ... +// /usr/lib/go-1.12/bin/go run build/ci.go ... // -// runs using go 1.11 and invokes go 1.11 tools from the same GOROOT. This is also important +// runs using go 1.12 and invokes go 1.12 tools from the same GOROOT. This is also important // because runtime.Version checks on the host should match the tools that are run. func GoTool(tool string, args ...string) *exec.Cmd { args = append([]string{tool}, args...) |