ANESE/.travis.yml
Daniel Prilik a9f5a4fe4e fix travis
2018-06-28 10:00:20 -07:00

48 lines
1 KiB
YAML

language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
addons:
apt:
packages:
- libsdl2-dev
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
brew install SDL2
fi
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" && "$CXX" == "clang++" ]]
then
brew install gdrive
ARCHIVE="ANESE_macOS_`date +"%Y%m%d"`_`echo $TRAVIS_BRANCH`_`git rev-parse --short HEAD`.zip"
echo "Creating $ARCHIVE"
cd $TRAVIS_BUILD_DIR/bin
cp -R ../roms/demos ./
zip -r $ARCHIVE ANESE.app demos
echo "Starting Google Drive upload"
echo "Uploading commit"
gdrive upload --refresh-token $GDRIVE_REFRESH_TOKEN --parent $GDRIVE_MACOS_FOLDER $ARCHIVE
echo "Updating ANESE_macOS_latest.zip"
mv $ARCHIVE ANESE_macOS_latest.zip
gdrive update --refresh-token $GDRIVE_REFRESH_TOKEN 1wodUcWpAT9q4y12YPZ-QOrbvDUNcnZ2I ANESE_macOS_latest.zip
echo "Finished Google Drive upload"
fi
script:
- mkdir build
- cd build
- cmake ..
- make
- make install