Skip to content

Commit

Permalink
Pre-install go on the aarch64 wheel build image. (#17989)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyw authored Jan 13, 2023
1 parent a97f9c2 commit 2e4d40b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,6 @@ jobs:
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.1
- env:
PANTS_CONFIG_FILES: +['pants.ci.toml','pants.ci.aarch64.toml']
name: Build wheels
Expand Down
2 changes: 1 addition & 1 deletion build-support/bin/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def build_wheels_job(platform: Platform, python_versions: list[str]) -> Jobs:
"steps": initial_steps
+ [
setup_toolchain_auth(),
install_go(),
*([] if platform == Platform.LINUX_ARM64 else [install_go()]),
*helper.build_wheels(python_versions),
helper.upload_log_artifacts(name="wheels"),
deploy_to_s3(),
Expand Down
12 changes: 10 additions & 2 deletions build-support/wheel_build_aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# For manylinux compatibility, we build Linux wheels in a container rather than directly
# on the CI runner. This adds the AWS CLI to the standard manylinux image, which we need
# in order to publish built wheels to S3.
# on the CI runner.
FROM quay.io/pypa/manylinux2014_aarch64:2023-01-03-129be5e

# Add the AWS CLI, which we need in order to publish built wheels to S3.
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf ./aws && \
rm -f awscliv2.zip

# The Go backend is enabled, we add a synthetic target for the Go SDK, which therefore
# must be present even though wheel building does not need it.
# TODO: Make the target generator lazy, so that unused tooling doesn't have to be present.
RUN curl -LO "https://go.dev/dl/go1.17.1.linux-arm64.tar.gz" && \
tar -C /usr/local -xzf go1.17.1.linux-arm64.tar.gz

ENV PATH="${PATH}:/usr/local/go/bin"

0 comments on commit 2e4d40b

Please sign in to comment.