Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1323 from rhyolight/add-back-osx
Browse files Browse the repository at this point in the history
Adding back OS X to build matrix.
  • Loading branch information
rhyolight committed Sep 18, 2014
2 parents 112109e + 559ca72 commit d466667
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Expand Up @@ -6,6 +6,7 @@ language: cpp

os:
- linux
- osx

compiler:
- clang
Expand All @@ -29,7 +30,7 @@ matrix:

# Successful builds are archived and uploaded to S3 for regression testing.
before_deploy:
- . ./ci/travis/before_deploy-linux.sh
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then . ./ci/travis/before_deploy-linux.sh; fi"

deploy:
provider: s3
Expand Down Expand Up @@ -62,11 +63,14 @@ notifications:
- https://webhooks.gitter.im/e/68f77bae61efa5c931f8

before_install:
- . ./ci/travis/before_install-linux.sh
- export PYTHONPATH=$PYTHONPATH:/home/travis/.local/lib/python$PY_VER/site-packages
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then . ./ci/travis/before_install-linux.sh; fi"
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then export PYTHONPATH=$PYTHONPATH:/home/travis/.local/lib/python$PY_VER/site-packages; fi"
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]; then . ./ci/travis/before_install-osx.sh; fi"
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]; then export PYTHONPATH=$PYTHONPATH:/Users/travis/Library/Python/$PY_VER/lib/python/site-packages; fi"

install:
- . ./ci/travis/install-linux.sh
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then . ./ci/travis/install-linux.sh; fi"
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]; then . ./ci/travis/install-osx.sh; fi"

script:
- . ./ci/travis/script-run-tests.sh
Expand Down
15 changes: 3 additions & 12 deletions ci/travis/before_install-osx.sh
Expand Up @@ -25,23 +25,14 @@ echo Running `basename $0`...
echo

# Get Darwin64 libs for OSX
echo ">>> git clone https://github.com/numenta/nupic-darwin64.git"
echo ">>> Cloning nupic-darwin64 at 40eee5d8b4f79fe52b282c393c8e1a1f5ba7a906..."
git clone https://github.com/numenta/nupic-darwin64.git
echo ">>> (cd nupic-darwin64 && git reset --hard 6496136d3748f5f15eaf8e85e48c113d7447149b)"
(cd nupic-darwin64 && git reset --hard 6496136d3748f5f15eaf8e85e48c113d7447149b)
echo ">>> source nupic-darwin64/bin/activate"
(cd nupic-darwin64 && git reset --hard 40eee5d8b4f79fe52b282c393c8e1a1f5ba7a906) || exit
echo ">>> Activating nupic-darwin64..."
source nupic-darwin64/bin/activate

# Install cmake on OSX
echo ">>> brew install cmake"
brew install cmake

# Install and start MySQL on OSX
echo ">>> brew install mysql"
brew install mysql
echo ">>> mysql.server start"
mysql.server start

# Prefix env with our user installation
echo ">>> export PYTHONPATH=$PYTHONPATH:/Users/travis/Library/Python/$PY_VER/lib/python/site-packages"
export PYTHONPATH=$PYTHONPATH:/Users/travis/Library/Python/$PY_VER/lib/python/site-packages
2 changes: 1 addition & 1 deletion ci/travis/install-linux.sh
Expand Up @@ -36,4 +36,4 @@ python$PY_VER setup.py install --user

# Show nupic installation folder by trying to import nupic, if works, it prints
# the absolute path of nupic.__file__, which the installation folder itself.
python -c 'import sys;import os;import nupic;sys.stdout.write(os.path.abspath(os.path.join(nupic.__file__, "../..")))'
python -c 'import sys;import os;import nupic;sys.stdout.write(os.path.abspath(os.path.join(nupic.__file__, "../..")))' || exit
14 changes: 13 additions & 1 deletion ci/travis/install-osx.sh
Expand Up @@ -24,4 +24,16 @@ echo
echo Running `basename $0`...
echo

cmake $NUPIC -DPROJECT_BUILD_RELEASE_DIR:STRING=$NTA
# Verify cmake version
cmake --version

# Verify python version
python$PY_VER --version

# Build NuPIC
cd $NUPIC
python$PY_VER setup.py install --user

# Show nupic installation folder by trying to import nupic, if works, it prints
# the absolute path of nupic.__file__, which the installation folder itself.
python -c 'import sys;import os;import nupic;sys.stdout.write(os.path.abspath(os.path.join(nupic.__file__, "../..")))' || exit

0 comments on commit d466667

Please sign in to comment.