Skip to content

Commit

Permalink
Build Conan package on OSX (google#4590)
Browse files Browse the repository at this point in the history
- Added jobs to build Flatbuffers on OSX running on Travis

Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Aug 12, 2018
1 parent 07efbc9 commit 42de89f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ env:
- GCC_VERSION="4.9"

conan-linux: &conan-linux
os: linux
sudo: required
language: python
python: "3.6"
services:
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
install:
- pip install conan conan-package-tools
script:
- python conan/build.py
on:
tags: true
install:
- pip install conan conan-package-tools
script:
- python conan/build.py
on:
tags: true

conan-osx: &conan-osx
os: osx
language: generic
install:
- ./conan/travis/osx_install.sh
script:
- ./conan/travis/osx_build.sh
on:
tags: true

matrix:
include:
Expand Down
13 changes: 13 additions & 0 deletions conan/travis/osx_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e
set -x

if [[ "$(uname -s)" == 'Darwin' ]]; then
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
pyenv activate conan
fi

python conan/build.py
23 changes: 23 additions & 0 deletions conan/travis/osx_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e
set -x

if [[ "$(uname -s)" == 'Darwin' ]]; then
brew update || brew update
brew outdated pyenv || brew upgrade pyenv
brew install pyenv-virtualenv
brew install cmake || true

if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi

pyenv install 2.7.10
pyenv virtualenv 2.7.10 conan
pyenv rehash
pyenv activate conan
fi

pip install conan_package_tools # It install conan too
conan user

0 comments on commit 42de89f

Please sign in to comment.