diff --git a/.circleci/config.yml b/.circleci/config.yml index e2c9911..a9d1c20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,8 @@ version: 2.1 orbs: - # NB: 1.7.2 is not the Go version, but the Orb version + # NB: this is not the Go version, but the Orb version # https://circleci.com/developer/orbs/orb/circleci/go#usage-go-modules-cache - go: circleci/go@1.7.2 + go: circleci/go@1.11.0 commands: setup-home-local-bin: steps: @@ -99,10 +99,6 @@ parameters: type: boolean default: false - release_docker_baseimage_tag: - type: string - default: "1.21" - workflows: version: 2 @@ -110,20 +106,20 @@ workflows: when: << pipeline.parameters.do_ci >> jobs: - quickcheck-docs - - quickcheck-go: &quickcheck-go-smoketest - name: quickcheck-go-amd64-linux-1.21 - goversion: &latest-go-release "1.21" + - quickcheck-go: + name: quickcheck-go-amd64-linux-1.23.1 + goversion: &latest-go-release "1.23.1" goos: linux goarch: amd64 - - test-go-on-latest-go-release: + - test-go: goversion: *latest-go-release - quickcheck-go: requires: - - quickcheck-go-amd64-linux-1.21 #quickcheck-go-smoketest.name - matrix: &quickcheck-go-matrix + - quickcheck-go-amd64-linux-1.23.1 #quickcheck-go-smoketest.name + matrix: alias: quickcheck-go-matrix parameters: - goversion: [*latest-go-release, "1.20"] + goversion: [*latest-go-release, "1.22.7"] goos: ["linux", "freebsd"] goarch: ["amd64", "arm64"] exclude: @@ -138,6 +134,7 @@ workflows: goos: ["linux"] goarch: ["amd64"] requires: + - test-go - quickcheck-go-<< matrix.goarch >>-<< matrix.goos >>-<< matrix.goversion >> release: @@ -167,7 +164,7 @@ workflows: jobs: quickcheck-docs: docker: - - image: cimg/base:2023.09 + - image: cimg/base:2024.09 steps: - checkout - install-docdep @@ -186,10 +183,12 @@ jobs: goarch: type: string docker: - - image: cimg/go:<> + # any toolchain >= 1.22 will auto-download GOTOOLCHAIN + - image: &cimg_with_modern_go cimg/go:1.22 environment: GOOS: <> GOARCH: <> + GOTOOLCHAIN: "go<>" steps: - checkout @@ -237,12 +236,14 @@ jobs: - run: sudo zfs version - run: sudo make test-platform GOOS="$GOOS" GOARCH="$GOARCH" - test-go-on-latest-go-release: + test-go: parameters: goversion: type: string docker: - - image: cimg/go:<> + - image: *cimg_with_modern_go + environment: + GOTOOLCHAIN: "go<>" steps: - checkout - go/load-cache: @@ -256,7 +257,7 @@ jobs: image: ubuntu-2004:202201-02 steps: - checkout - - run: make release-docker RELEASE_DOCKER_BASEIMAGE_TAG=<> + - run: make release-docker - persist_to_workspace: root: . paths: [.] @@ -286,7 +287,7 @@ jobs: release-upload: docker: - - image: cimg/base:2020.08 + - image: cimg/base:2024.09 steps: - attach_workspace: at: . @@ -296,7 +297,7 @@ jobs: publish-zrepl-github-io: docker: - - image: cimg/base:2023.09 + - image: cimg/base:2024.09 steps: - checkout - install-docdep diff --git a/Makefile b/Makefile index 6e3e7bd..fcc4b8a 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ GOARCH ?= $(shell bash -c 'source <($(GO) env) && echo "$$GOARCH"') GOARM ?= $(shell bash -c 'source <($(GO) env) && echo "$$GOARM"') GOHOSTOS ?= $(shell bash -c 'source <($(GO) env) && echo "$$GOHOSTOS"') GOHOSTARCH ?= $(shell bash -c 'source <($(GO) env) && echo "$$GOHOSTARCH"') -GO_ENV_VARS := GO111MODULE=on CGO_ENABLED=0 +GO_ENV_VARS := CGO_ENABLED=0 GO_LDFLAGS := "-X github.com/zrepl/zrepl/version.zreplVersion=$(_ZREPL_VERSION)" GO_MOD_READONLY := -mod=readonly GO_EXTRA_BUILDFLAGS := @@ -30,8 +30,8 @@ GO_BUILDFLAGS := $(GO_MOD_READONLY) $(GO_EXTRA_BUILDFLAGS) GO_BUILD := $(GO_ENV_VARS) $(GO) build $(GO_BUILDFLAGS) -ldflags $(GO_LDFLAGS) GOLANGCI_LINT := golangci-lint GOCOVMERGE := gocovmerge -RELEASE_DOCKER_BASEIMAGE_TAG ?= 1.21 -RELEASE_DOCKER_BASEIMAGE ?= golang:$(RELEASE_DOCKER_BASEIMAGE_TAG) +RELEASE_DOCKER_TOOLCHAIN ?= 1.22.7 +RELEASE_DOCKER_BASEIMAGE ?= golang:$(RELEASE_DOCKER_TOOLCHAIN) ifneq ($(GOARM),) ZREPL_TARGET_TUPLE := $(GOOS)-$(GOARCH)v$(GOARM) @@ -59,6 +59,7 @@ release: clean $(MAKE) noarch release-docker: $(ARTIFACTDIR) + # upstream docker image sets GOTOOLCHAIN=local sed 's/FROM.*!SUBSTITUTED_BY_MAKEFILE/FROM $(RELEASE_DOCKER_BASEIMAGE)/' build.Dockerfile > artifacts/release-docker.Dockerfile docker build -t zrepl_release --pull -f artifacts/release-docker.Dockerfile . docker run --rm -i -v $(CURDIR):/src -u $$(id -u):$$(id -g) \ diff --git a/build.installprotoc.bash b/build.installprotoc.bash index c39c74a..6320ee7 100644 --- a/build.installprotoc.bash +++ b/build.installprotoc.bash @@ -5,7 +5,7 @@ set -x MACH=$(uname -m) MACH="${MACH/aarch64/aarch_64}" -VERSION=3.6.1 +VERSION=28.0 FILENAME=protoc-"$VERSION"-linux-"$MACH".zip if [ -e "$FILENAME" ]; then @@ -18,8 +18,8 @@ wget https://github.com/protocolbuffers/protobuf/releases/download/v"$VERSION"/" stat "$FILENAME" sha256sum -c --ignore-missing <