mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 18:27:10 +01:00
Merge pull request #250 from cdunn2001/travis
in travis, build for osx also
This commit is contained in:
commit
80bc776bae
61
.travis.yml
61
.travis.yml
@ -1,4 +1,4 @@
|
|||||||
# Build matrix / environment variable are explained on:
|
# Build matrix / environment variables are explained on:
|
||||||
# http://about.travis-ci.org/docs/user/build-configuration/
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
||||||
# This file can be validated on:
|
# This file can be validated on:
|
||||||
# http://lint.travis-ci.org/
|
# http://lint.travis-ci.org/
|
||||||
@ -6,54 +6,37 @@
|
|||||||
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
|
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
|
||||||
# to allow C++11, though we are not yet building with -std=c++11
|
# to allow C++11, though we are not yet building with -std=c++11
|
||||||
|
|
||||||
#before_install: pyenv install 3.5.4 && pyenv global 3.5.4
|
before_install:
|
||||||
before_install: pyenv global 3.6
|
- source travis.before_install.${TRAVIS_OS_NAME}.sh
|
||||||
# https://docs.travis-ci.com/user/languages/python/
|
|
||||||
# "for Trusty, this means 2.7.6 and 3.4.3"
|
|
||||||
install:
|
install:
|
||||||
- if [[ $TRAVIS_OS_NAME == osx ]]; then
|
- source travis.install.${TRAVIS_OS_NAME}.sh
|
||||||
brew update;
|
|
||||||
brew install python3 ninja;
|
|
||||||
python3 -m venv venv;
|
|
||||||
source venv/bin/activate;
|
|
||||||
elif [[ $TRAVIS_OS_NAME == linux ]]; then
|
|
||||||
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip;
|
|
||||||
unzip -q ninja-linux.zip -d build;
|
|
||||||
fi
|
|
||||||
- pip3 install meson
|
|
||||||
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
|
|
||||||
- if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
|
||||||
# /usr/bin/clang has a conflict with gcc, so use clang-X.Y.
|
|
||||||
- if [[ $CXX = clang++ ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
|
|
||||||
- echo ${PATH}
|
|
||||||
- ls /usr/local
|
|
||||||
- ls /usr/local/bin
|
|
||||||
- export PATH="${PWD}"/build:/usr/local/bin:/usr/bin:${PATH}
|
|
||||||
- echo ${CXX}
|
|
||||||
- ${CXX} --version
|
|
||||||
- which valgrind
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
#- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-precise-3.5
|
- llvm-toolchain-precise-3.5
|
||||||
packages:
|
packages:
|
||||||
- gcc-4.9
|
#- gcc-4.9
|
||||||
- g++-4.9
|
#- g++-4.9
|
||||||
- clang-3.5
|
- clang-3.5
|
||||||
- valgrind
|
- valgrind
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
language: cpp
|
language: cpp
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
script: ./travis.sh
|
script: ./travis.sh
|
||||||
env:
|
matrix:
|
||||||
matrix:
|
allow_failures:
|
||||||
- LIB_TYPE=static BUILD_TYPE=release
|
- os: osx
|
||||||
- LIB_TYPE=shared BUILD_TYPE=debug
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.4
|
||||||
|
compiler: clang
|
||||||
|
#env: PYENV_ROOT=/usr/local/var/pyenv
|
||||||
|
env: LIB_TYPE=static BUILD_TYPE=release
|
||||||
|
#- LIB_TYPE=shared BUILD_TYPE=debug
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
compiler: clang
|
||||||
|
env: LIB_TYPE=static BUILD_TYPE=release
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
dist: trusty
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
7
travis.before_install.linux.sh
Normal file
7
travis.before_install.linux.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
set -vex
|
||||||
|
#before_install: pyenv install 3.5.4 && pyenv global 3.5.4
|
||||||
|
#before_install: pyenv global 3.6
|
||||||
|
# https://docs.travis-ci.com/user/languages/python/
|
||||||
|
# "for Trusty, this means 2.7.6 and 3.4.3"
|
||||||
|
|
||||||
|
pyenv global 3.6
|
3
travis.before_install.osx.sh
Normal file
3
travis.before_install.osx.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
set -vex
|
||||||
|
#brew install pyenv
|
||||||
|
#which pyenv
|
14
travis.install.linux.sh
Normal file
14
travis.install.linux.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
set -vex
|
||||||
|
|
||||||
|
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
|
||||||
|
unzip -q ninja-linux.zip -d build
|
||||||
|
|
||||||
|
pip3 install meson
|
||||||
|
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
|
||||||
|
if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||||
|
# /usr/bin/clang has a conflict with gcc, so use clang-X.Y.
|
||||||
|
if [[ $CXX = clang++ ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
|
||||||
|
echo ${PATH}
|
||||||
|
ls /usr/local
|
||||||
|
ls /usr/local/bin
|
||||||
|
export PATH="${PWD}"/build:/usr/local/bin:/usr/bin:${PATH}
|
12
travis.install.osx.sh
Normal file
12
travis.install.osx.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
set -vex
|
||||||
|
|
||||||
|
#brew update
|
||||||
|
brew upgrade python3
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
brew install ninja
|
||||||
|
brew install meson
|
||||||
|
|
||||||
|
#brew install pyenv
|
||||||
|
#which pyenv
|
@ -17,6 +17,9 @@ set -vex
|
|||||||
|
|
||||||
env | sort
|
env | sort
|
||||||
|
|
||||||
|
echo ${CXX}
|
||||||
|
${CXX} --version
|
||||||
|
python3 --version
|
||||||
meson --version
|
meson --version
|
||||||
ninja --version
|
ninja --version
|
||||||
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
||||||
|
Loading…
Reference in New Issue
Block a user