Skip to content

Commit

Permalink
Merge branch 'master' into parrot-multiport
Browse files Browse the repository at this point in the history
* master:
  Apply @lekshmideepu suggestions
  Filter out empty entries in changed files
  some cleanup
  Modify travis.yml
  Implemented two fixes for the K computer:
  Print status about uploading to S3
  Remove cppcheck files after static analysis.
  Adjust comment and have starting and ending line at summary
  Correct copyright header.
  Add a script to parse travis log and give a nice summary.
  Removed superfluous and outdated files
  • Loading branch information
flinz committed Nov 3, 2015
2 parents 4d939e5 + c80a8be commit 9425619
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 273 deletions.
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: cpp
compiler:
- gcc
language: generic


#For Ubuntu Trusty (14.04 LTS)
sudo: required
dist: trusty

env:
Expand All @@ -22,12 +22,9 @@ cache:
apt: true
ccache: true
pip: true
#virtualenv:
# system_site_packages: true

before_install:
- echo $LANG
- echo $LC_ALL
- echo $PATH

# get repository for clang-3.6 stuff (including clang-format-3.6)
- sudo sh -c 'echo -n "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main" >> /etc/apt/sources.list'
Expand All @@ -48,8 +45,8 @@ before_install:
# Install pip and cython
- wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
- sudo python get-pip.py
- pip install --user cython==0.21.1
- sudo pip install -U setuptools
- pip install --user cython==0.23.4

# MPI
- sudo apt-get install -y openmpi-bin libopenmpi-dev
Expand All @@ -67,13 +64,19 @@ before_install:
- sudo apt-get install -y jq

install:
- which cython
- cython --version
- which python
- python --version
- which pip

before_script:
- chmod +x build.sh

script: ./build.sh
script:
- set -o pipefail
- ./build.sh 2>&1 | tee build.sh.log
- python extras/parse_travis_log.py build.sh.log

before_deploy:
- cd $TRAVIS_BUILD_DIR/build
Expand All @@ -82,7 +85,7 @@ before_deploy:
- mkdir -p $TRAVIS_BUILD_DIR/build/artefacts_upload
- mv logfiles.tar.gz $TRAVIS_BUILD_DIR/build/artefacts_upload
- mv reports.tar.gz $TRAVIS_BUILD_DIR/build/artefacts_upload

#S3 deployment

deploy:
Expand Down
42 changes: 19 additions & 23 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ EOF

if [ "$xMPI" = "1" ] ; then

#openmpi
export LD_LIBRARY_PATH="/usr/lib/openmpi/lib:$LD_LIBRARY_PATH"
export CPATH="/usr/lib/openmpi/include:$CPATH"
export PATH="/usr/include/mpi:$PATH"

cat > $HOME/.nestrc <<EOF
% ZYV: NEST MPI configuration
/mpirun
Expand Down Expand Up @@ -51,28 +46,12 @@ fi
NEST_VPATH=build
NEST_RESULT=result

mkdir "$NEST_VPATH" "$NEST_RESULT"
mkdir "$NEST_VPATH" "$NEST_RESULT"
mkdir "$NEST_VPATH/reports"

NEST_RESULT=$(readlink -f $NEST_RESULT)

cd "$NEST_VPATH"

../configure \
--prefix="$NEST_RESULT" CC=mpicc CXX=mpic++ \
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_GSL \

export PYTHONPATH=$NEST_RESULT/lib/python2.7/site-packages:$PYTHONPATH
export PYTHONPATH=/usr/local/bin:$NEST_RESULT/lib64/python2.7/site-packages:$PYTHONPATH
export PATH=~/.local/bin:/usr/local/bin:$NEST_RESULT/bin:$PATH
make
make install
make installcheck

# static code analysis
cd .. # go back to source dir

# initialize vera++
mkdir -p vera_home

Expand Down Expand Up @@ -124,6 +103,7 @@ cppcheck --version
cd ..

# Extracting changed files in PR / push
echo "Extract changed files..."
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
file_names=`curl "https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files" | jq '.[] | .filename' | tr '\n' ' ' | tr '"' ' '`
else
Expand Down Expand Up @@ -159,6 +139,7 @@ for f in $file_names; do
# writes the differences to a temp file
echo "\n - clang-format for $f:"
diff $f ${f_base}_formatted_$TRAVIS_COMMIT.txt | tee ${f_base}_clang_format.txt
cat ${f_base}_clang_format.txt

# remove temporary files
rm ${f_base}_formatted_$TRAVIS_COMMIT.txt
Expand All @@ -175,6 +156,21 @@ for f in $file_names; do
esac
done

# Remove cppcheck files, otherwise 'regressiontests/ticket-659-copyright.py' will complain
rm -rf ./cppcheck

cd "$NEST_VPATH"

../configure \
--prefix="$NEST_RESULT" CC=mpicc CXX=mpic++ \
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_GSL \

make
make install
make installcheck

if [ "$format_error_files" != "" ]; then
echo "There are files with a formatting error: $format_error_files ."
exit 42
Expand Down
Loading

0 comments on commit 9425619

Please sign in to comment.