mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-26 20:12:57 +00:00
0203b0cbdd
This will let us setup travis-ci on the Breakpad GitHub mirror. R=vapier@chromium.org, mark@chromium.org BUG= Review URL: https://codereview.chromium.org/1873133003 .
32 lines
697 B
Bash
Executable file
32 lines
697 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
setup_env() {
|
|
# Travis sets CC/CXX to the system toolchain, so our .travis.yml
|
|
# exports USE_{CC,CXX} for this script to use.
|
|
if [ -n "$USE_CC" ]; then
|
|
export CC=$USE_CC
|
|
fi
|
|
if [ -n "$USE_CXX" ]; then
|
|
export CXX=$USE_CXX
|
|
fi
|
|
# Use -jN for faster builds. Travis build machines under Docker
|
|
# have a lot of cores, but are memory-limited, so the kernel
|
|
# will OOM if we try to use them all, so use at most 4.
|
|
# See https://github.com/travis-ci/travis-ci/issues/1972
|
|
export NCPUS=$(getconf _NPROCESSORS_ONLN)
|
|
export JOBS=$(( $NCPUS < 4 ? $NCPUS : 4 ))
|
|
}
|
|
|
|
build() {
|
|
./configure
|
|
make -j${JOBS} check
|
|
}
|
|
|
|
main() {
|
|
setup_env
|
|
build
|
|
}
|
|
|
|
main "$@"
|