-
Notifications
You must be signed in to change notification settings - Fork 66
Port dependencies to mason #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ lib | |
| glyphs | ||
| spec | ||
| node_modules | ||
| mason_packages | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule ".mason"] | ||
| path = .mason | ||
| url = https://github.com/mapbox/mason.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,105 @@ | ||
| language: cpp | ||
| # Prevent Travis from exporting CXX after matrix env | ||
| language: c | ||
|
|
||
| sudo: false | ||
|
|
||
| matrix: | ||
| include: | ||
| # Coverage | ||
| - os: osx | ||
| compiler: clang | ||
| env: NODE_VERSION="0.10" COVERAGE=true | ||
| # Linux | ||
| - os: linux | ||
| compiler: clang | ||
| env: NODE_VERSION="0.10" | ||
| - os: linux | ||
| compiler: clang | ||
| env: NODE_VERSION="0.12" | ||
| # OS X | ||
| - os: osx | ||
| compiler: clang | ||
| env: NODE_VERSION="0.10" | ||
| - os: osx | ||
| compiler: clang | ||
| env: NODE_VERSION="0.12" | ||
| # Coverage | ||
| - os: osx | ||
| compiler: clang | ||
| env: | ||
| - NODE_EXE: "node" | ||
| - NODE_VERSION: 0.10 | ||
| - COVERAGE: true | ||
| - CXXFLAGS: "--coverage" | ||
| - LDFLAGS: "--coverage" | ||
| # Linux | ||
| - os: linux | ||
| compiler: clang | ||
| env: | ||
| - CXX: clang++-3.5 | ||
| - NODE_EXE: "node" | ||
| - NODE_VERSION: 0.10 | ||
| addons: | ||
| apt: | ||
| sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] | ||
| packages: [ 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6' ] | ||
| - os: linux | ||
| compiler: clang | ||
| env: | ||
| - CXX: clang++-3.5 | ||
| - NODE_EXE: "node" | ||
| - NODE_VERSION: 0.12 | ||
| addons: | ||
| apt: | ||
| sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] | ||
| packages: [ 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6' ] | ||
| - os: linux | ||
| compiler: clang | ||
| env: | ||
| - CXX: clang++-3.5 | ||
| - NODE_EXE: "iojs" | ||
| - NODE_VERSION: 2.3 | ||
| addons: | ||
| apt: | ||
| sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ] | ||
| packages: [ 'clang-3.5', 'libstdc++-4.9-dev', 'libstdc++6' ] | ||
| # OS X | ||
| - os: osx | ||
| compiler: clang | ||
| env: | ||
| - NODE_EXE: "node" | ||
| - NODE_VERSION: 0.10 | ||
| - os: osx | ||
| compiler: clang | ||
| env: | ||
| - NODE_EXE: "node" | ||
| - NODE_VERSION: 0.12 | ||
| - os: osx | ||
| compiler: clang | ||
| env: | ||
| - NODE_EXE: "iojs" | ||
| - NODE_VERSION: 2.3 | ||
|
|
||
| env: | ||
| global: | ||
| - JOBS: "8" | ||
| - BUILD: '/tmp/fontnik-build' | ||
| - PKG_CONFIG_PATH: '/tmp/fontnik-build/lib/pkgconfig' | ||
| - secure: "XV0lekmfgT+D9t0ZTIU+UJF6g+p3cBQMO6T6C9lkoKTC0YbtLtxSFtBahD/4PjL86DMJgTaf1nBmxqOxbrfkcpJUxnLe3r8u4Z2L/+7+QSACLNktlIfWNSO+33WxKNb4mVw6jMFZIo4ZurF016MXYzLzjpxRELW2oO2STUs2m44=" | ||
| - secure: "CQNHbxw8yHlAdUVbKokHzHmj7C+duXP3mifWOkZm9GKw4myWsRFhhoSYZmOSkgj9EWfYYkedrqEr9+GaMg9rkVJuO/7jzn6S+M7CFXKJju6MoZEDO6WcFva4M8pw6IFb9q22GcQ+OsE8/i0DwchTokyFkNb3fpwWuwROUPQ/nWg=" | ||
| - secure: "XV0lekmfgT+D9t0ZTIU+UJF6g+p3cBQMO6T6C9lkoKTC0YbtLtxSFtBahD/4PjL86DMJgTaf1nBmxqOxbrfkcpJUxnLe3r8u4Z2L/+7+QSACLNktlIfWNSO+33WxKNb4mVw6jMFZIo4ZurF016MXYzLzjpxRELW2oO2STUs2m44=" | ||
| - secure: "CQNHbxw8yHlAdUVbKokHzHmj7C+duXP3mifWOkZm9GKw4myWsRFhhoSYZmOSkgj9EWfYYkedrqEr9+GaMg9rkVJuO/7jzn6S+M7CFXKJju6MoZEDO6WcFva4M8pw6IFb9q22GcQ+OsE8/i0DwchTokyFkNb3fpwWuwROUPQ/nWg=" | ||
|
|
||
| before_install: | ||
| - export COVERAGE=${COVERAGE:-false} | ||
| # here we set up the node version on the fly based on the matrix value. | ||
| # This is done manually so that it is easy to flip the 'language' to | ||
| # objective-c in another branch (to run the same travis.yml on OS X) | ||
| - git clone https://github.com/creationix/nvm.git ../.nvm | ||
| - source ../.nvm/nvm.sh | ||
| - nvm install $NODE_VERSION | ||
| - nvm use $NODE_VERSION | ||
| - node --version | ||
| - npm --version | ||
| - if [[ ${COVERAGE} == true ]]; then | ||
| brew update; | ||
| brew install pyenv; | ||
| eval "$(pyenv init -)"; | ||
| pyenv install 2.7.6; | ||
| pyenv global 2.7.6; | ||
| pyenv rehash; | ||
| pip install cpp-coveralls; | ||
| pyenv rehash; | ||
| fi; | ||
| - export PATH="$BUILD/bin:$PATH" | ||
| - ./deps/travis_build.sh | ||
| - export COVERAGE=${COVERAGE:-false} | ||
| - if [[ ${COVERAGE} == true ]]; then | ||
| brew update; | ||
| brew install pyenv; | ||
| eval "$(pyenv init -)"; | ||
| pyenv install 2.7.6; | ||
| pyenv global 2.7.6; | ||
| pyenv rehash; | ||
| pip install cpp-coveralls; | ||
| pyenv rehash; | ||
| fi; | ||
| - ./scripts/install_node.sh | ||
|
|
||
| install: | ||
| - if [[ ${COVERAGE} == true ]]; then | ||
| export LDFLAGS="--coverage" && export CXXFLAGS="--coverage" && npm install --build-from-source --debug --clang=1; | ||
| - if [[ ${COVERAGE} == true ]]; then | ||
| npm install --build-from-source --debug --clang; | ||
| else | ||
| npm install --build-from-source --clang=1; | ||
| npm install --build-from-source --clang; | ||
| fi; | ||
|
|
||
| before_script: | ||
| - ulimit -c unlimited -S | ||
| - ulimit -a | ||
|
|
||
| script: | ||
| - npm test | ||
| - if [[ ${COVERAGE} == true ]]; then cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude doc --exclude build/Debug/obj/gen; fi; | ||
| - npm test | ||
| - if [[ ${COVERAGE} == true ]]; then | ||
| cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude doc --exclude build/Debug/obj/gen; | ||
| fi; | ||
|
|
||
| after_success: | ||
| - ./deps/travis_publish.sh | ||
| - ./scripts/travis_publish.sh | ||
|
|
||
| git: | ||
| submodules: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,23 +30,50 @@ | |
| './include', | ||
| './vendor/agg/include', | ||
| '<(SHARED_INTERMEDIATE_DIR)/', | ||
| '<!@(pkg-config freetype2 --cflags-only-I | sed s/-I//g)', | ||
| '<!@(pkg-config protobuf --cflags-only-I | sed s/-I//g)', | ||
| '<!@(mason cflags boost ${BOOST_VERSION} | sed s/-I//g)', | ||
| '<!@(mason cflags freetype ${FREETYPE_VERSION} | sed s/-I//g)', | ||
| '<!@(mason cflags protobuf ${PROTOBUF_VERSION} | sed s/-I//g)', | ||
| "<!(node -e \"require('nan')\")" | ||
| ], | ||
| 'libraries': [ | ||
| '<!@(pkg-config freetype2 --libs --static)', | ||
| '<!@(pkg-config protobuf --libs --static)' | ||
| '<!@(mason static_libs freetype ${FREETYPE_VERSION})', | ||
| '<!@(mason static_libs protobuf ${PROTOBUF_VERSION})' | ||
| ], | ||
| 'conditions': [ | ||
| ['OS=="mac"', { | ||
| 'xcode_settings': { | ||
| 'CLANG_CXX_LIBRARY': 'libc++', | ||
| 'CLANG_CXX_LANGUAGE_STANDARD': 'c++1y', | ||
| 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', | ||
| 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', | ||
| 'GCC_ENABLE_CPP_RTTI': 'YES', | ||
| 'OTHER_CPLUSPLUSFLAGS': [ | ||
| '-Wall', | ||
| '-Wextra', | ||
| '-Wshadow', | ||
| '-Wno-variadic-macros', | ||
| '-Wno-unused-parameter', | ||
| '-Wno-unused-variable', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two are here because of unused variables and parameters in 3rd party libs. |
||
| '-Wno-sign-compare', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only in here because protobuf can't count properly. |
||
| ], | ||
| 'GCC_WARN_PEDANTIC': 'YES', | ||
| 'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE', | ||
| 'MACOSX_DEPLOYMENT_TARGET': '10.9', | ||
| }, | ||
| }, { | ||
| 'cflags_cc': [ | ||
| '-std=c++14', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If only
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't have to, but probably doesn't affect the outcome. |
||
| '-Wall', | ||
| '-Wextra', | ||
| '-Wno-variadic-macros', | ||
| '-Wno-unused-parameter', | ||
| '-Wno-unused-variable', | ||
| '-Wno-sign-compare', | ||
| '-frtti', | ||
| '-fexceptions', | ||
| ], | ||
| }], | ||
| ], | ||
| 'xcode_settings': { | ||
| 'MACOSX_DEPLOYMENT_TARGET': '10.8', | ||
| 'OTHER_CPLUSPLUSFLAGS': ['-Wshadow','-std=c++11', '-stdlib=libc++', '-Wno-unused-variable'], | ||
| 'GCC_ENABLE_CPP_RTTI': 'YES', | ||
| 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' | ||
| }, | ||
| 'cflags_cc!': ['-fno-rtti', '-fno-exceptions'], | ||
| 'cflags_cc' : ['-std=c++11','-Wshadow'], | ||
| 'cflags_c' : ['-std=c99'] | ||
| }, | ||
| { | ||
| 'target_name': 'action_after_build', | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # This script is sourced, so do not set -e or -o pipefail here. Doing so would | ||
| # bleed into Travis' wrapper script, which messes with their workflow, e.g. | ||
| # preventing after_failure scripts to be triggered. | ||
|
|
||
| case `uname -s` in | ||
| 'Darwin') JOBS=$((`sysctl -n hw.ncpu` + 2)) ;; | ||
| 'Linux') JOBS=$((`nproc` + 2)) ;; | ||
| *) JOBS=2 ;; | ||
| esac | ||
|
|
||
| export JOBS | ||
|
|
||
| git submodule update --init .mason | ||
|
|
||
| export PATH="`pwd`/.mason:${PATH}" | ||
| export MASON_DIR="`pwd`/.mason" | ||
|
|
||
| export BOOST_VERSION=1.58.0 | ||
| export FREETYPE_VERSION=2.6 | ||
| export PROTOBUF_VERSION=2.6.1 | ||
|
|
||
| mason install boost ${BOOST_VERSION} | ||
| mason install freetype ${FREETYPE_VERSION} | ||
| mason install protobuf ${PROTOBUF_VERSION} | ||
|
|
||
| # Add protoc to $PATH | ||
| export PATH="`mason prefix protobuf ${PROTOBUF_VERSION}`/bin:${PATH}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
| set -o pipefail | ||
|
|
||
| git clone https://github.com/creationix/nvm.git ../.nvm | ||
| source ../.nvm/nvm.sh | ||
|
|
||
| nvm install ${NODE_EXE} ${NODE_VERSION} | ||
|
|
||
| ${NODE_EXE} --version | ||
| npm --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem necessary so I dropped it.