Skip to content

Commit

Permalink
a single job in the travis-ci matrix for building with rust enabled (t…
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon authored and kevyang committed Jul 19, 2018
1 parent 1fe907e commit 3c994cc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ matrix:
- gcc-5
- libsubunit-dev

# gcc 5 on linux
- env:
- C_COMPILER=gcc-5
- RUST_ENABLED=1
addons:
apt:
<<: *apt
packages:
- gcc-5
- libsubunit-dev

# clang 3.6 on linux
- env:
- C_COMPILER=clang-3.6
Expand Down
4 changes: 3 additions & 1 deletion ci/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ fi

export CC="$C_COMPILER"

# curl https://sh.rustup.rs -sSf | sh -s -- -y
if [[ -n "${RUST_ENABLED:-}" ]]; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
fi
13 changes: 12 additions & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ die() { echo "fatal: $*" >&2; exit 1; }

export PATH=$HOME/.cargo/bin:$PATH

mkdir -p _build && ( cd _build && cmake -D BUILD_AND_INSTALL_CHECK=yes .. && make -j && make check )
cmake_cmd=(
cmake
-DBUILD_AND_INSTALL_CHECK=yes
)

if [[ -n "${RUST_ENABLED:-}" ]]; then
cmake_cmd+=( -DHAVE_RUST=yes -DRUST_VERBOSE_BUILD=yes )
fi

export RUST_BACKTRACE=full

mkdir -p _build && ( cd _build && "${cmake_cmd[@]}" .. && make -j && make check )
RESULT=$?

egrep -r ":F:|:E:" . |grep -v 'Binary file' || true
Expand Down

0 comments on commit 3c994cc

Please sign in to comment.