Skip to content

Commit a2e86c9

Browse files
craig[bot]rail
andcommitted
Merge #150194
150194: release: add linux-s390x support r=rickystewart a=rail This commit adds support for the linux-s390x architecture. The deliverables include nightly and release CockroachDB tarballs. No docker images are provided for this architecture. Release note: none Fixes: RE-964 Co-authored-by: Rail Aliiev <[email protected]>
2 parents 6fcec70 + c6a2d40 commit a2e86c9

File tree

9 files changed

+99
-6
lines changed

9 files changed

+99
-6
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2023 The Cockroach Authors.
4+
#
5+
# Use of this software is governed by the CockroachDB Software License
6+
# included in the /LICENSE file.
7+
8+
9+
PLATFORM=linux-s390x ./build/teamcity/internal/release/process/build-cockroach-release-per-platform.sh
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2023 The Cockroach Authors.
4+
#
5+
# Use of this software is governed by the CockroachDB Software License
6+
# included in the /LICENSE file.
7+
8+
9+
PLATFORM=linux-s390x ./build/teamcity/internal/release/process/make-and-publish-build-artifacts-per-platform.sh

build/teamcity/internal/release/process/make-and-publish-build-artifacts-per-platform.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ The binaries will be available at:
152152
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.linux-amd64.tgz
153153
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.linux-amd64-fips.tgz
154154
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.linux-arm64.tgz
155+
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.linux-s390x.tgz
155156
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.darwin-11.0-arm64.tgz
156157
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.darwin-10.9-amd64.tgz
157158
https://storage.googleapis.com/$gcs_bucket/cockroach-$build_name.windows-6.2-amd64.zip

