blob: 867e9c3241c12a7b2aec001d7763eafcbb45d84d [file] [log] [blame]
Adrian Brandemuehl2ed74352017-08-23 20:29:57 -07001#!/bin/sh
2set -e
Brian Silverman1e5cc022018-02-03 22:59:48 -05003set -x
Adrian Brandemuehl2ed74352017-08-23 20:29:57 -07004
Austin Schuh47d8bef2020-08-26 21:54:38 -07005# No need to pass this through. It hurts caching.
6unset SSH_AUTH_SOCK
7
Austin Schuh168524c2020-12-27 22:43:42 -08008if [ -n ${BUILDKITE+x} ]; then
9 buildkite-agent pipeline upload tools/ci/buildkite.yaml
10 exit 0
11fi
12
Austin Schuh96c7fe42019-02-18 11:37:49 -080013readonly TARGETS='//... @com_github_google_glog//... @com_google_ceres_solver//...'
Austin Schuhde821712019-08-03 18:16:49 -070014readonly M4F_TARGETS='//...'
James Kuszmaulbaa897a2020-12-12 18:17:34 -080015# Sanity check that we are able to build the y2020 roborio code, which confirms
16# that we have the platform compatibility for the roborio set up correctly.
17readonly ROBORIO_TARGETS="${TARGETS} //y2020:download_stripped"
Austin Schuhd7208ba2020-12-27 22:43:03 -080018# Stay up forever and use inotify to find changes quickly
19readonly STARTUP='--max_idle_secs=0 --watchfs'
20readonly COMMON='-c opt --stamp=no --curses=no --color=no --symlink_prefix=/ --disk_cache=~/.cache/bazel/disk_cache/'
Austin Schuh96c7fe42019-02-18 11:37:49 -080021
James Kuszmaul27da8142019-07-21 16:13:55 -070022# Put everything in different output bases so we can get 5 bazel servers
Austin Schuh96c7fe42019-02-18 11:37:49 -080023# running and keep them all warm.
Austin Schuh10358f22019-01-21 20:25:11 -080024
James Kuszmaul2af1ba82019-02-09 22:16:53 -080025# Include --config=eigen to enable Eigen assertions so that we catch potential
26# bugs with Eigen.
Austin Schuhd7208ba2020-12-27 22:43:03 -080027tools/bazel ${STARTUP} --output_base=../k8_output_base test \
Austin Schuh96c7fe42019-02-18 11:37:49 -080028 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080029 --config=k8 \
Austin Schuh96c7fe42019-02-18 11:37:49 -080030 --config=eigen \
31 ${TARGETS}
32
Austin Schuhd7208ba2020-12-27 22:43:03 -080033tools/bazel ${STARTUP} --output_base=../roborio_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080034 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080035 --config=roborio \
James Kuszmaulbaa897a2020-12-12 18:17:34 -080036 ${ROBORIO_TARGETS}
Austin Schuh96c7fe42019-02-18 11:37:49 -080037
Austin Schuhd7208ba2020-12-27 22:43:03 -080038tools/bazel ${STARTUP} --output_base=../armhf-debian_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080039 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080040 --config=armhf-debian \
Austin Schuh96c7fe42019-02-18 11:37:49 -080041 ${TARGETS}
42
Austin Schuhd7208ba2020-12-27 22:43:03 -080043tools/bazel ${STARTUP} --output_base=../cortex-m4f_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080044 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080045 --config=cortex-m4f \
Austin Schuh96c7fe42019-02-18 11:37:49 -080046 ${M4F_TARGETS}