diff options
| author | 2015-03-17 21:45:43 -0400 | |
|---|---|---|
| committer | 2015-03-17 21:45:43 -0400 | |
| commit | 99fc82b5c0eaaadb3cc6c495fc04f9641358b11c (patch) | |
| tree | 993071eefc46030a793be382a19fe82fd0aa0e40 | |
| parent | Merge pull request #650 from Subv/scaling (diff) | |
| parent | CI: upload builds to builds.citra-emu.org instead of MEGA (diff) | |
| download | yuzu-99fc82b5c0eaaadb3cc6c495fc04f9641358b11c.tar.gz yuzu-99fc82b5c0eaaadb3cc6c495fc04f9641358b11c.tar.xz yuzu-99fc82b5c0eaaadb3cc6c495fc04f9641358b11c.zip | |
Merge pull request #635 from archshift/builds
CI: upload builds to builds.citra-emu.org instead of MEGA
| -rwxr-xr-x[-rw-r--r--] | .travis-build.sh | 6 | ||||
| -rwxr-xr-x[-rw-r--r--] | .travis-deps.sh | 4 | ||||
| -rw-r--r-- | .travis-upload.sh | 29 | ||||
| -rw-r--r-- | .travis.yml | 7 | ||||
| -rw-r--r-- | appveyor.yml | 39 | ||||
| -rw-r--r-- | upload_to_mega.js | 28 |
6 files changed, 65 insertions, 48 deletions
diff --git a/.travis-build.sh b/.travis-build.sh index b869b8b8f..21582c689 100644..100755 --- a/.travis-build.sh +++ b/.travis-build.sh | |||
| @@ -4,13 +4,13 @@ set -e | |||
| 4 | set -x | 4 | set -x |
| 5 | 5 | ||
| 6 | #if OS is linux or is not set | 6 | #if OS is linux or is not set |
| 7 | if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | 7 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then |
| 8 | mkdir build && cd build | 8 | mkdir build && cd build |
| 9 | cmake -DUSE_QT5=OFF .. | 9 | cmake -DUSE_QT5=OFF .. |
| 10 | make -j4 | 10 | make -j4 |
| 11 | elif [ "$TRAVIS_OS_NAME" = osx ]; then | 11 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 12 | export Qt5_DIR=$(brew --prefix)/opt/qt5 | 12 | export Qt5_DIR=$(brew --prefix)/opt/qt5 |
| 13 | mkdir build && cd build | 13 | mkdir build && cd build |
| 14 | cmake .. -GXcode | 14 | cmake .. -GXcode |
| 15 | xcodebuild | 15 | xcodebuild -configuration Release |
| 16 | fi | 16 | fi |
diff --git a/.travis-deps.sh b/.travis-deps.sh index bd09da0d0..f8074fb91 100644..100755 --- a/.travis-deps.sh +++ b/.travis-deps.sh | |||
| @@ -4,7 +4,7 @@ set -e | |||
| 4 | set -x | 4 | set -x |
| 5 | 5 | ||
| 6 | #if OS is linux or is not set | 6 | #if OS is linux or is not set |
| 7 | if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | 7 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then |
| 8 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | 8 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y |
| 9 | sudo apt-get -qq update | 9 | sudo apt-get -qq update |
| 10 | sudo apt-get -qq install g++-4.9 xorg-dev libglu1-mesa-dev libxcursor-dev | 10 | sudo apt-get -qq install g++-4.9 xorg-dev libglu1-mesa-dev libxcursor-dev |
| @@ -23,7 +23,7 @@ if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | |||
| 23 | sudo mkdir -p /usr/local | 23 | sudo mkdir -p /usr/local |
| 24 | curl http://www.cmake.org/files/v2.8/cmake-2.8.11-Linux-i386.tar.gz \ | 24 | curl http://www.cmake.org/files/v2.8/cmake-2.8.11-Linux-i386.tar.gz \ |
| 25 | | sudo tar -xz -C /usr/local --strip-components=1 | 25 | | sudo tar -xz -C /usr/local --strip-components=1 |
| 26 | elif [ "$TRAVIS_OS_NAME" = osx ]; then | 26 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 27 | brew tap homebrew/versions | 27 | brew tap homebrew/versions |
| 28 | brew install qt5 glfw3 pkgconfig | 28 | brew install qt5 glfw3 pkgconfig |
| 29 | fi | 29 | fi |
diff --git a/.travis-upload.sh b/.travis-upload.sh new file mode 100644 index 000000000..4b9446a96 --- /dev/null +++ b/.travis-upload.sh | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | if [ "$TRAVIS_BRANCH" = "master" ]; then | ||
| 2 | GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" | ||
| 3 | GITREV="`git show -s --format='%h'`" | ||
| 4 | |||
| 5 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then | ||
| 6 | REV_NAME="citra-${GITDATE}-${GITREV}-linux-amd64" | ||
| 7 | UPLOAD_DIR="/citra/nightly/linux-amd64" | ||
| 8 | mkdir "$REV_NAME" | ||
| 9 | |||
| 10 | sudo apt-get -qq install lftp | ||
| 11 | cp build/src/citra/citra "$REV_NAME" | ||
| 12 | cp build/src/citra_qt/citra-qt "$REV_NAME" | ||
| 13 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then | ||
| 14 | REV_NAME="citra-${GITDATE}-${GITREV}-osx-amd64" | ||
| 15 | UPLOAD_DIR="/citra/nightly/osx-amd64" | ||
| 16 | mkdir "$REV_NAME" | ||
| 17 | |||
| 18 | brew install lftp | ||
| 19 | cp build/src/citra/Release/citra "$REV_NAME" | ||
| 20 | cp -r build/src/citra_qt/Release/citra-qt.app "$REV_NAME" | ||
| 21 | |||
| 22 | # move qt libs into app bundle for deployment | ||
| 23 | $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" | ||
| 24 | fi | ||
| 25 | |||
| 26 | ARCHIVE_NAME="${REV_NAME}.tar.xz" | ||
| 27 | tar -cJvf "$ARCHIVE_NAME" "$REV_NAME" | ||
| 28 | lftp -c "open -u citra-builds,$BUILD_PASSWORD sftp://builds.citra-emu.org; put -O '$UPLOAD_DIR' '$ARCHIVE_NAME'" | ||
| 29 | fi | ||
diff --git a/.travis.yml b/.travis.yml index 1cb369d5b..b878cc160 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -4,8 +4,15 @@ os: | |||
| 4 | 4 | ||
| 5 | language: cpp | 5 | language: cpp |
| 6 | 6 | ||
| 7 | env: | ||
| 8 | global: | ||
| 9 | - secure: "AXHFIafTmbGDsHD3mUVj5a4I397DQjti/WoqAJGUp2PglxTcc04BwxZ9Z+xLuf5N2Hs5r9ojAJLT8OGxJCLBDXzneQTNSqXbFuYSLbqrEAiIRlA9eRIotWCg+wYcO+5e8MKX+cHVKwiIWasUB21AtCdq6msh6Y3pUshZp212VPg=" | ||
| 10 | |||
| 7 | before_install: | 11 | before_install: |
| 8 | - sh .travis-deps.sh | 12 | - sh .travis-deps.sh |
| 9 | 13 | ||
| 10 | script: | 14 | script: |
| 11 | - sh .travis-build.sh | 15 | - sh .travis-build.sh |
| 16 | |||
| 17 | after_success: | ||
| 18 | - sh .travis-upload.sh | ||
diff --git a/appveyor.yml b/appveyor.yml index c9edb9e19..ae22101eb 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
| @@ -6,10 +6,8 @@ clone_depth: 5 | |||
| 6 | 6 | ||
| 7 | environment: | 7 | environment: |
| 8 | QTDIR: C:\Qt\5.4\msvc2013_64_opengl | 8 | QTDIR: C:\Qt\5.4\msvc2013_64_opengl |
| 9 | MEGA_EMAIL: | 9 | BUILD_PASSWORD: |
| 10 | secure: rEo9CGAYX87GKTqZCZ9vLCNCNqxO5JLgbERaHF3YJWg= | 10 | secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA= |
| 11 | MEGA_PASSWORD: | ||
| 12 | secure: zE1zmgjS/6GfN/19ROl/O0fVR58svORQ5gdtsxI7J8k= | ||
| 13 | 11 | ||
| 14 | platform: | 12 | platform: |
| 15 | - x64 | 13 | - x64 |
| @@ -27,11 +25,6 @@ before_build: | |||
| 27 | - cd .. | 25 | - cd .. |
| 28 | 26 | ||
| 29 | after_build: | 27 | after_build: |
| 30 | # upload the build to Mega | ||
| 31 | - cinst wget -x86 | ||
| 32 | - wget -q http://megatools.megous.com/builds/megatools-1.9.94-win64.zip | ||
| 33 | # extract megatools silently. See http://stackoverflow.com/a/11629736/1748450 | ||
| 34 | - 7z x megatools-1.9.94-win64.zip | FIND /V "ing " | ||
| 35 | # copy the qt dlls | 28 | # copy the qt dlls |
| 36 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icudt53.dll build\bin\release | 29 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icudt53.dll build\bin\release |
| 37 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icuin53.dll build\bin\release | 30 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icuin53.dll build\bin\release |
| @@ -42,9 +35,25 @@ after_build: | |||
| 42 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Widgets.dll build\bin\release | 35 | - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Widgets.dll build\bin\release |
| 43 | - mkdir build\bin\release\platforms\ | 36 | - mkdir build\bin\release\platforms\ |
| 44 | - copy C:\Qt\5.4\msvc2013_64_opengl\plugins\platforms\qwindows.dll build\bin\release\platforms | 37 | - copy C:\Qt\5.4\msvc2013_64_opengl\plugins\platforms\qwindows.dll build\bin\release\platforms |
| 45 | # zip up the build folder -> build.7z | 38 | |
| 46 | - 7z a build .\build\bin\release\* | 39 | - ps: > |
| 47 | # rename, upload to Mega | 40 | if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master")) |
| 48 | - npm install sanitize-filename | 41 | { |
| 49 | - cd megatools-1.9.94-win64 | 42 | $GITDATE = $(git show -s --date=short --format='%ad') -replace "-","" |
| 50 | - node ..\upload_to_mega.js | 43 | $GITREV = git show -s --format='%h' |
| 44 | $BUILD_NAME = "citra-${GITDATE}-${GITREV}-windows-amd64.7z" | ||
| 45 | # zip up the build folder | ||
| 46 | 7z a $BUILD_NAME .\build\bin\release\* | ||
| 47 | |||
| 48 | # download winscp | ||
| 49 | Invoke-WebRequest "http://hivelocity.dl.sourceforge.net/project/winscp/WinSCP/5.7/winscp570.zip" -OutFile "winscp570.zip" | ||
| 50 | 7z e -y winscp570.zip | ||
| 51 | |||
| 52 | # upload to server | ||
| 53 | .\WinSCP.com /command ` | ||
| 54 | "option batch abort" ` | ||
| 55 | "option confirm off" ` | ||
| 56 | "open sftp://citra-builds:${env:BUILD_PASSWORD}@builds.citra-emu.org -hostkey=*" ` | ||
| 57 | "put $BUILD_NAME /citra/nightly/windows-amd64/" ` | ||
| 58 | "exit" | ||
| 59 | } | ||
diff --git a/upload_to_mega.js b/upload_to_mega.js deleted file mode 100644 index c0abd5ed5..000000000 --- a/upload_to_mega.js +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | var util = require('util'); | ||
| 2 | var exec = require('child_process').exec; | ||
| 3 | var sanitize = require("sanitize-filename"); | ||
| 4 | |||
| 5 | var email = process.env.MEGA_EMAIL; | ||
| 6 | var password = process.env.MEGA_PASSWORD; | ||
| 7 | var sourceFileName = 'build.7z'; | ||
| 8 | var dstFileName = process.env.APPVEYOR_REPO_COMMIT.substring(0, 8) + " - " + | ||
| 9 | process.env.APPVEYOR_REPO_COMMIT_MESSAGE.substring(0, 100) + ".7z"; | ||
| 10 | dstFileName = sanitize(dstFileName); | ||
| 11 | |||
| 12 | var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress', | ||
| 13 | sourceFileName, | ||
| 14 | dstFileName, | ||
| 15 | email, | ||
| 16 | password); | ||
| 17 | |||
| 18 | // only upload build on master branch, and not on other branches or PRs | ||
| 19 | if (process.env.APPVEYOR_REPO_BRANCH == "master") { | ||
| 20 | console.log("Uploading file " + dstFileName + " to Mega..."); | ||
| 21 | exec(cmd, function(error, stdout, stderr) { | ||
| 22 | console.log('stdout: ' + stdout); | ||
| 23 | console.log('stderr: ' + stderr); | ||
| 24 | if (error !== null) { | ||
| 25 | console.log('exec error: ' + error); | ||
| 26 | } | ||
| 27 | }); | ||
| 28 | } | ||