blob: c0f9c93ef79aca1a8c54025c4851b9833e1b49a5 [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 Schuh96c7fe42019-02-18 11:37:49 -08008readonly TARGETS='//... @com_github_google_glog//... @com_google_ceres_solver//...'
Austin Schuhde821712019-08-03 18:16:49 -07009readonly M4F_TARGETS='//...'
James Kuszmaulbaa897a2020-12-12 18:17:34 -080010# Sanity check that we are able to build the y2020 roborio code, which confirms
11# that we have the platform compatibility for the roborio set up correctly.
12readonly ROBORIO_TARGETS="${TARGETS} //y2020:download_stripped"
Austin Schuhd7208ba2020-12-27 22:43:03 -080013# Stay up forever and use inotify to find changes quickly
14readonly STARTUP='--max_idle_secs=0 --watchfs'
15readonly COMMON='-c opt --stamp=no --curses=no --color=no --symlink_prefix=/ --disk_cache=~/.cache/bazel/disk_cache/'
Austin Schuh96c7fe42019-02-18 11:37:49 -080016
James Kuszmaul27da8142019-07-21 16:13:55 -070017# Put everything in different output bases so we can get 5 bazel servers
Austin Schuh96c7fe42019-02-18 11:37:49 -080018# running and keep them all warm.
Austin Schuh10358f22019-01-21 20:25:11 -080019
James Kuszmaul2af1ba82019-02-09 22:16:53 -080020# Include --config=eigen to enable Eigen assertions so that we catch potential
21# bugs with Eigen.
Austin Schuhd7208ba2020-12-27 22:43:03 -080022tools/bazel ${STARTUP} --output_base=../k8_output_base test \
Austin Schuh96c7fe42019-02-18 11:37:49 -080023 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080024 --config=k8 \
Austin Schuh96c7fe42019-02-18 11:37:49 -080025 --config=eigen \
26 ${TARGETS}
27
Austin Schuhd7208ba2020-12-27 22:43:03 -080028tools/bazel ${STARTUP} --output_base=../roborio_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080029 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080030 --config=roborio \
James Kuszmaulbaa897a2020-12-12 18:17:34 -080031 ${ROBORIO_TARGETS}
Austin Schuh96c7fe42019-02-18 11:37:49 -080032
Austin Schuhd7208ba2020-12-27 22:43:03 -080033tools/bazel ${STARTUP} --output_base=../armhf-debian_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080034 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080035 --config=armhf-debian \
Austin Schuh96c7fe42019-02-18 11:37:49 -080036 ${TARGETS}
37
Austin Schuhd7208ba2020-12-27 22:43:03 -080038tools/bazel ${STARTUP} --output_base=../cortex-m4f_output_base build \
Austin Schuh96c7fe42019-02-18 11:37:49 -080039 ${COMMON} \
Philipp Schraderdada1072020-11-24 11:34:46 -080040 --config=cortex-m4f \
Austin Schuh96c7fe42019-02-18 11:37:49 -080041 ${M4F_TARGETS}