Fixed emscripten memory and updated python upload script to include cmake branch
This commit is contained in:
31
.travis.yml
31
.travis.yml
@@ -37,12 +37,10 @@ before_install:
|
||||
sudo apt-get -qq update &&
|
||||
sudo apt-get -qq install g++-4.8 &&
|
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 &&
|
||||
sudo apt-get -qq install cmake &&
|
||||
sudo apt-get install -qq qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev pulseaudio libpulse-dev;
|
||||
sudo apt-get -qq install cmake;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew update &&
|
||||
brew install qt5 &&
|
||||
brew install dpkg &&
|
||||
curl -s -f -L https://raw.github.com/r-plus/dotfiles/master/install_theos.sh | bash &&
|
||||
pwd &&
|
||||
@@ -62,7 +60,12 @@ before_install:
|
||||
wget https://bitbucket.org/ewing/sdl_androidcmake/get/4e9e88c03f04.zip -nv;
|
||||
fi
|
||||
# Building for Qt here
|
||||
- if [ "$BUILD_TYPE" == "Qt" ]; then
|
||||
- if [ "$BUILD_TYPE" == "Qt" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew install qt5 &&
|
||||
export QMAKE="qmake -qt=qt5";
|
||||
fi
|
||||
- if [ "$BUILD_TYPE" == "Qt" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
sudo apt-get install -qq qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev pulseaudio libpulse-dev &&
|
||||
export QMAKE="qmake -qt=qt5";
|
||||
fi
|
||||
# Building for SDL here
|
||||
@@ -101,7 +104,19 @@ env:
|
||||
script: "tools/travis-script.sh"
|
||||
|
||||
after_success:
|
||||
- coveralls -b . -e JGE/src -e JGE/include -i projects/mtg/include -i projects/mtg/src --gcov-options '\-lp'
|
||||
- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH
|
||||
- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/Android/bin/Wagic-debug.apk -r Wagic-android.apk -b $TRAVIS_BRANCH
|
||||
- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/psprelease.zip -r Wagic-psp.zip -b $TRAVIS_BRANCH
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "Qt" ]; then
|
||||
coveralls -b . -e JGE/src -e JGE/include -i projects/mtg/include -i projects/mtg/src --gcov-options '\-lp';
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "ANDROID" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l core.zip -r Wagic-core.zip -b $TRAVIS_BRANCH &&
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_android/bin/Wagic-debug.apk -r Wagic-android.apk -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BUILD_TYPE" == "PSP" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_psp/psprelease.zip -r Wagic-psp.zip -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$BUILD_TYPE" == "iOS" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l net.wagic_0.19.2-1_iphoneos-arm.deb -r Wagic-iOS.deb -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$BUILD_TYPE" == "Qt" ]; then
|
||||
python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l build_qt_widget/wagic.dmg -r Wagic-macosx.dmg -b $TRAVIS_BRANCH;
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s USE_ZLIB=1 -s FULL_ES2=1 -std=c++11 -O0 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s USE_ZLIB=1 -s FULL_ES2=1 -std=c++11 -s TOTAL_MEMORY=200000000 -O0 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
#set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s FULL_ES2=1 -std=c++11 -g4 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../../../projects/mtg/bin/Res@/")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
add_definitions(-DLINUX)
|
||||
|
||||
@@ -5,24 +5,24 @@ from pyjavaproperties import Properties
|
||||
from optparse import OptionParser
|
||||
from github3 import login
|
||||
|
||||
def checkRelease(repository, remote):
|
||||
def checkRelease(repository, remote, branch):
|
||||
release = None
|
||||
for r in repository.iter_releases():
|
||||
if r.name == 'latest-master' :
|
||||
if r.name == ('latest-' + branch) :
|
||||
release = r
|
||||
for a in r.assets :
|
||||
if a.name == remote :
|
||||
# need to delete the old release
|
||||
r.delete()
|
||||
# need also to delete the tag (reference)
|
||||
ref = repository.ref('tags/latest-master')
|
||||
ref = repository.ref('tags/latest-' + branch)
|
||||
ref.delete()
|
||||
release = None
|
||||
|
||||
if release is None:
|
||||
# now, we recreate a new one
|
||||
release = repository.create_release('latest-master', 'master', 'latest-master',
|
||||
'Latest successful builds of the master branch automatically uploaded by Travis or AppVeyor CI.',
|
||||
release = repository.create_release('latest-' + branch, branch, 'latest-' + branch,
|
||||
'Latest successful builds of the ' + branch + ' branch automatically uploaded by Travis or AppVeyor CI.',
|
||||
False,
|
||||
True)
|
||||
|
||||
@@ -49,14 +49,18 @@ def main():
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if (options.token and options.sha and options.local and options.remote and (options.branch == 'master' or options.branch == 'travis_mac_osx')):
|
||||
if (options.token and options.sha and options.local and options.remote and (options.branch == 'master' or options.branch == 'travis_mac_osx' or options.branch == 'cmake' )):
|
||||
gh = login(token = options.token)
|
||||
else:
|
||||
parser.print_help()
|
||||
return
|
||||
|
||||
repository = gh.repository('WagicProject', 'wagic')
|
||||
r = checkRelease(repository, options.remote)
|
||||
if(options.branch == 'master' or options.branch == 'travis_mac_osx'):
|
||||
r = checkRelease(repository, options.remote, 'master')
|
||||
else:
|
||||
r = checkRelease(repository, options.remote, 'cmake')
|
||||
|
||||
filename = options.remote
|
||||
with open(options.local, 'rb') as fd:
|
||||
asset = r.upload_asset('application/zip', filename , fd)
|
||||
|
||||
Reference in New Issue
Block a user