mirror of
https://github.com/kyleneideck/BackgroundMusic
synced 2024-11-22 12:13:03 +00:00
124 lines
5.7 KiB
YAML
124 lines
5.7 KiB
YAML
language: objective-c
|
|
matrix:
|
|
include:
|
|
- os: osx
|
|
osx_image: xcode11
|
|
xcode_sdk: macosx10.14
|
|
sudo: required
|
|
env: DEPLOY=true
|
|
- os: osx
|
|
osx_image: xcode10.1
|
|
xcode_sdk: macosx10.14
|
|
sudo: required
|
|
- os: osx
|
|
osx_image: xcode10
|
|
xcode_sdk: macosx10.14
|
|
sudo: required
|
|
- os: osx
|
|
osx_image: xcode9.4
|
|
xcode_sdk: macosx10.13
|
|
sudo: required
|
|
- os: osx
|
|
osx_image: xcode9.3
|
|
xcode_sdk: macosx10.13
|
|
sudo: required
|
|
- os: osx
|
|
osx_image: xcode9.2
|
|
xcode_sdk: macosx10.13
|
|
sudo: required
|
|
# Fails to compile in 8.3, but it isn't clear from the logs why it fails.
|
|
# - os: osx
|
|
# osx_image: xcode8.3
|
|
# xcode_sdk: macosx10.12
|
|
# sudo: required
|
|
- os: osx
|
|
osx_image: xcode7.3
|
|
xcode_sdk: macosx10.11
|
|
sudo: required
|
|
env: PACKAGE=false
|
|
# branches:
|
|
# only:
|
|
# - master
|
|
install:
|
|
# Install Apple's NullAudio device. Travis' VMs don't have any audio devices installed.
|
|
- sudo xcodebuild -project BGMApp/BGMAppTests/NullAudio/AudioDriverExamples.xcodeproj -target NullAudio DSTROOT="/" install
|
|
- sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod || sudo killall coreaudiod
|
|
script:
|
|
# Build in a case-sensitive disk image to catch failures that only happen on case-sensitive filesystems.
|
|
- hdiutil create -type SPARSEBUNDLE -fs 'Case-sensitive Journaled HFS+' -volname bgmbuild -nospotlight -verbose -attach -size 100m bgmbuild.dmg
|
|
- sudo cp -r . /Volumes/bgmbuild
|
|
- cd /Volumes/bgmbuild
|
|
# Install Background Music.
|
|
- yes | ./build_and_install.sh
|
|
# Print the log file, but put it in a fold because it's so long.
|
|
- echo -en 'build_and_install.log\ntravis_fold:start:build.log\\r'
|
|
- cat build_and_install.log
|
|
- echo -en 'travis_fold:end:build.log\\r'
|
|
- find */build/Release/*/ -type f -exec md5 {} \;
|
|
# Log the installed audio devices...
|
|
- system_profiler SPAudioDataType
|
|
# ...and their IDs.
|
|
- say -a '?'
|
|
# Check the BGM dirs and files were installed. (These fail if the dir/file isn't found.)
|
|
- ls -la "/Applications/Background Music.app"
|
|
- ls -la "/Library/Audio/Plug-Ins/HAL/Background Music Device.driver"
|
|
- ls -la "/usr/local/libexec/BGMXPCHelper.xpc" || ls -la "/Library/Application Support/Background Music/BGMXPCHelper.xpc"
|
|
- ls -la "/Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist"
|
|
# Close BGMApp (which the install script opened).
|
|
#
|
|
# The killall fallback command is necessary because the AppleScript gets "user canceled" on Travis'
|
|
# Xcode 9 images for some reason.
|
|
- osascript -e 'tell application "Background Music" to quit' || killall "Background Music"
|
|
# Skip the UI tests until Travis has support for them.
|
|
- BGMApp/BGMAppTests/UITests/travis-skip.py
|
|
# Run the tests.
|
|
# The echo commands put the output into a fold in the Travis logs.
|
|
- echo -en 'Unit Tests\ntravis_fold:start:tests\\r'
|
|
- xcodebuild -workspace BGM.xcworkspace -scheme 'Background Music Device' test
|
|
- xcodebuild -workspace BGM.xcworkspace -scheme 'Background Music' test
|
|
- xcodebuild -workspace BGM.xcworkspace -scheme 'BGMXPCHelper' test
|
|
- echo -en 'travis_fold:end:tests\\r'
|
|
# Uninstall Background Music.
|
|
- yes | ./uninstall.sh
|
|
# Check the BGM dirs and files were removed.
|
|
- if ls -la "/Applications/Background Music.app"; then false; fi
|
|
- if ls -la "/Library/Audio/Plug-Ins/HAL/Background Music Device.driver"; then false; fi
|
|
- if ls -la "/usr/local/libexec/BGMXPCHelper.xpc"; then false; fi
|
|
- if ls -la "/Library/Application Support/Background Music/BGMXPCHelper.xpc"; then false; fi
|
|
- if ls -la "/Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist"; then false; fi
|
|
# Return early if we're not testing packaging on this OS X version.
|
|
- if [[ "$PACKAGE" == "false" ]]; then exit 0; fi
|
|
# Build the .pkg installer. Print the build logs if it fails. If this build is for a tag with
|
|
# "DEBUG" in its name, build a debug package. (More detailed logging, no optimization, etc.)
|
|
- if [[ "$TRAVIS_TAG" =~ .*DEBUG.* ]]; then
|
|
./package.sh -d || (cat build_and_install.log && travis_terminate 1);
|
|
else
|
|
./package.sh || (cat build_and_install.log && travis_terminate 1);
|
|
fi
|
|
# Install the .pkg.
|
|
- sudo installer -pkg Background-Music-*/BackgroundMusic-*.pkg -target / -verbose -dumplog
|
|
# Check the BGM dirs and files were installed again.
|
|
- ls -la "/Applications/Background Music.app"
|
|
- ls -la "/Library/Audio/Plug-Ins/HAL/Background Music Device.driver"
|
|
- ls -la "/usr/local/libexec/BGMXPCHelper.xpc" || ls -la "/Library/Application Support/Background Music/BGMXPCHelper.xpc"
|
|
- ls -la "/Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist"
|
|
# Post on IRC when Travis builds finish.
|
|
notifications:
|
|
irc: "irc.freenode.org#backgroundmusic"
|
|
# Upload the .pkg and dSYM zip to GitHub.
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: j5GdMTkJI/9lfGMcAW4dnBnfNSW0EUGSuaKSXw49FfjfcshLL2RFxIbQkyA7QqjoJm6ohstU3tOCo7c9FrqIWjE/+5itGJpq7NXDRxFtd2qzcli1u+1IRvQUZJ4VYC9982pSS0IUynK9/f0rhbdkWsCuXWIjoClYPBRscc8soDBJvkDbfilPFfFgkc8TuSmtGDCdu9coGVi6b9HuTLNQU0g5DZkjmv71Vj3SwJ2CmvOk3GFfV1SjvG2SRgBDwyP1g9MRGRiNYkmK9lJRgsq2KLluzb04lt22x8RIcZ+kZYOQVmgDlCeWlOcXi0iz1wU/QzdoYFEAnJdG4q0hqKeqIi+p8Tc31nHPuc1ZlYpifzMQ6KuOoOP19eceJwriAT133t2RSB3Rl3nxh9bymNPNyQ2dJwGNFtO68f3aZsuE5L92lVgW/ipZ6e5Sw1ovXldR04mxNtyY4WvFXFlkn/776tKV0vgAubsHfceGM/aRoBj+E2gDvqkFqIR8wrZAZEeSM2reMHPMx5ICFppIZ8dCIVjF5bsxZQsbojY+LXV8BUU5kLAou0yD7Q+lHi9r3HYdN90+cC02HKGFYzsIiMAyf4IAngnLhwmmrLOwr3wWdACjYTJhznAZGNJh4lCeB4dx85iyj3EexJ6J/DL1k2+ZNKyMN3+i/215t+AvSsXuw5U=
|
|
file_glob: true
|
|
file: Background-Music-*/*
|
|
skip_cleanup: true
|
|
name: $TRAVIS_TAG
|
|
prerelease: true
|
|
on:
|
|
repo: kyleneideck/BackgroundMusic
|
|
tags: true
|
|
# TODO: Use "condition" to build master and tags?
|
|
condition: $DEPLOY = true
|
|
|
|
|