Merge pull request #9867 from filecoin-project/id/fix-macos-build
_build_: Fix Macos M1 and universal binary builds
This commit is contained in:
commit
1a9e8ac35d
@ -34,6 +34,10 @@ commands:
|
|||||||
default: false
|
default: false
|
||||||
description: is a darwin build environment?
|
description: is a darwin build environment?
|
||||||
type: boolean
|
type: boolean
|
||||||
|
darwin-architecture:
|
||||||
|
default: "amd64"
|
||||||
|
description: which darwin architecture is being used?
|
||||||
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- git_fetch_all_tags
|
- git_fetch_all_tags
|
||||||
@ -59,7 +63,7 @@ commands:
|
|||||||
- run:
|
- run:
|
||||||
name: Install Go
|
name: Install Go
|
||||||
command: |
|
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-<<parameters.darwin-architecture>>.pkg -o /tmp/go.pkg && \
|
||||||
sudo installer -pkg /tmp/go.pkg -target /
|
sudo installer -pkg /tmp/go.pkg -target /
|
||||||
- run:
|
- run:
|
||||||
name: Export Go
|
name: Export Go
|
||||||
@ -276,7 +280,9 @@ jobs:
|
|||||||
- prepare:
|
- prepare:
|
||||||
linux: false
|
linux: false
|
||||||
darwin: true
|
darwin: true
|
||||||
|
darwin-architecture: amd64
|
||||||
- run: make lotus lotus-miner lotus-worker
|
- run: make lotus lotus-miner lotus-worker
|
||||||
|
- run: otool -hv lotus
|
||||||
- run:
|
- run:
|
||||||
name: check tag and version output match
|
name: check tag and version output match
|
||||||
command: ./scripts/version-check.sh ./lotus
|
command: ./scripts/version-check.sh ./lotus
|
||||||
@ -298,10 +304,12 @@ jobs:
|
|||||||
- prepare:
|
- prepare:
|
||||||
linux: false
|
linux: false
|
||||||
darwin: true
|
darwin: true
|
||||||
|
darwin-architecture: arm64
|
||||||
- run: |
|
- run: |
|
||||||
export CPATH=$(brew --prefix)/include
|
export CPATH=$(brew --prefix)/include
|
||||||
export LIBRARY_PATH=$(brew --prefix)/lib
|
export LIBRARY_PATH=$(brew --prefix)/lib
|
||||||
make lotus lotus-miner lotus-worker
|
make lotus lotus-miner lotus-worker
|
||||||
|
- run: otool -hv lotus
|
||||||
- run:
|
- run:
|
||||||
name: check tag and version output match
|
name: check tag and version output match
|
||||||
command: ./scripts/version-check.sh ./lotus
|
command: ./scripts/version-check.sh ./lotus
|
||||||
|
@ -34,6 +34,10 @@ commands:
|
|||||||
default: false
|
default: false
|
||||||
description: is a darwin build environment?
|
description: is a darwin build environment?
|
||||||
type: boolean
|
type: boolean
|
||||||
|
darwin-architecture:
|
||||||
|
default: "amd64"
|
||||||
|
description: which darwin architecture is being used?
|
||||||
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- git_fetch_all_tags
|
- git_fetch_all_tags
|
||||||
@ -59,7 +63,7 @@ commands:
|
|||||||
- run:
|
- run:
|
||||||
name: Install Go
|
name: Install Go
|
||||||
command: |
|
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-<<parameters.darwin-architecture>>.pkg -o /tmp/go.pkg && \
|
||||||
sudo installer -pkg /tmp/go.pkg -target /
|
sudo installer -pkg /tmp/go.pkg -target /
|
||||||
- run:
|
- run:
|
||||||
name: Export Go
|
name: Export Go
|
||||||
@ -276,7 +280,9 @@ jobs:
|
|||||||
- prepare:
|
- prepare:
|
||||||
linux: false
|
linux: false
|
||||||
darwin: true
|
darwin: true
|
||||||
|
darwin-architecture: amd64
|
||||||
- run: make lotus lotus-miner lotus-worker
|
- run: make lotus lotus-miner lotus-worker
|
||||||
|
- run: otool -hv lotus
|
||||||
- run:
|
- run:
|
||||||
name: check tag and version output match
|
name: check tag and version output match
|
||||||
command: ./scripts/version-check.sh ./lotus
|
command: ./scripts/version-check.sh ./lotus
|
||||||
@ -298,10 +304,12 @@ jobs:
|
|||||||
- prepare:
|
- prepare:
|
||||||
linux: false
|
linux: false
|
||||||
darwin: true
|
darwin: true
|
||||||
|
darwin-architecture: arm64
|
||||||
- run: |
|
- run: |
|
||||||
export CPATH=$(brew --prefix)/include
|
export CPATH=$(brew --prefix)/include
|
||||||
export LIBRARY_PATH=$(brew --prefix)/lib
|
export LIBRARY_PATH=$(brew --prefix)/lib
|
||||||
make lotus lotus-miner lotus-worker
|
make lotus lotus-miner lotus-worker
|
||||||
|
- run: otool -hv lotus
|
||||||
- run:
|
- run:
|
||||||
name: check tag and version output match
|
name: check tag and version output match
|
||||||
command: ./scripts/version-check.sh ./lotus
|
command: ./scripts/version-check.sh ./lotus
|
||||||
|
@ -65,6 +65,7 @@ archives:
|
|||||||
- id: primary
|
- id: primary
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
wrap_in_directory: true
|
wrap_in_directory: true
|
||||||
|
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
files:
|
files:
|
||||||
# this is a dumb but required hack so it doesn't include the default files
|
# this is a dumb but required hack so it doesn't include the default files
|
||||||
# https://github.com/goreleaser/goreleaser/issues/602
|
# https://github.com/goreleaser/goreleaser/issues/602
|
||||||
@ -105,4 +106,4 @@ checksum:
|
|||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ .Tag }}"
|
name_template: "{{ .Version }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user