mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 05:36:42 +00:00
Merge pull request #2254 from jroweboy/bintray
Add deploy to bintray for builds to master
This commit is contained in:
commit
bb396ed8fc
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,10 +4,12 @@ doc-build/
|
||||||
|
|
||||||
# Generated source files
|
# Generated source files
|
||||||
src/common/scm_rev.cpp
|
src/common/scm_rev.cpp
|
||||||
|
.travis.descriptor.json
|
||||||
|
|
||||||
# Project/editor files
|
# Project/editor files
|
||||||
*.swp
|
*.swp
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# *nix related
|
# *nix related
|
||||||
# Common convention for backup or temporary files
|
# Common convention for backup or temporary files
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
if [ "$TRAVIS_EVENT_TYPE" = "push" ]&&[ "$TRAVIS_BRANCH" = "master" ]; then
|
if [ "$TRAVIS_EVENT_TYPE" = "push" ]&&[ "$TRAVIS_BRANCH" = "master" ]; then
|
||||||
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||||
GITREV="`git show -s --format='%h'`"
|
GITREV="`git show -s --format='%h'`"
|
||||||
|
mkdir -p artifacts
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||||
REV_NAME="citra-${GITDATE}-${GITREV}-linux-amd64"
|
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
||||||
UPLOAD_DIR="/citra/nightly/linux-amd64"
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/src/citra/citra "$REV_NAME"
|
cp build/src/citra/citra "$REV_NAME"
|
||||||
cp build/src/citra_qt/citra-qt "$REV_NAME"
|
cp build/src/citra_qt/citra-qt "$REV_NAME"
|
||||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
REV_NAME="citra-${GITDATE}-${GITREV}-osx-amd64"
|
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
||||||
UPLOAD_DIR="/citra/nightly/osx-amd64"
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/src/citra/Release/citra "$REV_NAME"
|
cp build/src/citra/Release/citra "$REV_NAME"
|
||||||
|
@ -121,4 +120,7 @@ EOL
|
||||||
|
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||||
tar -cJvf "$ARCHIVE_NAME" "$REV_NAME"
|
tar -cJvf "$ARCHIVE_NAME" "$REV_NAME"
|
||||||
|
|
||||||
|
# move the compiled archive into the artifacts directory to be uploaded by travis releases
|
||||||
|
mv "$ARCHIVE_NAME" artifacts/
|
||||||
fi
|
fi
|
||||||
|
|
23
.travis.descriptor.json.in
Normal file
23
.travis.descriptor.json.in
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"package": {
|
||||||
|
"name": "nightly",
|
||||||
|
"repo": "citra",
|
||||||
|
"subject": "citra-emu",
|
||||||
|
"desc": "Build created on @BUILD_DATE@",
|
||||||
|
"website_url": "www.citra-emu.org",
|
||||||
|
"public_download_numbers": false,
|
||||||
|
"public_stats": false
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"name": "nightly-@GIT_REV@",
|
||||||
|
"released": "@BUILD_DATE@",
|
||||||
|
"gpgSign": false
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"includePattern": "artifacts/(.*\\.tar.xz)",
|
||||||
|
"uploadPattern": "$1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"publish": true
|
||||||
|
}
|
20
.travis.yml
20
.travis.yml
|
@ -1,5 +1,4 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
|
@ -9,10 +8,6 @@ matrix:
|
||||||
sudo: false
|
sudo: false
|
||||||
osx_image: xcode7.3
|
osx_image: xcode7.3
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: "AXHFIafTmbGDsHD3mUVj5a4I397DQjti/WoqAJGUp2PglxTcc04BwxZ9Z+xLuf5N2Hs5r9ojAJLT8OGxJCLBDXzneQTNSqXbFuYSLbqrEAiIRlA9eRIotWCg+wYcO+5e8MKX+cHVKwiIWasUB21AtCdq6msh6Y3pUshZp212VPg="
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -27,8 +22,15 @@ addons:
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.local
|
- "$HOME/.local"
|
||||||
|
|
||||||
install: ./.travis-deps.sh
|
install: "./.travis-deps.sh"
|
||||||
script: ./.travis-build.sh
|
script: "./.travis-build.sh"
|
||||||
after_success: ./.travis-upload.sh
|
after_success: "./.travis-upload.sh"
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: bintray
|
||||||
|
file: "${HOME}/build/${TRAVIS_REPO_SLUG}/.travis.descriptor.json"
|
||||||
|
user: citra-emu
|
||||||
|
key:
|
||||||
|
secure: "MADIMRKlcr+O2iCmavkbIvUWexopOhnzXuDHKXfGyGY93Im8NCTrbb3tDoLH+bRYQrjNCeaV36ffhpDULU+eH11L4yF5/KY4modEKW4sq3cnAJkm5DUOc/sujlRCwzfjg6NFZGhjxfSlt0ltKRdCKEB/j1vR2GD7d/eQ4diJukQ="
|
|
@ -253,6 +253,11 @@ get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
||||||
git_describe(GIT_DESC --always --long --dirty)
|
git_describe(GIT_DESC --always --long --dirty)
|
||||||
git_branch_name(GIT_BRANCH)
|
git_branch_name(GIT_BRANCH)
|
||||||
|
|
||||||
|
# configure the bintray travis release json
|
||||||
|
string(TIMESTAMP BUILD_DATE "%Y-%m-%d")
|
||||||
|
configure_file("${CMAKE_SOURCE_DIR}/.travis.descriptor.json.in" "${CMAKE_SOURCE_DIR}/.travis.descriptor.json" @ONLY)
|
||||||
|
unset(BUILD_DATE)
|
||||||
|
|
||||||
set(INI_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/inih")
|
set(INI_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/inih")
|
||||||
include_directories(${INI_PREFIX})
|
include_directories(${INI_PREFIX})
|
||||||
add_subdirectory(${INI_PREFIX})
|
add_subdirectory(${INI_PREFIX})
|
||||||
|
|
79
appveyor.yml
79
appveyor.yml
|
@ -1,9 +1,8 @@
|
||||||
# shallow clone
|
# shallow clone
|
||||||
clone_depth: 5
|
clone_depth: 10
|
||||||
|
|
||||||
environment:
|
# don't build on tag
|
||||||
BUILD_PASSWORD:
|
skip_tags: true
|
||||||
secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA=
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||||
|
@ -30,42 +29,44 @@ build:
|
||||||
project: build/citra.sln
|
project: build/citra.sln
|
||||||
parallel: true
|
parallel: true
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- ps: |
|
||||||
|
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
||||||
|
$GITREV = $(git show -s --format='%h')
|
||||||
|
# Where are these spaces coming from? Regardless, let's remove them
|
||||||
|
$MSVC_BUILD_NAME = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||||
|
$MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||||
|
$BINTRAY_VERSION = "nightly-$GITREV" -replace " ", ""
|
||||||
|
|
||||||
|
# set the build names as env vars so the artifacts can upload them
|
||||||
|
$env:MSVC_BUILD_NAME = $MSVC_BUILD_NAME
|
||||||
|
$env:MSVC_BUILD_PDB = $MSVC_BUILD_PDB
|
||||||
|
$env:BINTRAY_VERSION = $BINTRAY_VERSION
|
||||||
|
|
||||||
|
7z a -tzip $MSVC_BUILD_PDB .\build\bin\release\*.pdb
|
||||||
|
rm .\build\bin\release\*.pdb
|
||||||
|
7z a -tzip $MSVC_BUILD_NAME .\build\bin\release\* .\license.txt .\README.md
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cd build && ctest -VV -C Release && cd ..
|
- cd build && ctest -VV -C Release && cd ..
|
||||||
|
|
||||||
on_success:
|
artifacts:
|
||||||
# copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder
|
- path: $(MSVC_BUILD_NAME)
|
||||||
- ps: >
|
name: msvcbuild
|
||||||
if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master"))
|
type: zip
|
||||||
{
|
- path: $(MSVC_BUILD_PDB)
|
||||||
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
name: msvcdebug
|
||||||
$GITREV = $(git show -s --format='%h')
|
type: zip
|
||||||
# Where are these spaces coming from? Regardless, let's remove them
|
|
||||||
$BUILD_NAME = "citra-${GITDATE}-${GITREV}-windows-amd64.7z" -replace " ",""
|
|
||||||
$BUILD_NAME_PDB = "citra-${GITDATE}-${GITREV}-windows-amd64-debugsymbols.7z" -replace " ",""
|
|
||||||
$BUILD_NAME_NOQT = "citra-noqt-${GITDATE}-${GITREV}-windows-amd64.7z" -replace " ",""
|
|
||||||
|
|
||||||
# Remove unnecessary files
|
deploy:
|
||||||
rm .\build\bin\release\*tests*
|
- provider: BinTray
|
||||||
|
username: citra-emu
|
||||||
# Put the pdb files in a separate archive and remove them from the main download
|
api_key:
|
||||||
7z a $BUILD_NAME_PDB .\build\bin\release\*.pdb
|
secure: qaZZfXp5Vv9xw5EmCxKLhGnNYhiNMDCdP84l0+h6HetfmvFlvHxyohWEVokLjl7d
|
||||||
rm .\build\bin\release\*.pdb
|
subject: citra-emu
|
||||||
|
repo: citra
|
||||||
# Zip up the build folder and documentation
|
package: nightly
|
||||||
7z a $BUILD_NAME .\build\bin\release\* .\license.txt .\README.md
|
version: $(BINTRAY_VERSION)
|
||||||
# Do a second archive with only the binaries (excludes dlls) and documentation
|
publish: true
|
||||||
7z a $BUILD_NAME_NOQT .\build\bin\release\*.exe .\license.txt .\README.md
|
on:
|
||||||
|
branch: master
|
||||||
|
|
||||||
# Download WinSCP and upload to server
|
|
||||||
choco install winscp.portable
|
|
||||||
WinSCP.exe /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/" `
|
|
||||||
"put $BUILD_NAME_NOQT /citra/nightly/windows-noqt-amd64/" `
|
|
||||||
"put $BUILD_NAME_PDB /citra/nightly/windows-amd64-debugsymbols/" `
|
|
||||||
"exit"
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue