diff --git a/.circleci/config.yml b/.circleci/config.yml index f863d6817..646045c0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,12 +1,11 @@ version: 2.1 orbs: - go: gotest/tools@0.0.13 aws-cli: circleci/aws-cli@1.3.2 executors: golang: docker: - - image: circleci/golang:1.16.4 + - image: cimg/go:1.17.9 resource_class: 2xlarge ubuntu: docker: @@ -25,8 +24,9 @@ executors: commands: install-deps: steps: - - go/install-ssh - - go/install: {package: git} + - run: | + sudo apt update + sudo apt install python-is-python3 prepare: parameters: linux: @@ -110,8 +110,12 @@ jobs: steps: - install-deps - prepare - - go/mod-tidy-check - + - run: go mod tidy -v + - run: + name: Check git diff + command: | + git --no-pager diff go.mod go.sum + git --no-pager diff --quiet go.mod go.sum build-all: executor: golang steps: @@ -188,9 +192,6 @@ jobs: command: make deps lotus no_output_timeout: 30m - download-params - - go/install-gotestsum: - gobin: $HOME/.local/bin - version: 0.5.2 - run: name: go test environment: @@ -215,8 +216,6 @@ jobs: - when: condition: << parameters.codecov-upload >> steps: - - go/install: {package: bash} - - go/install: {package: curl} - run: shell: /bin/bash -eo pipefail command: | @@ -255,9 +254,6 @@ jobs: cd extern/test-vectors git fetch git checkout origin/<< parameters.vectors-branch >> - - go/install-gotestsum: - gobin: $HOME/.local/bin - version: 0.5.2 - run: name: install statediff globally command: | @@ -370,8 +366,8 @@ jobs: - run: name: Install go command: | - curl -O https://dl.google.com/go/go1.16.4.darwin-amd64.pkg && \ - sudo installer -pkg go1.16.4.darwin-amd64.pkg -target / + curl -O https://dl.google.com/go/go1.17.9.darwin-amd64.pkg && \ + sudo installer -pkg go1.17.9.darwin-amd64.pkg -target / - run: name: Install pkg-config command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config @@ -512,9 +508,6 @@ jobs: executor: type: executor default: golang - golangci-lint-version: - type: string - default: 1.27.0 concurrency: type: string default: '2' @@ -533,13 +526,10 @@ jobs: - run: command: make deps no_output_timeout: 30m - - go/install-golangci-lint: - gobin: $HOME/.local/bin - version: << parameters.golangci-lint-version >> - run: name: Lint command: | - $HOME/.local/bin/golangci-lint run -v --timeout 2m \ + golangci-lint run -v --timeout 2m \ --concurrency << parameters.concurrency >> << parameters.args >> lint-all: <<: *lint diff --git a/.circleci/template.yml b/.circleci/template.yml index 82e5bb8f6..755a4f0fa 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -1,12 +1,11 @@ version: 2.1 orbs: - go: gotest/tools@0.0.13 aws-cli: circleci/aws-cli@1.3.2 executors: golang: docker: - - image: circleci/golang:1.16.4 + - image: cimg/go:1.17.9 resource_class: 2xlarge ubuntu: docker: @@ -25,8 +24,9 @@ executors: commands: install-deps: steps: - - go/install-ssh - - go/install: {package: git} + - run: | + sudo apt update + sudo apt install python-is-python3 prepare: parameters: linux: @@ -110,8 +110,12 @@ jobs: steps: - install-deps - prepare - - go/mod-tidy-check - + - run: go mod tidy -v + - run: + name: Check git diff + command: | + git --no-pager diff go.mod go.sum + git --no-pager diff --quiet go.mod go.sum build-all: executor: golang steps: @@ -188,9 +192,6 @@ jobs: command: make deps lotus no_output_timeout: 30m - download-params - - go/install-gotestsum: - gobin: $HOME/.local/bin - version: 0.5.2 - run: name: go test environment: @@ -215,8 +216,6 @@ jobs: - when: condition: << parameters.codecov-upload >> steps: - - go/install: {package: bash} - - go/install: {package: curl} - run: shell: /bin/bash -eo pipefail command: | @@ -255,9 +254,6 @@ jobs: cd extern/test-vectors git fetch git checkout origin/<< parameters.vectors-branch >> - - go/install-gotestsum: - gobin: $HOME/.local/bin - version: 0.5.2 - run: name: install statediff globally command: | @@ -370,8 +366,8 @@ jobs: - run: name: Install go command: | - curl -O https://dl.google.com/go/go1.16.4.darwin-amd64.pkg && \ - sudo installer -pkg go1.16.4.darwin-amd64.pkg -target / + curl -O https://dl.google.com/go/go1.17.9.darwin-amd64.pkg && \ + sudo installer -pkg go1.17.9.darwin-amd64.pkg -target / - run: name: Install pkg-config command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config @@ -512,9 +508,6 @@ jobs: executor: type: executor default: golang - golangci-lint-version: - type: string - default: 1.27.0 concurrency: type: string default: '2' @@ -533,13 +526,10 @@ jobs: - run: command: make deps no_output_timeout: 30m - - go/install-golangci-lint: - gobin: $HOME/.local/bin - version: << parameters.golangci-lint-version >> - run: name: Lint command: | - $HOME/.local/bin/golangci-lint run -v --timeout 2m \ + golangci-lint run -v --timeout 2m \ --concurrency << parameters.concurrency >> << parameters.args >> lint-all: <<: *lint diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 33725d70d..a86b077b8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-go@v1 with: - go-version: '1.16.4' + go-version: '1.17.9' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/Dockerfile.lotus b/Dockerfile.lotus index 4a7001178..3e35f1c0c 100644 --- a/Dockerfile.lotus +++ b/Dockerfile.lotus @@ -1,4 +1,4 @@ -FROM golang:1.16.4 AS builder-deps +FROM golang:1.17.9-buster AS builder-deps MAINTAINER Lotus Development Team RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev diff --git a/Makefile b/Makefile index 12f67ca3e..01df252c9 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ GOCC?=go GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}') ifeq ($(shell expr $(GOVERSION) \< 1016000), 1) $(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000)) -$(error Update Golang to version to at least 1.16.0) +$(error Update Golang to version to at least 1.17.9) endif # git modules that need to be loaded diff --git a/README.md b/README.md index 055937398..357fa2e89 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,10 @@ For other distributions you can find the required dependencies [here.](https://d #### Go -To build Lotus, you need a working installation of [Go 1.16.4 or higher](https://golang.org/dl/): +To build Lotus, you need a working installation of [Go 1.17.9 or higher](https://golang.org/dl/): ```bash -wget -c https://golang.org/dl/go1.16.4.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +wget -c https://golang.org/dl/go1.17.9.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local ``` **TIP:** diff --git a/testplans/docker-images/Dockerfile.oni-buildbase b/testplans/docker-images/Dockerfile.oni-buildbase index 265066537..fd5f98a67 100644 --- a/testplans/docker-images/Dockerfile.oni-buildbase +++ b/testplans/docker-images/Dockerfile.oni-buildbase @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16.3 +ARG GO_VERSION=1.17.9 FROM golang:${GO_VERSION}-buster diff --git a/testplans/docker-images/Dockerfile.oni-runtime b/testplans/docker-images/Dockerfile.oni-runtime index 27144069a..e2327f2af 100644 --- a/testplans/docker-images/Dockerfile.oni-runtime +++ b/testplans/docker-images/Dockerfile.oni-runtime @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16.3 +ARG GO_VERSION=1.17.9 FROM golang:${GO_VERSION}-buster as downloader diff --git a/testplans/docker-images/Dockerfile.oni-runtime-debug b/testplans/docker-images/Dockerfile.oni-runtime-debug index 856fcc1fc..8d1e411a1 100644 --- a/testplans/docker-images/Dockerfile.oni-runtime-debug +++ b/testplans/docker-images/Dockerfile.oni-runtime-debug @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.16.3 +ARG GO_VERSION=1.17.9 FROM golang:${GO_VERSION}-buster as downloader