mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-13 10:52:57 +01:00
use before_script in travis
This commit is contained in:
parent
db90fde58c
commit
206239a663
@ -106,7 +106,15 @@ matrix:
|
||||
# packages:
|
||||
# - clang-5.0
|
||||
|
||||
before_script:
|
||||
- mkdir -p /tmp/cmake.root
|
||||
- [[ $TRAVIS_OS_SUFFIX = 'linux' ]]; then CMAKE_PKG_SUFFIX="linux-x86_64"; else CMAKE_PKG_SUFFIX="macos10.10-universal"; fi
|
||||
- wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.5-$CMAKE_PKG_SUFFIX.tar.gz" | tar --strip-components=1 -xz -C /tmp/cmake.root
|
||||
- [[ $TRAVIS_OS_SUFFIX = 'linux' ]]; then CMAKE_BIN_DIR="CMake.app/Contents/bin"; else CMAKE_BIN_DIR="bin"; fi
|
||||
- export PATH=/tmp/cmake.root/$CMAKE_BIN_DIR:$PATH
|
||||
|
||||
# Build and check this project
|
||||
script:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- cmake --version
|
||||
- ./ci_build.sh
|
||||
|
27
ci_build.sh
27
ci_build.sh
@ -12,31 +12,6 @@ CPPZMQ=${PWD}/cppzmq-build
|
||||
# Travis machines have 2 cores
|
||||
JOBS=2
|
||||
|
||||
cmake_install() {
|
||||
local CMAKE_INSTALL_DIR=/tmp/cmake.root
|
||||
local CMAKE_SUFFIX="none"
|
||||
|
||||
if [ $TRAVIS_OS_NAME = "linux" ]; then
|
||||
CMAKE_SUFFIX="linux-x86_64"
|
||||
elif [ $TRAVIS_OS_NAME = "osx" ]; then
|
||||
CMAKE_SUFFIX="macos10.10-universal"
|
||||
else
|
||||
echo "TRAVIS_OS_NAME $TRAVIS_OS_NAME not expected"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $CMAKE_INSTALL_DIR
|
||||
wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.5-$CMAKE_SUFFIX.tar.gz" \
|
||||
| tar --strip-components=1 -xz -C $CMAKE_INSTALL_DIR
|
||||
|
||||
if [ $TRAVIS_OS_NAME = "linux" ]; then
|
||||
export PATH=$CMAKE_INSTALL_DIR/bin:$PATH
|
||||
elif [ $TRAVIS_OS_NAME = "osx" ]; then
|
||||
export PATH=$CMAKE_INSTALL_DIR/CMake.app/Contents/bin:$PATH
|
||||
fi
|
||||
cmake --version
|
||||
}
|
||||
|
||||
libzmq_install() {
|
||||
curl -L https://github.com/zeromq/libzmq/archive/v"${ZMQ_VERSION}".tar.gz \
|
||||
>zeromq.tar.gz
|
||||
@ -87,8 +62,6 @@ cppzmq_demo() {
|
||||
popd
|
||||
}
|
||||
|
||||
cmake_install
|
||||
|
||||
if [ "${ZMQ_VERSION}" != "" ] ; then libzmq_install ; fi
|
||||
|
||||
cppzmq_build
|
||||
|
Loading…
Reference in New Issue
Block a user