Skip to content

Commit

Permalink
travis CHANGE improve hiding unnecessary output when building depende…
Browse files Browse the repository at this point in the history
…ncies
  • Loading branch information
rkrejci committed Jun 5, 2019
1 parent 8f8c92d commit 417f7a0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
28 changes: 14 additions & 14 deletions .travis-install-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,52 +15,52 @@ if [ ! -d "cmocka-1.1.1/build" ]; then
wget https://cmocka.org/files/1.1/cmocka-1.1.1.tar.xz
tar -xJvf cmocka-1.1.1.tar.xz
cd cmocka-1.1.1 && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
(cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install) > /dev/null
cd ../..
else
echo "Using cmocka from cache."
cd cmocka-1.1.1/build
sudo make install
sudo make install > /dev/null
cd ../..
fi

git clone -b $BRANCH https://github.com/CESNET/libyang.git
cd libyang; mkdir build; cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release ..
make -j2 && sudo make install
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release .. > /dev/null
(make -j2 && sudo make install) > /dev/null
cd ../..

if [ ! -d "libssh-0.8.5/build" ]; then
echo "Building libssh from source."
wget https://www.libssh.org/files/0.8/libssh-0.8.5.tar.xz
tar -xJf libssh-0.8.5.tar.xz
mkdir libssh-0.8.5/build && cd libssh-0.8.5/build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
(cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install) > /dev/null
cd ../..
else
echo "Using libssh from cache."
cd libssh-0.8.5/build
sudo make install
sudo make install > /dev/null
cd ../..
fi

git clone -b $BRANCH https://github.com/CESNET/libnetconf2.git
cd libnetconf2; mkdir build; cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release ..
make -j2 && sudo make install
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release .. > /dev/null
(make -j2 && sudo make install) > /dev/null
cd ../..

if [ ! -f "protobuf/Makefile" ]; then
echo "Building protobuf from source."
wget https://github.com/google/protobuf/archive/v3.2.0.tar.gz
tar -xzf v3.2.0.tar.gz
cd protobuf-3.2.0
./autogen.sh && ./configure --prefix=/usr && make -j2 && sudo make install
(./autogen.sh && ./configure --prefix=/usr && make -j2 && sudo make install) > /dev/null
cd ..
else
echo "Using protobuf from cache."
cd protobuf
sudo make install
sudo make install > /dev/null
cd ..
fi

Expand All @@ -69,19 +69,19 @@ if [ ! -f "protobuf-c/Makefile" ]; then
wget https://github.com/protobuf-c/protobuf-c/archive/v1.2.1.tar.gz
tar -xzf v1.2.1.tar.gz
cd protobuf-c-1.2.1
./autogen.sh && ./configure --prefix=/usr && make -j2 && sudo make install
(./autogen.sh && ./configure --prefix=/usr && make -j2 && sudo make install) > /dev/null
cd ..
else
echo "Using protobuf-c from cache."
cd protobuf-c
sudo make install
sudo make install > /dev/null
cd ..
fi

git clone -b $BRANCH https://github.com/sysrepo/sysrepo.git
cd sysrepo; mkdir build; cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_EXAMPLES=False -DENABLE_TESTS=False -DGEN_LANGUAGE_BINDINGS=0 -DREPOSITORY_LOC:PATH=/ets/sysrepo ..
make -j2 && sudo make install
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_EXAMPLES=False -DENABLE_TESTS=False -DGEN_LANGUAGE_BINDINGS=0 -DREPOSITORY_LOC:PATH=/ets/sysrepo .. > /dev/null
(make -j2 && sudo make install) > /dev/null
cd ../..

if [ "${CC}" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ cache:

before_install:
- eval "${MATRIX_EVAL}"
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash .travis-install-libs.sh > /dev/null ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash .travis-install-libs.sh; fi

script:
- mkdir build-cli && cd build-cli && cmake ../cli && make -j2
Expand Down

0 comments on commit 417f7a0

Please sign in to comment.