blob: 6b89a0915b120e4a12fd836353842369a5ee0f46 [file] [log] [blame]
Alok Bhattf10e1692020-11-13 22:35:49 +00001#!/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
23echo "--> setup-sdl-build-deb.sh"
24
25# Ensure we fail the job if any steps fail.
26set -eux -o pipefail
27
28# install prereqs
29sudo 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
34cd redismodule
35autoreconf --install
36cd ..
37curl -L https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz | \
38 tar --strip-components=1 -xzf -
39cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON -DMEMORY_LEAK_DETECTION=OFF .
40sudo make install
41echo "--> setup-sdl-build-deb.sh ends"