Alok Bhatt | f10e169 | 2020-11-13 22:35:49 +0000 | [diff] [blame] | 1 | #!/bin/bash
|
| 2 | ##############################################################################
|
| 3 | #
|
| 4 | # Copyright (c) 2020 HCL Technology.
|
| 5 | #
|
| 6 | # Licensed under the Apache License, Version 2.0 (the "License");
|
| 7 | # you may not use this file except in compliance with the License.
|
| 8 | # You may obtain a copy of the License at
|
| 9 | #
|
| 10 | # http://www.apache.org/licenses/LICENSE-2.0
|
| 11 | #
|
| 12 | # Unless required by applicable law or agreed to in writing, software
|
| 13 | # distributed under the License is distributed on an "AS IS" BASIS,
|
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 15 | # See the License for the specific language governing permissions and
|
| 16 | # limitations under the License.
|
| 17 | #
|
| 18 | ##############################################################################
|
| 19 |
|
| 20 | # Installs prerequisites needed to compile & test SDL code
|
| 21 | # and build RPM/DEB packages on a Debian/Ubuntu machine.
|
| 22 |
|
| 23 | echo "--> setup-sdl-build-deb.sh"
|
| 24 |
|
| 25 | # Ensure we fail the job if any steps fail.
|
| 26 | set -eux -o pipefail
|
| 27 |
|
| 28 | # install prereqs
|
| 29 | sudo apt-get update && sudo apt-get -q -y install \
|
| 30 | autoconf-archive libhiredis-dev rpm valgrind \
|
| 31 | libboost-filesystem-dev libboost-program-options-dev libboost-system-dev
|
| 32 |
|
| 33 | # generate configure script
|
| 34 | cd redismodule
|
| 35 | autoreconf --install
|
| 36 | cd ..
|
| 37 | curl -L https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz | \
|
| 38 | tar --strip-components=1 -xzf -
|
| 39 | cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON -DMEMORY_LEAK_DETECTION=OFF .
|
| 40 | sudo make install
|
| 41 | echo "--> setup-sdl-build-deb.sh ends" |