From d7ed08b153ee6f86a640be47050bda7db3257962 Mon Sep 17 00:00:00 2001 From: chinhodado Date: Wed, 14 Jan 2015 20:49:26 -0500 Subject: [PATCH 1/5] AppVeyor: Upload build to Mega upon build completion --- appveyor.yml | 26 ++++++++++++++++++++++++++ upload_to_mega.js | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 upload_to_mega.js diff --git a/appveyor.yml b/appveyor.yml index 83d3b900e..d3fb3fe65 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,8 @@ clone_depth: 1 environment: QTDIR: C:\Qt\5.4\msvc2013_opengl + MEGA_PASSWORD: + secure: ozgp54EZj98kcbD/O+Xl5Q== install: - git submodule update --init --recursive @@ -15,3 +17,27 @@ before_build: - cd build - cmake .. - cd .. + +after_build: + # upload the build to Mega + - cinst wget -x86 + - wget -q http://megatools.megous.com/builds/megatools-1.9.94-win64.zip + # extract megatools silently. See http://stackoverflow.com/a/11629736/1748450 + - 7z x megatools-1.9.94-win64.zip | FIND /V "ing " + # copy the qt dlls + - copy C:\Qt\5.4\msvc2013_opengl\bin\icudt53.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\icuin53.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\icuuc53.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Cored.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Guid.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGLd.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgetsd.dll build\bin\debug + # delete build craps + - del /F /S /Q /A "build\bin\debug\*.ilk" + - del /F /S /Q /A "build\bin\debug\*.pdb" + # zip up the build folder -> build.7z + - 7z a build .\build\bin\debug\* + # rename, upload to Mega + - cd megatools-1.9.94-win64 + - node ..\upload_to_mega.js + diff --git a/upload_to_mega.js b/upload_to_mega.js new file mode 100644 index 000000000..1d47f4fd8 --- /dev/null +++ b/upload_to_mega.js @@ -0,0 +1,25 @@ +var util = require('util'); +var exec = require('child_process').exec; + +var email = 'chin.bimbo@gmail.com'; +var password = process.env.MEGA_PASSWORD; +var sourceFileName = 'build.7z'; +var dstFileName = process.env.APPVEYOR_REPO_COMMIT.substring(0, 8) + " - " + + process.env.APPVEYOR_REPO_COMMIT_MESSAGE.substring(0, 100) + ".7z"; + +var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress', + sourceFileName, + dstFileName, + email, + password); + +if (process.env.APPVEYOR_REPO_BRANCH == "master") { + console.log("Uploading file " + dstFileName + " to Mega..."); + exec(cmd, function(error, stdout, stderr) { + console.log('stdout: ' + stdout); + console.log('stderr: ' + stderr); + if (error !== null) { + console.log('exec error: ' + error); + } + }); +} From 9121a5db1a23b2c8943597f68b282773b5c4070a Mon Sep 17 00:00:00 2001 From: chinhodado Date: Thu, 15 Jan 2015 01:07:18 -0500 Subject: [PATCH 2/5] AppVeyor: Change to release build instead of debug --- appveyor.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d3fb3fe65..8e7bacd6f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,12 @@ environment: QTDIR: C:\Qt\5.4\msvc2013_opengl MEGA_PASSWORD: secure: ozgp54EZj98kcbD/O+Xl5Q== + +platform: + - Win32 + +configuration: + - Release install: - git submodule update --init --recursive @@ -25,18 +31,18 @@ after_build: # extract megatools silently. See http://stackoverflow.com/a/11629736/1748450 - 7z x megatools-1.9.94-win64.zip | FIND /V "ing " # copy the qt dlls - - copy C:\Qt\5.4\msvc2013_opengl\bin\icudt53.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\icuin53.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\icuuc53.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Cored.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Guid.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGLd.dll build\bin\debug - - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgetsd.dll build\bin\debug + - copy C:\Qt\5.4\msvc2013_opengl\bin\icudt53.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\icuin53.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\icuuc53.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Core.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Gui.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGL.dll build\bin\release + - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgets.dll build\bin\release # delete build craps - - del /F /S /Q /A "build\bin\debug\*.ilk" - - del /F /S /Q /A "build\bin\debug\*.pdb" + - del /F /S /Q /A "build\bin\release\*.ilk" + - del /F /S /Q /A "build\bin\release\*.pdb" # zip up the build folder -> build.7z - - 7z a build .\build\bin\debug\* + - 7z a build .\build\bin\release\* # rename, upload to Mega - cd megatools-1.9.94-win64 - node ..\upload_to_mega.js From a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204 Mon Sep 17 00:00:00 2001 From: Chin Date: Sat, 24 Jan 2015 10:45:06 -0500 Subject: [PATCH 3/5] AppVeyor: Sanitize the file name before uploading --- appveyor.yml | 11 +++++------ upload_to_mega.js | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e7bacd6f..7c985b940 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,9 +6,11 @@ clone_depth: 1 environment: QTDIR: C:\Qt\5.4\msvc2013_opengl + MEGA_EMAIL: + secure: dLyH/46MKKuCZyozkwwVGCL7nVyX+Cxyo1hVlCUaQDU= MEGA_PASSWORD: secure: ozgp54EZj98kcbD/O+Xl5Q== - + platform: - Win32 @@ -23,7 +25,7 @@ before_build: - cd build - cmake .. - cd .. - + after_build: # upload the build to Mega - cinst wget -x86 @@ -38,12 +40,9 @@ after_build: - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Gui.dll build\bin\release - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGL.dll build\bin\release - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgets.dll build\bin\release - # delete build craps - - del /F /S /Q /A "build\bin\release\*.ilk" - - del /F /S /Q /A "build\bin\release\*.pdb" # zip up the build folder -> build.7z - 7z a build .\build\bin\release\* # rename, upload to Mega + - npm install sanitize-filename - cd megatools-1.9.94-win64 - node ..\upload_to_mega.js - diff --git a/upload_to_mega.js b/upload_to_mega.js index 1d47f4fd8..c0abd5ed5 100644 --- a/upload_to_mega.js +++ b/upload_to_mega.js @@ -1,11 +1,13 @@ var util = require('util'); var exec = require('child_process').exec; +var sanitize = require("sanitize-filename"); -var email = 'chin.bimbo@gmail.com'; +var email = process.env.MEGA_EMAIL; var password = process.env.MEGA_PASSWORD; var sourceFileName = 'build.7z'; var dstFileName = process.env.APPVEYOR_REPO_COMMIT.substring(0, 8) + " - " + process.env.APPVEYOR_REPO_COMMIT_MESSAGE.substring(0, 100) + ".7z"; +dstFileName = sanitize(dstFileName); var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress', sourceFileName, @@ -13,6 +15,7 @@ var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --usernam email, password); +// only upload build on master branch, and not on other branches or PRs if (process.env.APPVEYOR_REPO_BRANCH == "master") { console.log("Uploading file " + dstFileName + " to Mega..."); exec(cmd, function(error, stdout, stderr) { From 88627fae0cbc3d0f6a5ef47295ff2d89d00a3597 Mon Sep 17 00:00:00 2001 From: Chin Date: Sat, 24 Jan 2015 11:54:03 -0500 Subject: [PATCH 4/5] AppVeyor: Add qwindows.dll to the build --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 7c985b940..7188cd438 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,6 +40,8 @@ after_build: - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Gui.dll build\bin\release - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGL.dll build\bin\release - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgets.dll build\bin\release + - mkdir build\bin\release\platforms\ + - copy C:\Qt\5.4\msvc2013_opengl\plugins\platforms\qwindows.dll build\bin\release\platforms # zip up the build folder -> build.7z - 7z a build .\build\bin\release\* # rename, upload to Mega From cb39f92e6cd594a483631b2e42385902f9571d18 Mon Sep 17 00:00:00 2001 From: Chin Date: Sat, 24 Jan 2015 12:40:26 -0500 Subject: [PATCH 5/5] AppVeyor: Use Citra's Mega account --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7188cd438..06c9a7909 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,9 +7,9 @@ clone_depth: 1 environment: QTDIR: C:\Qt\5.4\msvc2013_opengl MEGA_EMAIL: - secure: dLyH/46MKKuCZyozkwwVGCL7nVyX+Cxyo1hVlCUaQDU= + secure: rEo9CGAYX87GKTqZCZ9vLCNCNqxO5JLgbERaHF3YJWg= MEGA_PASSWORD: - secure: ozgp54EZj98kcbD/O+Xl5Q== + secure: zE1zmgjS/6GfN/19ROl/O0fVR58svORQ5gdtsxI7J8k= platform: - Win32