Skip to content

Commit 70ee7b4

Browse files
committed
Build folly from the travis before_script
1 parent 31ff2a2 commit 70ee7b4

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.travis.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ before_script:
8282
- gem install coveralls-lcov
8383
- lcov --version
8484
- eval "$COMPILER_EVAL"
85+
# Build folly
86+
- mkdir build
87+
- ./scripts/build_folly.sh build/folly-src build/folly-install
8588

8689
script:
87-
- mkdir build
8890
- cd build
89-
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE
90-
-DRSOCKET_ASAN=$ASAN -DRSOCKET_INSTALL_DEPS=True
91+
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRSOCKET_ASAN=$ASAN
92+
-DCMAKE_PREFIX_PATH=$PWD/folly-install
9193
-DRSOCKET_BUILD_WITH_COVERAGE=ON ..
9294
- make -j4
9395
- lcov --directory . --zerocounters

scripts/build_folly.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ if [[ -z $INSTALL_DIR ]]; then
99
exit 1
1010
fi
1111

12+
# Convert INSTALL_DIR to an absolute path so it still refers to the same
13+
# location after we cd into the build directory.
14+
case "$INSTALL_DIR" in
15+
/*) ;;
16+
*) INSTALL_DIR="$PWD/$INSTALL_DIR"
17+
esac
18+
1219
# If folly was already installed, just return early
1320
INSTALL_MARKER_FILE="$INSTALL_DIR/folly.installed"
1421
if [[ -f $INSTALL_MARKER_FILE ]]; then
@@ -28,7 +35,11 @@ fi
2835

2936
mkdir -p "$CHECKOUT_DIR/_build"
3037
cd "$CHECKOUT_DIR/_build"
31-
cmake "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" ..
38+
if ! cmake "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" ..; then
39+
echo "error configuring folly" >&2
40+
tail -n 100 CMakeFiles/CMakeError.log >&2
41+
exit 1
42+
fi
3243
make -j4
3344
make install
3445
touch "$INSTALL_MARKER_FILE"

0 commit comments

Comments
 (0)