mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add the bazel build as one of the PR-blocking builds.
This commit is contained in:
parent
abc17b0f89
commit
0b7e29e019
25
.travis.yml
25
.travis.yml
|
@ -37,6 +37,30 @@ matrix:
|
|||
- libvpx-dev # For toxav.
|
||||
install: .travis/$JOB install
|
||||
script: .travis/$JOB script
|
||||
- stage: "Stage 1"
|
||||
env: JOB=bazel-linux
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libcv-dev # For av_test.
|
||||
- libhighgui-dev # For av_test.
|
||||
- libopencv-contrib-dev # For av_test.
|
||||
- portaudio19-dev # For av_test.
|
||||
before_install:
|
||||
# Clear bazel installation.
|
||||
- rm -rf $HOME/.cache/bazel/_bazel_$USER/install
|
||||
# Get toktok-stack, which contains the bazel workspace.
|
||||
- cd ..
|
||||
- git clone https://github.com/TokTok/toktok-stack
|
||||
- rm -rf toktok-stack/c-toxcore
|
||||
- mv c-toxcore toktok-stack/
|
||||
- cd toktok-stack/c-toxcore
|
||||
install: .travis/$JOB install
|
||||
script: .travis/$JOB script
|
||||
before_cache:
|
||||
# Clear bazel installation.
|
||||
- rm -rf $HOME/.cache/bazel/_bazel_$USER/install
|
||||
- stage: "Stage 1"
|
||||
if: type IN (push, api, cron)
|
||||
env: JOB=cmake-win32
|
||||
|
@ -76,6 +100,7 @@ matrix:
|
|||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/bazel
|
||||
- $HOME/cache
|
||||
- /opt/freebsd/cache
|
||||
|
||||
|
|
25
.travis/bazel-linux
Executable file
25
.travis/bazel-linux
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
ACTION="$1"
|
||||
|
||||
set -eu
|
||||
|
||||
travis_install() {
|
||||
# Get bazel.
|
||||
wget https://github.com/bazelbuild/bazel/releases/download/0.15.0/bazel-0.15.0-installer-linux-x86_64.sh
|
||||
chmod +x bazel-0.15.0-installer-linux-x86_64.sh
|
||||
./bazel-0.15.0-installer-linux-x86_64.sh --user
|
||||
echo 'build --jobs=4 --curses=no --verbose_failures' >> $HOME/.bazelrc
|
||||
echo "import %workspace%/tools/bazelrc/linux-$CC" >> $HOME/.bazelrc
|
||||
}
|
||||
|
||||
travis_script() {
|
||||
# Run the tests, but if they fail, at least we should be able to build.
|
||||
bazel test //c-toxcore/... || bazel build //c-toxcore/...
|
||||
}
|
||||
|
||||
if [ "-z" "$ACTION" ]; then
|
||||
"travis_script"
|
||||
else
|
||||
"travis_$ACTION"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user