Skip to content

Commit

Permalink
Linux/Unix release script (#260)
Browse files Browse the repository at this point in the history
* fix C++ errors and add Easybuild file

* add directives to compile the EasyBuild module with Intel

* moving OpenMalaria module file to the easyconfigs folder

* fix easyconfig bug

* comments checkpointer timer functions in Simulator.cpp to fix a thread lock issue with intel

* attempt at fixing travis issue

* second attempt at fixing travis issues

* Fixing boost version to 1.60 in Travis Builds

* switching to fp model source for the Intel compiler

* add release script for Linux

* improve release script and add Mac OS / Unix support

* remove boost version 1.60 in install-dep-osx

* rename linux-build.sh to build.sh because of Mac OS support

* comment Mac OS line
  • Loading branch information
acavelan authored Jun 7, 2020
1 parent bff73ee commit 91b00c2
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#/bin/bash

# Assuming you have installed:
# gsl, git, xsd, xerces-c, boost

# Ubuntu:
# sudo apt-get install git libboost-dev libgsl-dev libxerces-c-dev xsdcxx

# Mac OS:
# brew install boost@1.60 coreutils cmake gcc gsl xerces-c xsd

echo "=========================================================================="
echo "IMPORTANT: make sure dependencies are installed."
echo "Ubuntu/Debian:"
echo "sudo apt-get install build-essential git cmake libboost-dev libgsl-dev libxerces-c-dev xsdcxx"
echo "Mac OS:"
echo "brew install boost coreutils cmake gcc gsl xerces-c xsd"
echo "=========================================================================="

# stop on error
set -e

OMGIT=openmalaria
RELEASE=openMalaria
BRANCH=master

# Clone git repo
if [ ! -d "$OMGIT" ] ; then
git clone --branch $BRANCH https://github.com/SwissTPH/openmalaria.git $OMGIT
else
pushd "$OMGIT" && git checkout $BRANCH && git pull && popd
fi

# Compile OpenMalaria
pushd $OMGIT/
mkdir -p build && pushd build && cmake -DCMAKE_BUILD_TYPE=Release -DOM_BOXTEST_ENABLE=OFF -DOM_CXXTEST_ENABLE=OFF .. && make -j4 && popd
popd

# Get version number
VERSION=$(cat $OMGIT/version.txt | cut -d'-' -f2)

# Prepare release folder by copying the necessary files
mkdir -p $RELEASE-$VERSION
cp $OMGIT/build/openMalaria $RELEASE-$VERSION/
cp -r $OMGIT/util/example/* $RELEASE-$VERSION/
cp $OMGIT/schema/scenario_41.xsd $RELEASE-$VERSION/
cp $OMGIT/test/densities.csv $RELEASE-$VERSION/
cp $OMGIT/test/autoRegressionParameters.csv $RELEASE-$VERSION/

# Compress into a tarball
tar -cavf $RELEASE-$VERSION.tar.gz $RELEASE-$VERSION/

echo "BUILD SUCCESS: $RELEASE-$VERSION.tar.gz"

# Don't delete the temp folders yet, let the user decide
# rm -rf $OMGIT $RELEASE-$VERSION/

0 comments on commit 91b00c2

Please sign in to comment.