pkg/cmd/publish-artifacts/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func run(
100100
buildOneCockroach(providers, o, execFn)
101101

102102
// We build workload only for Linux.
103-
if platform == release.PlatformLinux || platform == release.PlatformLinuxArm {
103+
if platform == release.PlatformLinux || platform == release.PlatformLinuxArm || platform == release.PlatformLinuxS390x {
104104
var o opts
105105
o.Platform = platform
106106
o.PkgDir = flags.pkgDir
@@ -144,7 +144,7 @@ func buildAndPublishWorkload(providers []release.ObjectPutGetter, o opts, execFn
144144
log.Fatal(err)
145145
}
146146
o.AbsolutePath = filepath.Join(o.PkgDir, "bin", "workload")
147-
if o.Platform == release.PlatformLinuxArm {
147+
if o.Platform == release.PlatformLinuxArm || o.Platform == release.PlatformLinuxS390x {
148148
o.AbsolutePath += release.SuffixFromPlatform(o.Platform)
149149
}
150150
for _, provider := range providers {

pkg/cmd/publish-artifacts/main_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ func (r *mockExecRunner) run(c *exec.Cmd) ([]byte, error) {
106106
platform = release.PlatformLinuxFIPS
107107
case "crosslinuxarmbase":
108108
platform = release.PlatformLinuxArm
109+
case "crosslinuxs390xbase":
110+
platform = release.PlatformLinuxS390x
109111
case "crossmacosbase":
110112
platform = release.PlatformMacOS
111113
case "crossmacosarmbase":
@@ -174,6 +176,10 @@ func TestPublish(t *testing.T) {
174176
"env=[] args=bazel info bazel-bin -c opt --config=force_build_cdeps --config=pgo --config=crosslinuxarmbase",
175177
"env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --norun_validations",
176178
"env=[] args=bazel info bazel-bin -c opt --config=crosslinuxarmbase",
179+
"env=[] args=bazel build //pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos '--workspace_status_command=./build/bazelutil/stamp.sh -t s390x-unknown-linux-gnu -c official-binary' -c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase --norun_validations",
180+
"env=[] args=bazel info bazel-bin -c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase",
181+
"env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxs390xbase --norun_validations",
182+
"env=[] args=bazel info bazel-bin -c opt --config=crosslinuxs390xbase",
177183
"env=[] args=bazel build //pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
178184
"'--workspace_status_command=./build/bazelutil/stamp.sh -t x86_64-apple-darwin19 -c official-binary' -c opt --config=force_build_cdeps --config=pgo --config=crossmacosbase --norun_validations",
179185
"env=[] args=bazel info bazel-bin -c opt --config=force_build_cdeps --config=pgo --config=crossmacosbase",
@@ -247,6 +253,28 @@ func TestPublish(t *testing.T) {
247253
"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",
248254
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxarmbase --norun_validations",
249255
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-arm64.LATEST/no-cache REDIRECT /cockroach/workload.linux-gnu-arm64.1234567890abcdef",
256+
"gs://edge-binaries-bucket/cockroach/cockroach.linux-gnu-s390x.1234567890abcdef CONTENTS env=[] args=bazel build " +
257+
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
258+
"'--workspace_status_command=./build/bazelutil/stamp.sh -t s390x-unknown-linux-gnu -c official-binary' " +
259+
"-c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase --norun_validations",
260+
"gs://edge-binaries-bucket/cockroach/cockroach.linux-gnu-s390x.LATEST/no-cache REDIRECT /cockroach/cockroach.linux-gnu-s390x.1234567890abcdef",
261+
"gs://edge-binaries-bucket/cockroach/cockroach-sql.linux-gnu-s390x.1234567890abcdef CONTENTS env=[] args=bazel build " +
262+
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
263+
"'--workspace_status_command=./build/bazelutil/stamp.sh -t s390x-unknown-linux-gnu -c official-binary' " +
264+
"-c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase --norun_validations",
265+
"gs://edge-binaries-bucket/cockroach/cockroach-sql.linux-gnu-s390x.LATEST/no-cache REDIRECT /cockroach/cockroach-sql.linux-gnu-s390x.1234567890abcdef",
266+
"gs://edge-binaries-bucket/cockroach/lib/libgeos.linux-gnu-s390x.1234567890abcdef.so CONTENTS env=[] args=bazel build " +
267+
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
268+
"'--workspace_status_command=./build/bazelutil/stamp.sh -t s390x-unknown-linux-gnu -c official-binary' " +
269+
"-c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase --norun_validations",
270+
"gs://edge-binaries-bucket/cockroach/lib/libgeos.linux-gnu-s390x.so.LATEST/no-cache REDIRECT /cockroach/lib/libgeos.linux-gnu-s390x.1234567890abcdef.so",
271+
"gs://edge-binaries-bucket/cockroach/lib/libgeos_c.linux-gnu-s390x.1234567890abcdef.so CONTENTS env=[] args=bazel build " +
272+
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
273+
"'--workspace_status_command=./build/bazelutil/stamp.sh -t s390x-unknown-linux-gnu -c official-binary' " +
274+
"-c opt --config=force_build_cdeps --config=pgo --config=crosslinuxs390xbase --norun_validations",
275+
"gs://edge-binaries-bucket/cockroach/lib/libgeos_c.linux-gnu-s390x.so.LATEST/no-cache REDIRECT /cockroach/lib/libgeos_c.linux-gnu-s390x.1234567890abcdef.so",
276+
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-s390x.1234567890abcdef CONTENTS env=[] args=bazel build //pkg/cmd/workload -c opt --config=crosslinuxs390xbase --norun_validations",
277+
"gs://edge-binaries-bucket/cockroach/workload.linux-gnu-s390x.LATEST/no-cache REDIRECT /cockroach/workload.linux-gnu-s390x.1234567890abcdef",
250278
"gs://edge-binaries-bucket/cockroach/cockroach.darwin-amd64.1234567890abcdef CONTENTS env=[] args=bazel build " +
251279
"//pkg/cmd/cockroach //pkg/cmd/cockroach-sql //c-deps:libgeos " +
252280
"'--workspace_status_command=./build/bazelutil/stamp.sh -t x86_64-apple-darwin19 -c official-binary' " +

0 commit comments

Comments
 (0)