mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 18:40:36 +00:00
Properly setup Azure Pipelines using current system
Also sets up Azure artifacts (including for PRs) for AppImages
This commit is contained in:
parent
87c8d1800b
commit
0f1fd059fc
@ -31,5 +31,9 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_LLVM_SUBMODULE=OFF -DUSE_COTIRE=OFF
|
|||||||
ninja; build_status=$?;
|
ninja; build_status=$?;
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
# If it compiled succesfully let's deploy
|
|
||||||
if [ $build_status -eq 0 ] && [ -n "$GITHUB_TOKEN" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then /bin/bash -ex .travis/deploy-linux.bash ; fi
|
# If it compiled succesfully let's deploy depending on the build pipeline (Travis, Azure Pipelines)
|
||||||
|
# BUILD_REASON is an Azure Pipeline variable, and we want to deploy when using Azure Pipelines
|
||||||
|
if [[ $build_status -eq 0 && ( -n "$BUILD_REASON" || ( "$TRAVIS_BRANCH" = "master" && "$TRAVIS_PULL_REQUEST" = false ) ) ]]; then
|
||||||
|
/bin/bash -ex .travis/deploy-linux.bash
|
||||||
|
fi
|
||||||
|
@ -36,18 +36,30 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
|||||||
COMM_COUNT="$(git rev-list --count HEAD)"
|
COMM_COUNT="$(git rev-list --count HEAD)"
|
||||||
curl -sLO https://github.com/hcorion/uploadtool/raw/master/upload.sh
|
curl -sLO https://github.com/hcorion/uploadtool/raw/master/upload.sh
|
||||||
|
|
||||||
mv ./RPCS3*.AppImage rpcs3-v${COMM_TAG}-${COMM_COUNT}-${TRAVIS_COMMIT:0:8}_linux64.AppImage
|
if [[ -n "$BUILD_SOURCEVERSION" ]]; then
|
||||||
|
COMMIT_HASH=$BUILD_SOURCEVERSION
|
||||||
|
elif [[ -n "$TRAVIS_COMMIT" ]]; then
|
||||||
|
COMMIT_HASH=$TRAVIS_COMMIT
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv ./RPCS3*.AppImage rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMMIT_HASH:0:8}_linux64.AppImage
|
||||||
|
|
||||||
|
# If we're building using Azure Pipelines, let's copy over the AppImage artifact
|
||||||
|
if [[ -n "$BUILD_ARTIFACTSTAGINGDIRECTORY" ]]; then
|
||||||
|
cp ./rpcs3*.AppImage ~/artifacts
|
||||||
|
fi
|
||||||
|
|
||||||
FILESIZE=($(stat -c %s ./rpcs3*.AppImage))
|
FILESIZE=($(stat -c %s ./rpcs3*.AppImage))
|
||||||
SHA256SUM=($(sha256sum ./rpcs3*.AppImage))
|
SHA256SUM=($(sha256sum ./rpcs3*.AppImage))
|
||||||
|
if [ -n "$GITHUB_TOKEN" ]; then
|
||||||
unset TRAVIS_REPO_SLUG
|
unset TRAVIS_REPO_SLUG
|
||||||
REPO_SLUG=RPCS3/rpcs3-binaries-linux \
|
REPO_SLUG=RPCS3/rpcs3-binaries-linux \
|
||||||
UPLOADTOOL_BODY="$SHA256SUM;${FILESIZE}B"\
|
UPLOADTOOL_BODY="$SHA256SUM;${FILESIZE}B"\
|
||||||
RELEASE_NAME=build-${TRAVIS_COMMIT}\
|
RELEASE_NAME=build-${TRAVIS_COMMIT}\
|
||||||
RELEASE_TITLE=${COMM_TAG}-${COMM_COUNT}\
|
RELEASE_TITLE=${COMM_TAG}-${COMM_COUNT}\
|
||||||
REPO_COMMIT=d812f1254a1157c80fd402f94446310560f54e5f\
|
REPO_COMMIT=d812f1254a1157c80fd402f94446310560f54e5f\
|
||||||
bash upload.sh rpcs3*.AppImage
|
bash upload.sh rpcs3*.AppImage
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$DEPLOY_PPA" = "true" ]; then
|
if [ "$DEPLOY_PPA" = "true" ]; then
|
||||||
export DEBFULLNAME="RPCS3 Build Bot"
|
export DEBFULLNAME="RPCS3 Build Bot"
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
TRAVIS_PULL_REQUEST
|
TRAVIS_PULL_REQUEST
|
||||||
TRAVIS_BRANCH
|
TRAVIS_BRANCH
|
||||||
TRAVIS_COMMIT
|
TRAVIS_COMMIT
|
||||||
|
# Variables set by Azure Pipelines
|
||||||
|
BUILD_REASON
|
||||||
|
BUILD_SOURCEVERSION
|
||||||
|
BUILD_ARTIFACTSTAGINGDIRECTORY
|
||||||
# Variables for Travis build matrix
|
# Variables for Travis build matrix
|
||||||
COMPILER
|
COMPILER
|
||||||
DEPLOY_APPIMAGE
|
DEPLOY_APPIMAGE
|
||||||
|
@ -1,41 +1,40 @@
|
|||||||
variables:
|
|
||||||
COMPILER: clang
|
|
||||||
CCACHE_DIR: $(Pipeline.Workspace)/ccache
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- master
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
exclude:
|
||||||
|
- '*'
|
||||||
|
jobs:
|
||||||
|
- job: Linux_Build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
Clang:
|
||||||
|
COMPILER: clang
|
||||||
|
GCC:
|
||||||
|
COMPILER: gcc
|
||||||
|
DEPLOY_APPIMAGE: true
|
||||||
|
variables:
|
||||||
|
COMPILER: clang
|
||||||
|
CCACHE_DIR: $(Pipeline.Workspace)/ccache
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- task: Cache@0
|
||||||
|
inputs:
|
||||||
|
key: ccache | $(Agent.OS) | $(COMPILER)
|
||||||
|
path: $(CCACHE_DIR)
|
||||||
|
displayName: Ccache
|
||||||
|
|
||||||
pool:
|
- bash: |
|
||||||
vmImage: 'ubuntu-latest'
|
docker pull --quiet rpcs3/rpcs3-travis-xenial:1.2
|
||||||
|
docker run \
|
||||||
|
-v $(pwd):/rpcs3 \
|
||||||
|
--env-file .travis/travis.env \
|
||||||
|
-v $CCACHE_DIR:/root/.ccache \
|
||||||
|
-v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
|
||||||
|
rpcs3/rpcs3-travis-xenial:1.2 \
|
||||||
|
/bin/bash -ex /rpcs3/.travis/build-linux.bash
|
||||||
|
displayName: Docker setup and build
|
||||||
|
|
||||||
steps:
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
- bash: |
|
|
||||||
sudo apt-get install ccache -y
|
|
||||||
echo "##vso[task.prependpath]/usr/lib/ccache"
|
|
||||||
displayName: Install ccache and update PATH to use linked versions of gcc, cc, etc
|
|
||||||
|
|
||||||
- task: CacheBeta@0
|
|
||||||
inputs:
|
|
||||||
key: ccache | $(Agent.OS)
|
|
||||||
path: $(CCACHE_DIR)
|
|
||||||
displayName: ccache
|
|
||||||
|
|
||||||
- bash: |
|
|
||||||
docker pull rpcs3/rpcs3-travis-trusty:1.1
|
|
||||||
docker run \
|
|
||||||
-v $(pwd):/rpcs3 \
|
|
||||||
-v $CCACHE_DIR:/root/.ccache \
|
|
||||||
rpcs3/rpcs3-travis-trusty:1.1 \
|
|
||||||
/bin/bash -ex /rpcs3/.travis/build-linux.bash
|
|
||||||
displayName: Fetch and build with Docker
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: '$(Build.SourcesDirectory)'
|
|
||||||
contents: 'build/bin/rpcs3'
|
|
||||||
TargetFolder: '$(Pipeline.Workspace)/artifacts'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: '$(Pipeline.Workspace)/artifacts'
|
|
||||||
artifactName: drop
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user