From 8f9b1d708b077b02514addd68090b3cb53d5dbc0 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 19 Jan 2019 00:55:03 +0100 Subject: [PATCH] Update .travis.yml (#62) --- .travis.yml | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4467b52ed..51b580466 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,30 +12,36 @@ compiler: before_install: - 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 - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -f Dockerfile -t strawberry-build . ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --name build -itd strawberry-build /bin/bash ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build git clone https://github.com/jonaski/strawberry ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git fetch --unshallow ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git pull ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink python ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glib pkgconfig protobuf protobuf-c qt ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sqlite --with-fts ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gstreamer gst-plugins-base ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gst-plugins-good --with-flac ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gst-plugins-bad gst-plugins-ugly gst-libav ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install chromaprint ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libcdio libmtp libimobiledevice libplist ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export Qt5_DIR=/usr/local/opt/qt5/lib/cmake ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + docker build -f Dockerfile -t strawberry-build .; + docker run --name build -itd strawberry-build /bin/bash; + docker exec build git clone https://github.com/jonaski/strawberry; + fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + git fetch --unshallow; + git pull; + brew update; + brew unlink python; + brew install glib pkgconfig protobuf protobuf-c qt; + brew install sqlite --with-fts; + brew install gstreamer gst-plugins-base; + brew install gst-plugins-good --with-flac; + brew install gst-plugins-bad gst-plugins-ugly gst-libav; + brew install chromaprint; + brew install libcdio libmtp libimobiledevice libplist; + export Qt5_DIR=/usr/local/opt/qt5/lib/cmake; + fi before_script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild -DENABLE_STREAM_DEEZER=ON ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build; cd build; cmake .. -DUSE_BUNDLE=ON -DENABLE_STREAM_DEEZER=ON ; fi script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j8 ; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo make install ; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ../dist/macos/macdeploy.py strawberry.app ; fi -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ../dist/macos/create-dmg.sh strawberry.app ; fi +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + make -j8; + sudo make install; + sudo ../dist/macos/macdeploy.py strawberry.app; + ../dist/macos/create-dmg.sh strawberry.app; + fi after_success: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ls -lh strawberry.dmg; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos; fi