language: node_js compiler: - clang node_js: - "10.13.0" os : - linux - osx env: - ARCHITECTURE="$TRAVIS_OS_NAME" addons: apt: sources: - llvm-toolchain-precise packages: - cppcheck - llvm-dev - clang before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ARCHITECTURE="darwin" ;fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-6.0 release' ;fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L 'http://llvm.org/apt/llvm-snapshot.gpg.key' | sudo apt-key add - ;fi - echo $ARCHITECTURE - echo $TRAVIS_OS_NAME script: - npm run pre-build - npm install --build-from-source - npm test - npm run unit-tests - mkdir $TRAVIS_BUILD_DIR/build/Release/bin - cp $TRAVIS_BUILD_DIR/build/Release/wakanda_storage.node $TRAVIS_BUILD_DIR/build/Release/bin - cd $TRAVIS_BUILD_DIR/build/Release - tar cfvz wakanda_storage_$ARCHITECTURE.tar.gz bin - cd $TRAVIS_BUILD_DIR install: - export cc=clang && export CXX=clang++ deploy: - provider: releases email: social@wakanda.io api_key: $githubKey file: "$TRAVIS_BUILD_DIR/build/Release/wakanda_storage_$ARCHITECTURE.tar.gz" skip_cleanup: true on : all_branches: true repo: Wakanda/wakanda-storage tags: true - provider: npm email: social@wakanda.io api_key: $npmToken on: branch: master tags: true