Serial-Studio/libs/qtcsv/.travis.yml
2021-01-09 16:47:35 -08:00

233 lines
7.2 KiB
YAML

language: cpp
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=48
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=48 USE_CMAKE=true
- os: osx
compiler: clang
env:
- QT_BASE=48
- os: osx
compiler: clang
env:
- QT_BASE=48 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=51 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=52 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=53 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=54 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=55 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=56 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=57 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=58 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=59 USE_CMAKE=true
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- QT_BASE=510 USE_CMAKE=true
- os: linux
dist: xenial
compiler: gcc
env:
- QT_BASE=511 USE_CMAKE=true
- os: linux
dist: xenial
compiler: gcc
env:
- QT_BASE=512 USE_CMAKE=true
- os: linux
dist: xenial
compiler: gcc
env:
- QT_BASE=513 USE_CMAKE=true
- os: osx
compiler: clang
env:
- QT_BASE=513
- os: osx
compiler: clang
env:
- QT_BASE=513 USE_CMAKE=true
- os: linux
dist: xenial
compiler: gcc
env:
- QT_BASE=514
- os: linux
dist: xenial
compiler: gcc
env:
- QT_BASE=514 USE_CMAKE=true
before_install:
- if [[ "$QT_BASE" = "48" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt487-trusty -y; fi
- if [ "$QT_BASE" = "51" ]; then sudo add-apt-repository ppa:beineri/opt-qt511-trusty -y; fi
- if [ "$QT_BASE" = "52" ]; then sudo add-apt-repository ppa:beineri/opt-qt521-trusty -y; fi
- if [ "$QT_BASE" = "53" ]; then sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y; fi
- if [ "$QT_BASE" = "54" ]; then sudo add-apt-repository ppa:beineri/opt-qt542-trusty -y; fi
- if [ "$QT_BASE" = "55" ]; then sudo add-apt-repository ppa:beineri/opt-qt551-trusty -y; fi
- if [ "$QT_BASE" = "56" ]; then sudo add-apt-repository ppa:beineri/opt-qt563-trusty -y; fi
- if [ "$QT_BASE" = "57" ]; then sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y; fi
- if [ "$QT_BASE" = "58" ]; then sudo add-apt-repository ppa:beineri/opt-qt58-trusty -y; fi
- if [ "$QT_BASE" = "59" ]; then sudo add-apt-repository ppa:beineri/opt-qt597-trusty -y; fi
- if [ "$QT_BASE" = "510" ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y; fi
- if [ "$QT_BASE" = "511" ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.11.3-xenial -y; fi
- if [ "$QT_BASE" = "512" ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.12.8-xenial -y; fi
- if [[ "$QT_BASE" = "513" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt-5.13.2-xenial -y; fi
- if [ "$QT_BASE" = "514" ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.14.2-xenial -y; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get update -qq;
else
brew update;
fi
install:
- if [ "$QT_BASE" = "48" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install -qq opt-qt4-qmake opt-qt4-dev-tools; source /opt/qt-4.8/bin/qt-4.8-env.sh;
else
brew tap cartr/qt4;
brew tap-pin cartr/qt4;
brew install qt@4;
brew link --force qt@4;
fi
fi
- if [ "$QT_BASE" = "51" ]; then sudo apt-get install -qq qt51base; source /opt/qt51/bin/qt51-env.sh; fi
- if [ "$QT_BASE" = "52" ]; then sudo apt-get install -qq qt52base; source /opt/qt52/bin/qt52-env.sh; fi
- if [ "$QT_BASE" = "53" ]; then sudo apt-get install -qq qt53base; source /opt/qt53/bin/qt53-env.sh; fi
- if [ "$QT_BASE" = "54" ]; then sudo apt-get install -qq qt54base; source /opt/qt54/bin/qt54-env.sh; fi
- if [ "$QT_BASE" = "55" ]; then sudo apt-get install -qq qt55base; source /opt/qt55/bin/qt55-env.sh; fi
- if [ "$QT_BASE" = "56" ]; then sudo apt-get install -qq qt56base; source /opt/qt56/bin/qt56-env.sh; fi
- if [ "$QT_BASE" = "57" ]; then sudo apt-get install -qq qt57base; source /opt/qt57/bin/qt57-env.sh; fi
- if [ "$QT_BASE" = "58" ]; then sudo apt-get install -qq qt58base; source /opt/qt58/bin/qt58-env.sh; fi
- if [ "$QT_BASE" = "59" ]; then sudo apt-get install -qq qt59base; source /opt/qt59/bin/qt59-env.sh; fi
- if [ "$QT_BASE" = "510" ]; then sudo apt-get install -qq qt510base; source /opt/qt510/bin/qt510-env.sh; fi
- if [ "$QT_BASE" = "511" ]; then sudo apt-get install -qq qt511base; source /opt/qt511/bin/qt511-env.sh; fi
- if [ "$QT_BASE" = "512" ]; then sudo apt-get install -qq qt512base; source /opt/qt512/bin/qt512-env.sh; fi
- if [ "$QT_BASE" = "513" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install -qq qt513base; source /opt/qt513/bin/qt513-env.sh;
else
brew install qt;
brew link --force qt;
export HOMEBREW_QT5_VERSION=$(brew list --versions qt | rev | cut -d' ' -f1 | rev);
sudo ln -s /usr/local/Cellar/qt/$HOMEBREW_QT5_VERSION/mkspecs /usr/local/mkspecs;
echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile;
fi
fi
- if [ "$QT_BASE" = "514" ]; then sudo apt-get install -qq qt514base; source /opt/qt514/bin/qt514-env.sh; fi
script:
# build library and tests, install library
- mkdir ./build && cd ./build
- if [ "$USE_CMAKE" = "true" ]; then
cmake --version;
if [ "$QT_BASE" = "48" ]; then
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_QT4=ON ..;
else
cmake -DCMAKE_BUILD_TYPE=Release ..;
fi
make;
sudo make install;
cd ./tests;
else
qmake -v;
qmake ../qtcsv.pro CONFIG+=release;
make;
sudo make install;
mkdir ./tests && cd ./tests;
qmake ../../tests/tests.pro CONFIG+=release LIBS+=-L../;
make;
fi
# download test file
#- wget -O worldcitiespop.txt.gz https://raw.github.com/apache/commons-csv/master/src/test/resources/perf/worldcitiespop.txt.gz
#- gunzip worldcitiespop.txt.gz
#- mv ./worldcitiespop.txt ./data
# run tests
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/../
- chmod 777 qtcsv_tests
- ./qtcsv_tests
# check if library was properly installed
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
echo "Check installation";
if [ -f /usr/local/lib/libqtcsv.so ]; then
ls -la /usr/local/lib | grep qtcsv;
else
echo "File '/usr/local/lib/libqtcsv.so' do not exist";
exit 1;
fi
if [ -d /usr/local/include/qtcsv ]; then
ls -la /usr/local/include/qtcsv;
else
echo "Dir '/usr/local/include/qtcsv' do not exist";
exit 1;
fi
fi
notifications:
email: false