Skip to content

Commit

Permalink
Don't cross compile for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatskaari committed Nov 27, 2023
1 parent 69b674f commit c873948
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,27 @@ jobs:
working_directory: ~/please
macos:
xcode: "14.3.1"
resource_class: macos.m1.medium.gen1
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- restore_cache:
key: go-darwin-arm64-v4-{{ checksum "third_party/go/BUILD" }}
key: go-darwin-arm64-v5-{{ checksum "third_party/go/BUILD" }}
- run:
name: Extract plz
command: tar -xzf /tmp/workspace/darwin_amd64/please_*.tar.gz
name: Install deps
command: ./.circleci/setup_osx.sh arm64
- run:
name: Cross-compile
command: ./please/please build -p --profile ci --arch darwin_arm64 -o plugin.go.cgoenabled:1 -o plugin.go.cctool:clang -o "plugin.go.cflags:-target arm64-apple-macos11" //package:release_files
name: Build release
command: go run src/please.go build -p --profile ci //package:release_files
- persist_to_workspace:
root: plz-out/pkg
paths:
- darwin_arm64/*
- store_artifacts:
path: plz-out/log
- save_cache:
key: go-darwin-arm64-v4-{{ checksum "third_party/go/BUILD" }}
key: go-darwin-arm64-v5-{{ checksum "third_party/go/BUILD" }}
paths: [ ".plz-cache/third_party/go" ]

build-freebsd:
Expand Down Expand Up @@ -214,7 +215,7 @@ jobs:
key: python-darwin-v3-{{ checksum "third_party/python/BUILD" }}
- run:
name: Install deps
command: ./.circleci/setup_osx.sh
command: ./.circleci/setup_osx.sh amd64
- run:
name: Bootstrap & Build
command: ./bootstrap.sh --test_results_file plz-out/results/please/test_results.xml
Expand Down
4 changes: 2 additions & 2 deletions .circleci/setup_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ set -eu

# /usr/local/go might get cached.
if [ ! -d "/usr/local/go" ]; then
curl -fsSL https://dl.google.com/go/go1.19.darwin-amd64.tar.gz | sudo tar -xz -C /usr/local
curl -fsSL https://dl.google.com/go/go1.21.3.darwin-$1.tar.gz | sudo tar -xz -C /usr/local
fi
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go

# xz might also.
if [ ! -f "/usr/local/bin/xz" ]; then
curl -fsSL https://get.please.build/third_party/binary/xz-5.2.4-darwin_amd64 -o /usr/local/bin/xz
curl -fsSL https://get.please.build/third_party/binary/xz-5.2.4-darwin_$1 -o /usr/local/bin/xz
chmod +x /usr/local/bin/xz
fi

0 comments on commit c873948

Please sign in to comment.