Skip to content

Commit

Permalink
Make release pipeline architecture-independent.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 432006218
  • Loading branch information
amscanne authored and gvisor-bot committed Mar 2, 2022
1 parent 25c6517 commit 137468a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
11 changes: 8 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ build --cxxopt=-std=c++17
# Display the current git revision in the info block.
build --stamp --workspace_status_command tools/workspace_status.sh

# Set flags for x86_64.
build:x86_64 --crosstool_top=@crosstool//:toolchains
build:x86_64 --cpu=k8
build:x86_64 --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64

# Set flags for aarch64.
build:cross-aarch64 --crosstool_top=@crosstool//:toolchains --compiler=gcc
build:cross-aarch64 --cpu=aarch64
build:cross-aarch64 --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64
build:aarch64 --crosstool_top=@crosstool//:toolchains
build:aarch64 --cpu=aarch64
build:aarch64 --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ steps:
- <<: *common
label: ":ship: Release tests"
commands:
- make artifacts/x86_64
- make BAZEL_OPTIONS=--config=cross-aarch64 artifacts/aarch64
- make BAZEL_OPTIONS=--config=x86_64 artifacts/x86_64
- make BAZEL_OPTIONS=--config=aarch64 artifacts/aarch64
- make release

# Images tests.
Expand Down
9 changes: 5 additions & 4 deletions .buildkite/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ steps:
- <<: *common
label: ":ship: Push all images (x86_64)"
commands:
- make push-all-images
- make ARCH=x86_64 push-all-images
- <<: *common
label: ":ship: Push all images (aarch64)"
commands:
- make ARCH=aarch64 push-all-images
- <<: *common
label: ":ship: Release"
commands:
- make artifacts/x86_64
- make BAZEL_OPTIONS=--config=cross-aarch64 artifacts/aarch64
- make BAZEL_OPTIONS=--config=x86_64 artifacts/x86_64
- make BAZEL_OPTIONS=--config=aarch64 artifacts/aarch64
- make release RELEASE_NIGHTLY=$$RELEASE_NIGHTLY
- cd repo && gsutil cp -r . gs://gvisor/releases/
- <<: *common
label: ":ship: Website Deploy"
commands:
- make website-deploy
# The built website image must be x86_64.
- make BAZEL_OPTIONS=--config=x86_64 website-deploy
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ do-tests: $(RUNTIME_BIN)
@sudo $(RUNTIME_BIN) do true
.PHONY: do-tests

arm-qemu-smoke-test: BAZEL_OPTIONS=--config=cross-aarch64
arm-qemu-smoke-test: BAZEL_OPTIONS=--config=aarch64
arm-qemu-smoke-test: $(RUNTIME_BIN) load-arm-qemu
export T=$$(mktemp -d --tmpdir release.XXXXXX); \
mkdir -p $$T/bin/arm64/ && \
Expand Down

0 comments on commit 137468a

Please sign in to comment.