Try to run tests automatically

This commit is contained in:
Paul Fd 2020-03-08 17:12:40 +01:00
parent 4f4723a341
commit 2779f8710d
2 changed files with 31 additions and 7 deletions

View file

@ -18,6 +18,32 @@ jobs:
- scripts/run_clang_tidy.sh
after_success:
- true
- os: linux
name: "Linux amd64 tests"
arch: amd64
dist: bionic
env:
- BUILD_TYPE="test"
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
after_success:
- true
- os: linux
name: "Linux arm64 tests"
arch: amd64
dist: bionic
env:
- BUILD_TYPE="test"
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
after_success:
- true
- os: linux
stage: "Build"
name: "Windows mingw32"

View file

@ -6,26 +6,24 @@ set -ex
mkdir -p build/${INSTALL_DIR} && cd build
if [[ ${CROSS_COMPILE} == "mingw32" ]]; then
buildenv i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
buildenv make -j
elif [[ ${CROSS_COMPILE} == "mingw64" ]]; then
buildenv x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
buildenv make -j
elif [[ ${BUILD_TYPE} == "lv2" ]]; then
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_TESTS=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
buildenv make -j
buildenv make -j$(nproc)
elif [[ ${BUILD_TYPE} == "test" ]]; then
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_TESTS=ON -DSFIZZ_SHARED=OFF -DSFIZZ_STATIC_LIBSNDFILE=OFF -DSFIZZ_LV2=OFF ..
buildenv make -j$(nproc) sfizz_tests
buildenv tests/sfizz_tests
elif [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_LV2=OFF -DSFIZZ_TESTS=OFF ..
buildenv make -j$(nproc)
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_TESTS=OFF ..
buildenv make -j$(sysctl -n hw.ncpu)
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
# xcodebuild -project sfizz.xcodeproj -alltargets -configuration Debug build
fi