Deploy builds on S3.

This commit is contained in:
Jean-Philip Desjardins 2017-04-08 23:00:08 -04:00
parent 6d4a78b3da
commit e7e9bf739a
8 changed files with 144 additions and 27 deletions

View file

@ -8,6 +8,11 @@ travis_before_install()
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update -qq;
sudo apt-get install -qq qt56base gcc-5 g++-5 cmake libalut-dev;
elif [ "$TARGET_OS" = "OSX" ]; then
sudo npm install -g appdmg
elif [ "$TARGET_OS" = "IOS" ]; then
brew update
brew install dpkg
elif [ "$TARGET_OS" = "Android" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y #is this needed?
sudo apt-get update -y
@ -38,15 +43,19 @@ travis_before_install()
travis_script()
{
if [ "$TARGET_OS" = "Android" ]; then
cd build_android
pushd build_android
chmod 755 gradlew
./gradlew
./gradlew assembleRelease
$ANDROID_HOME/build-tools/24.0.3/zipalign -v -p 4 ./build/outputs/apk/Play-release-unsigned.apk ./build/outputs/apk/Play-release.apk
$ANDROID_HOME/build-tools/24.0.3/apksigner sign --ks ../installer_android/deploy.keystore --ks-key-alias deploy --ks-pass env:ANDROID_KEYSTORE_PASS --key-pass env:ANDROID_KEYSTORE_PASS ./build/outputs/apk/Play-release.apk
popd
else
cd build_cmake
pushd build_cmake
mkdir build
cd build
pushd build
if [ "$TARGET_OS" = "Linux" ]; then
if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
source /opt/qt56/bin/qt56-env.sh || true
@ -55,13 +64,49 @@ travis_script()
elif [ "$TARGET_OS" = "OSX" ]; then
cmake .. -G"$BUILD_TYPE"
cmake --build . --config Release
appdmg ../../installer_macosx/spec.json Play.dmg
elif [ "$TARGET_OS" = "IOS" ]; then
cmake .. -G"$BUILD_TYPE" -DCMAKE_TOOLCHAIN_FILE=../../../Dependencies/cmake-ios/ios.cmake -DTARGET_IOS=ON
cmake --build . --config Release
codesign -s "-" Release-iphoneos/Play.app
pushd ..
pushd ..
pushd installer_ios
./build.sh
popd
popd
popd
fi;
popd
popd
fi;
}
travis_before_deploy()
{
export SHORT_HASH="${TRAVIS_COMMIT:0:8}"
echo $SHORT_HASH
pwd
mkdir deploy
pushd deploy
mkdir $SHORT_HASH
pushd $SHORT_HASH
if [ "$TARGET_OS" = "Android" ]; then
cp ../../build_android/build/outputs/apk/Play-release-unsigned.apk .
cp ../../build_android/build/outputs/apk/Play-release.apk .
fi;
if [ "$TARGET_OS" = "OSX" ]; then
cp ../../build_cmake/build/Play.dmg .
fi;
if [ "$TARGET_OS" = "IOS" ]; then
cp ../../installer_ios/Play.deb .
cp ../../installer_ios/Packages.bz2 .
fi;
popd
popd
}
set -e
set -x

View file

@ -33,8 +33,24 @@ matrix:
language: cpp
deploy:
provider: s3
access_key_id: "AKIAIOZWS66IIMPP53WQ"
secret_access_key:
secure: "c6pP/hDBNXkz8AZH+5EgTXQPUuWSWEB4ukUxzNjgZFEKUFGS2g54HhjHChJU6k/d1R1yMrpm7khfA7vUysAekMt3yydd35jkZOMpKokEQWJQnji/REr9T4795FzWpVoQoZeHERcTkYgfknXg1xcd5XAip+BtVGvgPx9URB5qBk1bPWfTWEqVePOkoQr+nSdTuAUugXePmpTApOHxgJIy2bcjBsb3PF7tJkmlGVnhe/vljIfal1Xj4jaknIAwoXj9FEBvAjMy3ksrPAuXaUnPwfmx2FSp1RO26kR1B5ubRthvsrohQkt2wIg6p8RfdUeWXZH9XABtdBFwEDpNsE4gC9bWtbNLXNlSCRE9ISHa/HvGpQ0aLmv+6CmQP6k2tlGXfZqHGO6mOoGQy7IfJa60Nji6RR6fLyWxlmtfp6zz5X6JtUH873PSsDFEJElAAX9miS3PDFxxH+sf/RsUl9tFCZDYPc7khzw0/wgpx7UApFob3srdndb8t3ECcVwSkZ4f4O7D/i4rphxvG1ThG6Bh6b+PHlB4gxqagmo0YhgIUJOi9HXfJq74JInzICAIJGNA02YAEoxDQtAQ4SJeYF1Y7GJNueJp3SBZfJMW/Tjfoars0WCFGJD9/bREjHxbCJt7wOjqIn6aAzwyRs71ZxCHxnh1/fRUBSOFIj+03j7FYrg="
skip_cleanup: true
local_dir: deploy
bucket: "playbuilds"
region: us-east-2
acl: public_read
on:
all_branches: yes
before_install:
- bash .travis.sh travis_before_install
script:
- bash .travis.sh travis_script
before_deploy:
- bash .travis.sh travis_before_deploy

View file

@ -1,36 +1,73 @@
version: '{build}'
environment:
BUILD_TYPE: Visual Studio 14 2015 Win64
TARGET_OS: WIN32
matrix:
- CONFIG_TYPE: Release
- CONFIG_TYPE: Debug
build_script:
- cmd: >-
git clone -q https://github.com/jpd002/Play-Build.git C:\Projects\Play-Build
set REPO_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,8%
cd C:\Projects\Play-Build
git submodule update -q --init --recursive
git submodule foreach -q "git checkout -q master"
cd Dependencies
git submodule update --init
appveyor SetVariable -Name REPO_COMMIT_SHORT -Value %REPO_COMMIT_SHORT%
cd ..
rename Play PlaySource
mkdir Play
cd Play
git clone -q https://github.com/jpd002/Play-Build.git Play-Build
cd Play-Build
git submodule update -q --init --recursive
git submodule foreach -q "git checkout -q master"
cd Dependencies
git submodule update --init
cd ..
rd /S /Q Play
move C:\Projects\Play Play
move ..\..\PlaySource Play
cd Play\build_cmake
mkdir build
cd build
cmake .. -G"%BUILD_TYPE%"
cmake --build . --config %CONFIG_TYPE%
cd ..
cd ..
"C:\Program Files (x86)\NSIS\makensis.exe" ./installer_win32/installer64.nsi
cd ..
cd ..
mkdir %REPO_COMMIT_SHORT%
move Play-Build\Play\installer_win32\*.exe %REPO_COMMIT_SHORT%
cmake .. -G"%BUILD_TYPE%" -DCMAKE_BUILD_TYPE=%CONFIG_TYPE%
cmake --build . --config %CONFIG_TYPE%
artifacts:
- path: $(REPO_COMMIT_SHORT)\*.exe
name: Binaries
deploy:
- provider: S3
access_key_id: AKIAJGVKEDYESR2BIP7Q
secret_access_key:
secure: JFQy5OF0YXW/H6mcQtfxbd4dAJ+m88p5UwOrazZnfHXecN2M08LklayUlaX/51tI
bucket: playbuilds
region: us-east-2
artifact: Binaries
set_public: true

Binary file not shown.

View file

@ -0,0 +1,11 @@
Package: com.virtualapplications.play
Name: Play!
Version: 0.30-20170123
Architecture: iphoneos-arm
Description: PlayStation2 Emulator
Homepage: http://purei.org/
Depiction: http://purei.org/index.php
Icon: file:///Applications/Play!.app/icon@2x.png
Maintainer: Jean-Philip Desjardins <jpd002@gmail.com>
Author: Jean-Philip Desjardins <jpd002@gmail.com>
Section: Games

8
installer_ios/build.sh Normal file
View file

@ -0,0 +1,8 @@
#/bin/bash
set -e
mkdir -p Play/Applications/Play.app
rsync -a ../build_cmake/build/Release-iphoneos/Play.app/* Play/Applications/Play.app
chmod -R 775 Play
dpkg-deb -Zgzip -b Play
dpkg-scanpackages -m . /dev/null > Packages
bzip2 Packages

View file

@ -4,7 +4,7 @@
"icon-size": 80,
"contents":
[
{ "x": 160, "y": 300, "type": "file", "path": "../build_macosx/build/Release/Play!.app" },
{ "x": 160, "y": 300, "type": "file", "path": "../build_cmake/build/Release/Play.app" },
{ "x": 480, "y": 300, "type": "link", "path": "/Applications" }
]
}

View file

@ -63,7 +63,7 @@ Section "Play! (required)"
SetOutPath $INSTDIR
; Put file there
File "..\build_win32\x64\Play\Release\Play.exe"
File "..\build_cmake\build\Release\Play.exe"
File "..\Readme.html"
File "..\Changelog.html"
File "..\Patches.xml"