blob: 48e00871366285c79bdd9188ad31d31025372e1f [file] [log] [blame]
language: c
matrix:
include:
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: clang
env: TRAVIS_ARCH="amd64"
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="amd64" DEPLOY_BUILD=TRUE
- arch: arm64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="arm64"
- arch: amd64
os: linux
dist: bionic
sudo: required
compiler: gcc
env: TRAVIS_ARCH="amd64" ENABLE_STATIC=ON
- arch: amd64
os: osx
compiler: gcc
env: TRAVIS_ARCH="amd64"
allow_failures:
- os: osx
branches:
only:
- master
- devel
before_install:
- git clone git://git.cryptomilk.org/projects/cmocka.git
- cd cmocka && mkdir build && cd build
- cmake .. && make -j2 && sudo make install
- cd ../..
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind libpcre3-dev python3-dev swig python3-cffi python3-setuptools python3-pip; fi
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22 twine==3.1.1; export CFLAGS="-coverage"; fi
script:
- mkdir build && cd build
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF -DGEN_PYTHON_CFFI_BINDINGS=ON ..; fi
- make -j2 && ctest --output-on-failure
- cd -
deploy:
- provider: script
script: bash <(curl -s https://codecov.io/bash)
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
- provider: script
script: ./packages/create-package.sh
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE
- provider: script
script: twine upload --skip-existing build/python/dist/*
skip_cleanup: true
verbose: true
on:
branch: master
condition: $DEPLOY_BUILD = TRUE