Skip to content

Commit

Permalink
publish-artifacts: add a suffix for ARM workload binary
Browse files Browse the repository at this point in the history
Epic: none
Release note: None
  • Loading branch information
rickystewart committed Jun 16, 2023
1 parent 9bedbf1 commit f190457
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/publish-artifacts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func buildAndPublishWorkload(providers []release.ObjectPutGetter, o opts, execFn
log.Fatal(err)
}
o.AbsolutePath = filepath.Join(o.PkgDir, "bin", "workload")
if o.Platform == release.PlatformLinuxArm {
o.AbsolutePath += release.SuffixFromPlatform(o.Platform)
}
for _, provider := range providers {
release.PutNonRelease(
provider,
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/publish-artifacts/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ func TestPublish(t *testing.T) {
"'--workspace_status_command=./build/bazelutil/stamp.sh aarch64-unknown-linux-gnu official-binary' " +
"-c opt --config=ci --config=force_build_cdeps --config=crosslinuxarmbase",
"gs://edge-binaries-bucket/cockroach/lib/libgeos_c.linux-gnu-arm64.so.LATEST/no-cache REDIRECT /cockroach/lib/libgeos_c.linux-gnu-arm64.1234567890abcdef.so",
"gs://edge-binaries-bucket/cockroach/workload.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --config=ci",
"gs://edge-binaries-bucket/cockroach/workload.LATEST/no-cache REDIRECT /cockroach/workload.1234567890abcdef",
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --config=ci",
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.LATEST/no-cache REDIRECT /cockroach/workload.linux-gnu-arm64.1234567890abcdef",
"gs://edge-binaries-bucket/cockroach/cockroach.darwin-amd64.1234567890abcdef CONTENTS env=[] args=bazel build " +
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
"'--workspace_status_command=./build/bazelutil/stamp.sh x86_64-apple-darwin19 official-binary' " +
Expand Down
4 changes: 2 additions & 2 deletions pkg/release/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func SharedLibraryExtensionFromPlatform(platform Platform) string {
}

// MakeWorkload makes the bin/workload binary. It is only ever built in the
// crosslinux configuration.
// crosslinux and crosslinuxarm configurations.
func MakeWorkload(platform Platform, opts BuildOptions, pkgDir string) error {
if opts.Release {
return errors.Newf("cannot build workload in Release mode")
Expand All @@ -151,7 +151,7 @@ func MakeWorkload(platform Platform, opts BuildOptions, pkgDir string) error {
if err != nil {
return err
}
return stageBinary("//pkg/cmd/workload", platform, bazelBin, filepath.Join(pkgDir, "bin"), false)
return stageBinary("//pkg/cmd/workload", platform, bazelBin, filepath.Join(pkgDir, "bin"), platform == PlatformLinuxArm)
}

// MakeRelease makes the release binary and associated files.
Expand Down

0 comments on commit f190457

Please sign in to comment.