toxcore/.travis/bazel-linux
iphydf 0f7138c010
Upgrade bazel to 2.1.1.
Removed av_test, because it depends on an ancient opencv that starts to
really not exist on modern systems anymore.
2020-03-02 14:23:44 +00:00

35 lines
905 B
Bash
Executable File

#!/bin/sh
ACTION="$1"
set -eu
travis_install() {
# Get bazel.
wget https://github.com/bazelbuild/bazel/releases/download/2.1.1/bazel-2.1.1-installer-linux-x86_64.sh
chmod +x bazel-2.1.1-installer-linux-x86_64.sh
./bazel-2.1.1-installer-linux-x86_64.sh --user
echo 'build --jobs=4 --curses=no --verbose_failures' >> $HOME/.bazelrc
echo 'build --config=linux' >> $HOME/.bazelrc
echo "build --config=$CC" >> $HOME/.bazelrc
pip install --user yamllint
}
travis_script() {
yamllint -c ../tools/project/yamllint.rc .
bazel test \
//c-toxcore:license_test \
//c-toxcore:readme_test
# TODO(iphydf): Make tests have a chance to succeed.
# Run the tests, but if they fail, at least we should be able to build.
# bazel test //c-toxcore/... || bazel build //c-toxcore/...
bazel build //c-toxcore/...
}
if [ "-z" "$ACTION" ]; then
"travis_script"
else
"travis_$ACTION"
fi