mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 14:44:25 +01:00
Merge pull request #635 from archshift/builds
CI: upload builds to builds.citra-emu.org instead of MEGA
This commit is contained in:
commit
99fc82b5c0
6
.travis-build.sh
Normal file → Executable file
6
.travis-build.sh
Normal file → Executable file
@ -4,13 +4,13 @@ set -e
|
||||
set -x
|
||||
|
||||
#if OS is linux or is not set
|
||||
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||
mkdir build && cd build
|
||||
cmake -DUSE_QT5=OFF ..
|
||||
make -j4
|
||||
elif [ "$TRAVIS_OS_NAME" = osx ]; then
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
mkdir build && cd build
|
||||
cmake .. -GXcode
|
||||
xcodebuild
|
||||
xcodebuild -configuration Release
|
||||
fi
|
||||
|
4
.travis-deps.sh
Normal file → Executable file
4
.travis-deps.sh
Normal file → Executable file
@ -4,7 +4,7 @@ set -e
|
||||
set -x
|
||||
|
||||
#if OS is linux or is not set
|
||||
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt-get -qq update
|
||||
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
|
||||
sudo mkdir -p /usr/local
|
||||
curl http://www.cmake.org/files/v2.8/cmake-2.8.11-Linux-i386.tar.gz \
|
||||
| sudo tar -xz -C /usr/local --strip-components=1
|
||||
elif [ "$TRAVIS_OS_NAME" = osx ]; then
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
brew tap homebrew/versions
|
||||
brew install qt5 glfw3 pkgconfig
|
||||
fi
|
||||
|
29
.travis-upload.sh
Normal file
29
.travis-upload.sh
Normal file
@ -0,0 +1,29 @@
|
||||
if [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||
GITREV="`git show -s --format='%h'`"
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||
REV_NAME="citra-${GITDATE}-${GITREV}-linux-amd64"
|
||||
UPLOAD_DIR="/citra/nightly/linux-amd64"
|
||||
mkdir "$REV_NAME"
|
||||
|
||||
sudo apt-get -qq install lftp
|
||||
cp build/src/citra/citra "$REV_NAME"
|
||||
cp build/src/citra_qt/citra-qt "$REV_NAME"
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
REV_NAME="citra-${GITDATE}-${GITREV}-osx-amd64"
|
||||
UPLOAD_DIR="/citra/nightly/osx-amd64"
|
||||
mkdir "$REV_NAME"
|
||||
|
||||
brew install lftp
|
||||
cp build/src/citra/Release/citra "$REV_NAME"
|
||||
cp -r build/src/citra_qt/Release/citra-qt.app "$REV_NAME"
|
||||
|
||||
# move qt libs into app bundle for deployment
|
||||
$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app"
|
||||
fi
|
||||
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
tar -cJvf "$ARCHIVE_NAME" "$REV_NAME"
|
||||
lftp -c "open -u citra-builds,$BUILD_PASSWORD sftp://builds.citra-emu.org; put -O '$UPLOAD_DIR' '$ARCHIVE_NAME'"
|
||||
fi
|
@ -4,8 +4,15 @@ os:
|
||||
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "AXHFIafTmbGDsHD3mUVj5a4I397DQjti/WoqAJGUp2PglxTcc04BwxZ9Z+xLuf5N2Hs5r9ojAJLT8OGxJCLBDXzneQTNSqXbFuYSLbqrEAiIRlA9eRIotWCg+wYcO+5e8MKX+cHVKwiIWasUB21AtCdq6msh6Y3pUshZp212VPg="
|
||||
|
||||
before_install:
|
||||
- sh .travis-deps.sh
|
||||
|
||||
script:
|
||||
- sh .travis-build.sh
|
||||
|
||||
after_success:
|
||||
- sh .travis-upload.sh
|
||||
|
39
appveyor.yml
39
appveyor.yml
@ -6,10 +6,8 @@ clone_depth: 5
|
||||
|
||||
environment:
|
||||
QTDIR: C:\Qt\5.4\msvc2013_64_opengl
|
||||
MEGA_EMAIL:
|
||||
secure: rEo9CGAYX87GKTqZCZ9vLCNCNqxO5JLgbERaHF3YJWg=
|
||||
MEGA_PASSWORD:
|
||||
secure: zE1zmgjS/6GfN/19ROl/O0fVR58svORQ5gdtsxI7J8k=
|
||||
BUILD_PASSWORD:
|
||||
secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA=
|
||||
|
||||
platform:
|
||||
- x64
|
||||
@ -27,11 +25,6 @@ before_build:
|
||||
- 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_64_opengl\bin\icudt53.dll build\bin\release
|
||||
- copy C:\Qt\5.4\msvc2013_64_opengl\bin\icuin53.dll build\bin\release
|
||||
@ -42,9 +35,25 @@ after_build:
|
||||
- copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Widgets.dll build\bin\release
|
||||
- mkdir build\bin\release\platforms\
|
||||
- copy C:\Qt\5.4\msvc2013_64_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
|
||||
- npm install sanitize-filename
|
||||
- cd megatools-1.9.94-win64
|
||||
- node ..\upload_to_mega.js
|
||||
|
||||
- ps: >
|
||||
if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master"))
|
||||
{
|
||||
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
||||
$GITREV = git show -s --format='%h'
|
||||
$BUILD_NAME = "citra-${GITDATE}-${GITREV}-windows-amd64.7z"
|
||||
# zip up the build folder
|
||||
7z a $BUILD_NAME .\build\bin\release\*
|
||||
|
||||
# download winscp
|
||||
Invoke-WebRequest "http://hivelocity.dl.sourceforge.net/project/winscp/WinSCP/5.7/winscp570.zip" -OutFile "winscp570.zip"
|
||||
7z e -y winscp570.zip
|
||||
|
||||
# upload to server
|
||||
.\WinSCP.com /command `
|
||||
"option batch abort" `
|
||||
"option confirm off" `
|
||||
"open sftp://citra-builds:${env:BUILD_PASSWORD}@builds.citra-emu.org -hostkey=*" `
|
||||
"put $BUILD_NAME /citra/nightly/windows-amd64/" `
|
||||
"exit"
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
var util = require('util');
|
||||
var exec = require('child_process').exec;
|
||||
var sanitize = require("sanitize-filename");
|
||||
|
||||
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,
|
||||
dstFileName,
|
||||
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) {
|
||||
console.log('stdout: ' + stdout);
|
||||
console.log('stderr: ' + stderr);
|
||||
if (error !== null) {
|
||||
console.log('exec error: ' + error);
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user