File: compile.sh

package info (click to toggle)
rapmap 0.15.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,352 kB
  • sloc: cpp: 48,826; ansic: 4,471; sh: 215; python: 82; makefile: 17
file content (78 lines) | stat: -rwxr-xr-x 1,773 bytes parent folder | download | duplicates (6)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
set -e

# from http://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
no_native_arch=false
cxxflags=""

while [[ $# > 1 ]]
do
    key="$1"

    case $key in
        -b|--branch)
            branch="$2"
            shift # past argument
            ;;
        -v|--version)
            version="$2"
            shift # past argument
            ;;
        -f|--cxxflags)
            cxxflags="$2"
            shift # past argument
            ;;
        --no-native)
            no_native_arch=true
            ;;
        *)
            # unknown option
            ;;
    esac
    shift # past argument or value
done

echo "Building rapmap [branch = ${branch}]. Tagging version as ${version}"
if [ "$no_native_arch" = true ] ; then 
    echo "Disabling -march=native"
fi

if [[ -z $cxxflags ]] ; then
    echo "Passed CXXFLAGS ${cxxflags}"
fi

# Activate Holy Build Box environment.
source /hbb_exe/activate

set -x

# Install things we need
yum install -y --quiet wget
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -i --quiet epel-release-5-4.noarch.rpm
#yum install -y --quiet git
#yum install -y --quiet xz-devel.x86_64
#yum install -y --quiet bzip2-devel.x86_64
yum install -y --quiet unzip

curl -k -L https://github.com/COMBINE-lab/RapMap/archive/${branch}.zip -o ${branch}.zip
unzip ${branch}.zip
mv RapMap-${branch} RapMap
cd RapMap
mkdir build
cd build


if [ "$no_native_arch" = true ] ; then 
    cmake -DFETCH_BOOST=TRUE -DCMAKE_CXX_FLAGS=${cxxflags} -DNO_NATIVE_ARCH=TRUE ..
else
    cmake -DFETCH_BOOST=TRUE -DCMAKE_CXX_FLAGS=${cxxflags} ..
fi

make
make install
make test
cd ../scripts
bash make-release.sh -v ${version} -n linux_x86-64 
cd ../RELEASES
cp *.tar.gz /io/