forked from zeromq/cppzmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci_build.sh
executable file
·51 lines (40 loc) · 917 Bytes
/
ci_build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -x
set -e
if [ "$DRAFT" = "1" ] ; then
# if we enable drafts during the libzmq cmake build, the pkgconfig
# data should set ZMQ_BUILD_DRAFT_API in dependent builds, but this
# does not appear to work (TODO)
export ZEROMQ_CMAKE_FLAGS="-DENABLE_DRAFTS=ON"
fi
install_zeromq() {
pushd .
mkdir libzmq
cd libzmq
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
tar -xvzf zeromq.tar.gz
cd libzmq-${ZMQ_VERSION}
mkdir build
cd build
cmake .. ${ZEROMQ_CMAKE_FLAGS}
sudo make -j4 install
popd
}
# build zeromq first
if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
# build cppzmq
pushd .
mkdir build
cd build
cmake .. ${ZEROMQ_CMAKE_FLAGS}
cmake --build .
sudo make -j4 install
make test ARGS="-V"
popd
# build cppzmq demo
cd demo
mkdir build
cd build
cmake ..
cmake --build .
ctest