2018-09-11 23:32:19 +02:00
|
|
|
sudo: required
|
2018-07-05 17:18:49 +02:00
|
|
|
language: C++
|
2018-09-12 19:42:04 +02:00
|
|
|
os:
|
|
|
|
- linux
|
2019-04-16 23:17:36 +02:00
|
|
|
- osx
|
2018-09-11 23:32:19 +02:00
|
|
|
services:
|
|
|
|
- docker
|
2018-07-05 17:18:49 +02:00
|
|
|
compiler:
|
|
|
|
- gcc
|
|
|
|
- clang
|
2018-09-11 23:32:19 +02:00
|
|
|
|
2018-07-05 17:18:49 +02:00
|
|
|
before_install:
|
2019-06-29 15:57:30 +02:00
|
|
|
- if ! [ "$DEPLOY_KEY_ENC" == "" ]; then
|
|
|
|
echo $DEPLOY_KEY_ENC | base64 --decode | openssl aes-256-cbc -K $encrypted_83a41ac424a6_key -iv $encrypted_83a41ac424a6_iv -out ~/.ssh/id_rsa -d ;
|
|
|
|
chmod 600 ~/.ssh/id_rsa ;
|
|
|
|
fi
|
2019-01-19 00:55:03 +01:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2019-06-29 16:31:47 +02:00
|
|
|
docker build -f Dockerfile -t strawberry-build . || travis_terminate 1;
|
|
|
|
docker run --name build -itd strawberry-build /bin/bash || travis_terminate 1;
|
2019-01-19 00:55:03 +01:00
|
|
|
docker exec build git clone https://github.com/jonaski/strawberry;
|
|
|
|
fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2019-06-29 16:31:47 +02:00
|
|
|
git fetch --unshallow || travis_terminate 1;
|
|
|
|
git pull || travis_terminate 1;
|
|
|
|
brew update || travis_terminate 1;
|
|
|
|
brew unlink python || travis_terminate 1;
|
2019-07-20 15:23:22 +02:00
|
|
|
brew install glib pkgconfig libffi protobuf protobuf-c qt gettext gnutls fftw sqlite chromaprint;
|
2019-06-29 19:18:26 +02:00
|
|
|
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav;
|
|
|
|
brew install libcdio libmtp libimobiledevice libplist;
|
2019-07-17 22:05:41 +02:00
|
|
|
brew install create-dmg;
|
2019-06-29 19:18:26 +02:00
|
|
|
export Qt5_DIR=/usr/local/opt/qt5/lib/cmake;
|
2019-07-17 21:10:17 +02:00
|
|
|
export Qt5LinguistTools_DIR=/usr/local/opt/qt5/lib/cmake/Qt5LinguistTools;
|
2019-06-29 19:18:26 +02:00
|
|
|
export PATH="/usr/local/opt/gettext/bin:$PATH";
|
2019-07-17 21:10:17 +02:00
|
|
|
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig/:$PKG_CONFIG_PATH;
|
2019-01-19 18:00:47 +01:00
|
|
|
ls /usr/local/lib/gstreamer-1.0;
|
2019-07-20 15:23:22 +02:00
|
|
|
ls /usr/local/lib/gio/modules;
|
2019-01-19 00:55:03 +01:00
|
|
|
fi
|
2018-07-05 17:52:32 +02:00
|
|
|
before_script:
|
2019-06-12 06:34:59 +02:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild ; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build; cd build; cmake .. -DUSE_BUNDLE=ON ; fi
|
2018-09-12 20:12:34 +02:00
|
|
|
script:
|
2018-09-12 22:15:19 +02:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi
|
2019-01-19 00:55:03 +01:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2019-06-29 16:31:47 +02:00
|
|
|
make -j8 || travis_terminate 1;
|
2019-07-17 21:10:17 +02:00
|
|
|
make install || travis_terminate 1;
|
2019-07-20 15:23:22 +02:00
|
|
|
sudo make dmg;
|
2019-01-19 00:55:03 +01:00
|
|
|
fi
|
2019-01-03 21:45:27 +01:00
|
|
|
after_success:
|
2019-07-20 15:23:22 +02:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ls -lh strawberry*.dmg; fi
|
2019-07-18 23:55:30 +02:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CC_FOR_BUILD" == "gcc" ]] && [ -f ~/.ssh/id_rsa ]; then
|
2019-07-20 15:23:22 +02:00
|
|
|
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
2019-07-18 23:55:30 +02:00
|
|
|
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos;
|
2019-07-20 15:23:22 +02:00
|
|
|
elif [[ "$TRAVIS_BRANCH" == "macos" ]]; then
|
|
|
|
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos-test;
|
2019-07-18 23:55:30 +02:00
|
|
|
fi
|
2019-07-18 23:09:01 +02:00
|
|
|
fi
|
2019-01-03 21:45:27 +01:00
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- # Do not build tags that we create when we upload to GitHub Releases
|
|
|
|
- /^(?i:continuous)$/
|
|
|
|
|