Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from stlab/develop
Browse files Browse the repository at this point in the history
1.0 - develop to master
  • Loading branch information
fosterbrereton committed Jun 10, 2017
2 parents 71295cd + 7a60510 commit fa7f919
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 18 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
branches:
notifications:
slack: "stlab:P23OMUJ8T4Pa05OON0VDYwIf"
only: master
only:
- master
- develop
matrix:
include:
- language: c++
os: osx
osx_image: xcode8.3
script: ls -alF && ./build.sh
script: CC=clang++ ./build.sh
- language: ruby
rvm: ruby-head
install: gem install jekyll html-proofer github-pages
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Master status: [![Master status](https://travis-ci.org/stlab/stlab.github.io.svg?branch=master)](https://travis-ci.org/stlab/stlab.github.io)

- Develop status: [![Develop status](https://travis-ci.org/stlab/stlab.github.io.svg?branch=develop)](https://travis-ci.org/stlab/stlab.github.io)
7 changes: 4 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ twitter_username: SeanParent
github_username: stlab

exclude:
- build.sh
- build
- vendor # For Travis-CI (see https://jekyllrb.com/docs/continuous-integration/)
- _source
- build
- build.sh
- README.md
- stlab.bbprojectd/
- vendor # For Travis-CI (see https://jekyllrb.com/docs/continuous-integration/)

# Build settings
markdown: kramdown
Expand Down
61 changes: 48 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,77 @@ fi

cd build

if [ ! $CC ]; then
if [ -z "$CC" ]; then
export CC=clang++
fi

$CC --version

# env | sort

if [ -z "$TRAVIS_BRANCH" ]; then
export TRAVIS_BRANCH=`git branch | grep \* | cut -d ' ' -f2`
fi

if [ ! -d stlab ]; then
git clone --branch develop --depth=1 https://github.com/stlab/libraries.git stlab
echo "Cloning stlab branch $TRAVIS_BRANCH..."

git clone --branch $TRAVIS_BRANCH --depth=1 https://github.com/stlab/libraries.git stlab
else
echo "Found stlab already."
echo "WARNING: "
echo "WARNING: The git branch may not be correct."
echo "WARNING: "

cd stlab
git pull
cd ..
fi

if [ ! -d boost ]; then
if [ ! -f boost.tgz ]; then
echo "Downloading boost..."
curl -L https://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.gz -o boost.tgz
fi

mkdir boost
if [ ! -d boost ]; then
mkdir boost
fi

echo "Unpacking boost headers..."
tar -C boost -xzf boost.tgz --strip-components 1 boost_1_60_0/boost/

echo "Unpacking boost sources..."
tar -C boost -xzf boost.tgz --strip-components 1 boost_1_60_0/libs/
else
echo "Found boost..."
fi

find ../libraries -name "*.cpp" | while read -r src
do
echo $src
if [ ! -d bin ]; then
mkdir bin
fi

dst=`basename $src`.exe
cd ..

$CC -x c++ -std=c++14 -stdlib=libc++ $src -I./stlab -I./boost -o $dst
find ./libraries -name "*.cpp" | while read -r src
do
dst=./build/bin/`basename $src`.exe

export CMD="$CC -Wall -Werror -x c++ -std=c++14 $src -I./build/stlab -I./build/boost -o $dst"
echo $CMD
$CMD

if [ $? != 0 ]; then
exit $?;
export RETVAL=$?
if [ "$RETVAL" != "0" ]; then
exit "$RETVAL"
fi

echo "Running $dst..."

./$dst > /dev/null

if [ $? != 0 ]; then
exit $?;
export RETVAL=$?
if [ "$RETVAL" != "0" ]; then
exit "$RETVAL"
fi
done

0 comments on commit fa7f919

Please sign in to comment.