-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: add
EXPERIMENTAL
Linux build jobs
Epic: CRDB-8308 Release note: None
- Loading branch information
1 parent
bf60272
commit 8116ffb
Showing
2 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
set -euxo pipefail | ||
|
||
# Usage: must provide a cross config as argument | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo 'Usage: build.sh CONFIG' | ||
exit 1 | ||
fi | ||
|
||
CONFIG="$1" | ||
|
||
EXTRA_TARGETS= | ||
|
||
# Extra targets to build on Linux x86_64 only. | ||
if [ "$CONFIG" == "crosslinux" ] | ||
then | ||
EXTRA_TARGETS=$(grep '^//' docs/generated/bazel_targets.txt) | ||
fi | ||
|
||
# Extra targets to build on Unix only. | ||
if [ "$CONFIG" != "crosswindows" ] | ||
then | ||
EXTRA_TARGETS="$EXTRA_TARGETS //pkg/cmd/roachprod //pkg/cmd/workload //pkg/cmd/dev //pkg/cmd/bazci //pkg/cmd/bazci/process-bep-file" | ||
fi | ||
|
||
EXTRA_ARGS= | ||
# GEOS does not compile on windows. | ||
GEOS_TARGET=//c-deps:libgeos | ||
|
||
if [ "$CONFIG" == "crosswindows" ] | ||
then | ||
EXTRA_ARGS=--enable_runfiles | ||
GEOS_TARGET= | ||
fi | ||
|
||
bazel build \ | ||
--config "$CONFIG" $EXTRA_ARGS \ | ||
--jobs 100 \ | ||
--build_event_binary_file=bes.bin \ | ||
$(./build/github/engflow-args.sh) \ | ||
//pkg/cmd/cockroach-short //pkg/cmd/cockroach \ | ||
//pkg/cmd/cockroach-sql \ | ||
//pkg/cmd/cockroach-oss $GEOS_TARGET $EXTRA_TARGETS | ||
|