From 9720ce68f236ff49fdbb52a6abb4169a60b4f9c1 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Tue, 13 Dec 2022 15:49:23 -0800 Subject: [PATCH 1/3] Download the right go binary on darwin-arm64 --- .circleci/config.yml | 8 +++++++- .circleci/template.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e9ab435e..9bb1b5d47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,10 @@ commands: default: false description: is a darwin build environment? type: boolean + darwin-architecture: + default: "amd64" + description: which darwin architecture is being used? + type: string steps: - checkout - git_fetch_all_tags @@ -59,7 +63,7 @@ commands: - run: name: Install Go command: | - curl https://dl.google.com/go/go`cat GO_VERSION_MIN`.darwin-amd64.pkg -o /tmp/go.pkg && \ + curl https://dl.google.com/go/go`cat GO_VERSION_MIN`.darwin-<>.pkg -o /tmp/go.pkg && \ sudo installer -pkg /tmp/go.pkg -target / - run: name: Export Go @@ -276,6 +280,7 @@ jobs: - prepare: linux: false darwin: true + darwin-architecture: amd64 - run: make lotus lotus-miner lotus-worker - run: name: check tag and version output match @@ -298,6 +303,7 @@ jobs: - prepare: linux: false darwin: true + darwin-architecture: arm64 - run: | export CPATH=$(brew --prefix)/include export LIBRARY_PATH=$(brew --prefix)/lib diff --git a/.circleci/template.yml b/.circleci/template.yml index 4c7ca9e1b..f5eda5b79 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -34,6 +34,10 @@ commands: default: false description: is a darwin build environment? type: boolean + darwin-architecture: + default: "amd64" + description: which darwin architecture is being used? + type: string steps: - checkout - git_fetch_all_tags @@ -59,7 +63,7 @@ commands: - run: name: Install Go command: | - curl https://dl.google.com/go/go`cat GO_VERSION_MIN`.darwin-amd64.pkg -o /tmp/go.pkg && \ + curl https://dl.google.com/go/go`cat GO_VERSION_MIN`.darwin-<>.pkg -o /tmp/go.pkg && \ sudo installer -pkg /tmp/go.pkg -target / - run: name: Export Go @@ -276,6 +280,7 @@ jobs: - prepare: linux: false darwin: true + darwin-architecture: amd64 - run: make lotus lotus-miner lotus-worker - run: name: check tag and version output match @@ -298,6 +303,7 @@ jobs: - prepare: linux: false darwin: true + darwin-architecture: arm64 - run: | export CPATH=$(brew --prefix)/include export LIBRARY_PATH=$(brew --prefix)/lib From 93d12e1642f2cb6e2d4a1bcfddd51a26f0476e63 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Tue, 13 Dec 2022 15:49:45 -0800 Subject: [PATCH 2/3] Add v prefix to .tar.gz file names --- .goreleaser.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7e96e3ce8..766f4f30a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -65,6 +65,7 @@ archives: - id: primary format: tar.gz wrap_in_directory: true + name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}" files: # this is a dumb but required hack so it doesn't include the default files # https://github.com/goreleaser/goreleaser/issues/602 @@ -105,4 +106,4 @@ checksum: disable: true snapshot: - name_template: "{{ .Tag }}" + name_template: "{{ .Version }}" From 8960c11f86e24239ae5655c816c8d111cf6b5963 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Tue, 13 Dec 2022 15:53:01 -0800 Subject: [PATCH 3/3] Add otool -hv check to make sure binary is correct --- .circleci/config.yml | 2 ++ .circleci/template.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bb1b5d47..5dd617e6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -282,6 +282,7 @@ jobs: darwin: true darwin-architecture: amd64 - run: make lotus lotus-miner lotus-worker + - run: otool -hv lotus - run: name: check tag and version output match command: ./scripts/version-check.sh ./lotus @@ -308,6 +309,7 @@ jobs: export CPATH=$(brew --prefix)/include export LIBRARY_PATH=$(brew --prefix)/lib make lotus lotus-miner lotus-worker + - run: otool -hv lotus - run: name: check tag and version output match command: ./scripts/version-check.sh ./lotus diff --git a/.circleci/template.yml b/.circleci/template.yml index f5eda5b79..4240d7ae2 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -282,6 +282,7 @@ jobs: darwin: true darwin-architecture: amd64 - run: make lotus lotus-miner lotus-worker + - run: otool -hv lotus - run: name: check tag and version output match command: ./scripts/version-check.sh ./lotus @@ -308,6 +309,7 @@ jobs: export CPATH=$(brew --prefix)/include export LIBRARY_PATH=$(brew --prefix)/lib make lotus lotus-miner lotus-worker + - run: otool -hv lotus - run: name: check tag and version output match command: ./scripts/version-check.sh ./lotus