mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
Move binary release deployment from Azure to Cirrus
This commit is contained in:
parent
60cbd7a88c
commit
5684b5909f
@ -20,50 +20,23 @@ git submodule update --init --recursive --depth 1
|
|||||||
ln -s "$VULKAN_SDK/lib/libMoltenVK.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
|
ln -s "$VULKAN_SDK/lib/libMoltenVK.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
|
||||||
sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c
|
sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c
|
||||||
|
|
||||||
cd ..
|
|
||||||
mkdir build && cd build || exit 1
|
mkdir build && cd build || exit 1
|
||||||
cmake -DUSE_DISCORD_RPC=OFF -DUSE_VULKAN=ON -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON \
|
|
||||||
-G Ninja -DLLVM_CCACHE_BUILD=OFF -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF \
|
|
||||||
-DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF \
|
|
||||||
-DLLVM_INCLUDE_UTILS=OFF -DLLVM_USE_PERF=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF \
|
|
||||||
-DCMAKE_CXX_STANDARD=20 -DUSE_NATIVE_INSTRUCTIONS=OFF \
|
|
||||||
../cirrus-ci-build/
|
|
||||||
ninja
|
|
||||||
|
|
||||||
cd ../cirrus-ci-build/
|
cmake .. \
|
||||||
COMM_TAG="$(grep 'version{.*}' rpcs3/rpcs3_version.cpp | awk -F[\{,] '{printf "%d.%d.%d", $2, $3, $4}')"
|
-DUSE_DISCORD_RPC=OFF -DUSE_VULKAN=ON -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON \
|
||||||
COMM_COUNT="$(git rev-list --count HEAD)"
|
-DLLVM_CCACHE_BUILD=OFF -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF \
|
||||||
COMM_HASH="$(git rev-parse --short=8 HEAD)"
|
-DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF \
|
||||||
cd ../build/bin
|
-DLLVM_INCLUDE_UTILS=OFF -DLLVM_USE_PERF=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF \
|
||||||
|
-DUSE_NATIVE_INSTRUCTIONS=OFF \
|
||||||
|
-G Ninja
|
||||||
|
|
||||||
mkdir "rpcs3.app/Contents/lib/"
|
ninja; build_status=$?;
|
||||||
cp "/usr/local/opt/llvm/lib/libc++abi.1.0.dylib" "rpcs3.app/Contents/lib/libc++abi.1.dylib"
|
|
||||||
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
|
||||||
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
|
|
||||||
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
|
|
||||||
"rpcs3.app/Contents/Frameworks/QtQuick.framework" \
|
|
||||||
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
|
|
||||||
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
|
|
||||||
"rpcs3.app/Contents/Plugins/virtualkeyboard"
|
|
||||||
|
|
||||||
mv rpcs3.app RPCS3_.app
|
cd ..
|
||||||
mv RPCS3_.app RPCS3.app
|
|
||||||
|
|
||||||
echo "[InternetShortcut]" > Quickstart.url
|
{ [ "$CI_HAS_ARTIFACTS" = "true" ];
|
||||||
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
|
} && SHOULD_DEPLOY="true" || SHOULD_DEPLOY="false"
|
||||||
echo "IconIndex=0" >> Quickstart.url
|
|
||||||
|
|
||||||
create-dmg --volname RPCS3 \
|
if [ "$build_status" -eq 0 ] && [ "$SHOULD_DEPLOY" = "true" ]; then
|
||||||
--window-size 800 400 \
|
.ci/deploy-mac.sh
|
||||||
--icon-size 100 \
|
fi
|
||||||
--icon rpcs3.app 200 190 \
|
|
||||||
--add-file Quickstart.url Quickstart.url 400 20 \
|
|
||||||
--hide-extension rpcs3.app \
|
|
||||||
--hide-extension Quickstart.url \
|
|
||||||
--app-drop-link 600 185 \
|
|
||||||
--skip-jenkins \
|
|
||||||
"$ARTDIR/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.dmg" \
|
|
||||||
RPCS3.app
|
|
||||||
|
|
||||||
7z a -mx9 rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z RPCS3.app
|
|
||||||
mv rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z "$ARTDIR"
|
|
@ -42,7 +42,7 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
|||||||
|
|
||||||
ls
|
ls
|
||||||
|
|
||||||
COMM_TAG="$(grep 'version{.*}' ../rpcs3/rpcs3_version.cpp | awk -F[\{,] '{printf "%d.%d.%d", $2, $3, $4}')"
|
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp)
|
||||||
COMM_COUNT="$(git rev-list --count HEAD)"
|
COMM_COUNT="$(git rev-list --count HEAD)"
|
||||||
COMM_HASH="$(git rev-parse --short=8 HEAD)"
|
COMM_HASH="$(git rev-parse --short=8 HEAD)"
|
||||||
RPCS3_APPIMAGE="rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_linux64.AppImage"
|
RPCS3_APPIMAGE="rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_linux64.AppImage"
|
||||||
|
56
.ci/deploy-mac.sh
Executable file
56
.ci/deploy-mac.sh
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
cd build || exit 1
|
||||||
|
|
||||||
|
# Gather explicit version number and number of commits
|
||||||
|
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp)
|
||||||
|
COMM_COUNT=$(git rev-list --count HEAD)
|
||||||
|
COMM_HASH=$(git rev-parse --short=8 HEAD)
|
||||||
|
|
||||||
|
AVVER="${COMM_TAG}-${COMM_COUNT}"
|
||||||
|
|
||||||
|
# AVVER is used for GitHub releases, it is the version number.
|
||||||
|
echo "AVVER=$AVVER" >> ../.ci/ci-vars.env
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
mkdir "rpcs3.app/Contents/lib/"
|
||||||
|
cp "/usr/local/opt/llvm/lib/libc++abi.1.0.dylib" "rpcs3.app/Contents/lib/libc++abi.1.dylib"
|
||||||
|
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
||||||
|
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
|
||||||
|
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
|
||||||
|
"rpcs3.app/Contents/Frameworks/QtQuick.framework" \
|
||||||
|
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
|
||||||
|
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
|
||||||
|
"rpcs3.app/Contents/Plugins/virtualkeyboard"
|
||||||
|
|
||||||
|
# Need to do this rename hack due to case insensitive filesystem
|
||||||
|
mv rpcs3.app RPCS3_.app
|
||||||
|
mv RPCS3_.app RPCS3.app
|
||||||
|
|
||||||
|
echo "[InternetShortcut]" > Quickstart.url
|
||||||
|
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
|
||||||
|
echo "IconIndex=0" >> Quickstart.url
|
||||||
|
|
||||||
|
DMG_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.dmg"
|
||||||
|
|
||||||
|
create-dmg --volname RPCS3 \
|
||||||
|
--window-size 800 400 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon rpcs3.app 200 190 \
|
||||||
|
--add-file Quickstart.url Quickstart.url 400 20 \
|
||||||
|
--hide-extension rpcs3.app \
|
||||||
|
--hide-extension Quickstart.url \
|
||||||
|
--app-drop-link 600 185 \
|
||||||
|
--skip-jenkins \
|
||||||
|
"$DMG_FILEPATH" \
|
||||||
|
RPCS3.app
|
||||||
|
|
||||||
|
7z a -mx9 rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z RPCS3.app
|
||||||
|
|
||||||
|
FILESIZE=$(stat -f %z "$DMG_FILEPATH")
|
||||||
|
SHA256SUM=$(shasum -a 256 "$DMG_FILEPATH" | awk '{ print $1 }')
|
||||||
|
cd ..
|
||||||
|
echo "${SHA256SUM};${FILESIZE}B" > "$RELEASE_MESSAGE"
|
||||||
|
cd bin
|
||||||
|
|
||||||
|
mv ./rpcs3*_macos.7z "$ARTDIR"
|
@ -10,4 +10,4 @@ while IFS='=' read -r key val; do
|
|||||||
# Skip over lines containing comments.
|
# Skip over lines containing comments.
|
||||||
[ "${key##\#*}" ] || continue
|
[ "${key##\#*}" ] || continue
|
||||||
echo "##vso[task.setvariable variable=$key]$val"
|
echo "##vso[task.setvariable variable=$key]$val"
|
||||||
done < ".ci/azure-vars.env"
|
done < ".ci/ci-vars.env"
|
||||||
|
@ -10,4 +10,4 @@ while IFS='=' read -r key val; do
|
|||||||
# Skip over lines containing comments.
|
# Skip over lines containing comments.
|
||||||
[ "${key##\#*}" ] || continue
|
[ "${key##\#*}" ] || continue
|
||||||
export "$key"="$val"
|
export "$key"="$val"
|
||||||
done < ".ci/azure-vars.env"
|
done < ".ci/ci-vars.env"
|
||||||
|
@ -114,6 +114,6 @@ fi
|
|||||||
# BUILD is the name of the release artifact
|
# BUILD is the name of the release artifact
|
||||||
# AVVER is used for GitHub releases, it is the version number.
|
# AVVER is used for GitHub releases, it is the version number.
|
||||||
BRANCH="${REPO_NAME}/${REPO_BRANCH}"
|
BRANCH="${REPO_NAME}/${REPO_BRANCH}"
|
||||||
echo "BRANCH=$BRANCH" > .ci/azure-vars.env
|
echo "BRANCH=$BRANCH" > .ci/ci-vars.env
|
||||||
echo "BUILD=$BUILD" >> .ci/azure-vars.env
|
echo "BUILD=$BUILD" >> .ci/ci-vars.env
|
||||||
echo "AVVER=$AVVER" >> .ci/azure-vars.env
|
echo "AVVER=$AVVER" >> .ci/ci-vars.env
|
||||||
|
37
.cirrus.yml
37
.cirrus.yml
@ -4,7 +4,7 @@ env:
|
|||||||
SYSTEM_PULLREQUEST_SOURCEBRANCH: $CIRRUS_BRANCH
|
SYSTEM_PULLREQUEST_SOURCEBRANCH: $CIRRUS_BRANCH
|
||||||
SYSTEM_PULLREQUEST_PULLREQUESTID: $CIRRUS_PR
|
SYSTEM_PULLREQUEST_PULLREQUESTID: $CIRRUS_PR
|
||||||
BUILD_SOURCEVERSION: $CIRRUS_CHANGE_IN_REPO
|
BUILD_SOURCEVERSION: $CIRRUS_CHANGE_IN_REPO
|
||||||
# RPCS3_TOKEN: ENCRYPTED[13a0f18de9285e6c880e3aecbb54258245a74872af7d0fcb92447fa1200ceb6a4dc8acc880ddbf5e653d46336563ca72] # Replace this when we're using Cirrus for master releases!!
|
RPCS3_TOKEN: ENCRYPTED[!ae41646bdbbd52b490521e11e95583983708ac43befebf6b556767cac37bd8be65fb2a51ef2f215befbd487c24c3e67a!]
|
||||||
|
|
||||||
windows_task:
|
windows_task:
|
||||||
matrix:
|
matrix:
|
||||||
@ -52,11 +52,11 @@ windows_task:
|
|||||||
artifacts:
|
artifacts:
|
||||||
name: Artifact
|
name: Artifact
|
||||||
path: "*.7z*"
|
path: "*.7z*"
|
||||||
# push_script: |
|
push_script: |
|
||||||
# if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ]; then
|
if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ]; then
|
||||||
# source './.ci/export-cirrus-vars.sh'
|
source './.ci/export-cirrus-vars.sh'
|
||||||
# './.ci/github-upload.sh'
|
'./.ci/github-upload.sh'
|
||||||
# fi;
|
fi;
|
||||||
|
|
||||||
linux_task:
|
linux_task:
|
||||||
container:
|
container:
|
||||||
@ -65,6 +65,7 @@ linux_task:
|
|||||||
memory: 16G
|
memory: 16G
|
||||||
env:
|
env:
|
||||||
BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts
|
BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts
|
||||||
|
ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
|
||||||
CCACHE_DIR: "/tmp/ccache_dir"
|
CCACHE_DIR: "/tmp/ccache_dir"
|
||||||
CCACHE_MAXSIZE: 300M
|
CCACHE_MAXSIZE: 300M
|
||||||
CI_HAS_ARTIFACTS: true
|
CI_HAS_ARTIFACTS: true
|
||||||
@ -72,7 +73,6 @@ linux_task:
|
|||||||
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
|
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
|
||||||
DEPLOY_APPIMAGE: true
|
DEPLOY_APPIMAGE: true
|
||||||
APPDIR: "./appdir"
|
APPDIR: "./appdir"
|
||||||
ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
|
|
||||||
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
|
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
|
||||||
ccache_cache:
|
ccache_cache:
|
||||||
folder: "/tmp/ccache_dir"
|
folder: "/tmp/ccache_dir"
|
||||||
@ -92,10 +92,16 @@ linux_task:
|
|||||||
artifacts:
|
artifacts:
|
||||||
name: Artifact
|
name: Artifact
|
||||||
path: "artifacts/*"
|
path: "artifacts/*"
|
||||||
# push_script: |
|
push_script: |
|
||||||
# if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ] && [ "$COMPILER" = "gcc" ]; then
|
if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ] && [ "$COMPILER" = "gcc" ]; then
|
||||||
# '.ci/github-upload.sh'
|
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
|
||||||
# fi;
|
COMM_COUNT=$(git rev-list --count HEAD)
|
||||||
|
COMM_HASH=$(git rev-parse --short=8 HEAD)
|
||||||
|
|
||||||
|
export AVVER="${COMM_TAG}-${COMM_COUNT}"
|
||||||
|
|
||||||
|
.ci/github-upload.sh
|
||||||
|
fi;
|
||||||
|
|
||||||
freebsd_task:
|
freebsd_task:
|
||||||
matrix:
|
matrix:
|
||||||
@ -124,10 +130,19 @@ macos_task:
|
|||||||
- mkdir artifacts
|
- mkdir artifacts
|
||||||
- ".ci/build-mac.sh"
|
- ".ci/build-mac.sh"
|
||||||
env:
|
env:
|
||||||
|
BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts
|
||||||
ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
|
ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
|
||||||
CCACHE_DIR: "/tmp/ccache_dir"
|
CCACHE_DIR: "/tmp/ccache_dir"
|
||||||
CCACHE_MAXSIZE: 300M
|
CCACHE_MAXSIZE: 300M
|
||||||
CI_HAS_ARTIFACTS: true
|
CI_HAS_ARTIFACTS: true
|
||||||
|
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
|
||||||
|
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-mac"
|
||||||
|
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
|
||||||
artifacts:
|
artifacts:
|
||||||
name: Artifact
|
name: Artifact
|
||||||
path: "artifacts/rpcs3-*_macos.*"
|
path: "artifacts/rpcs3-*_macos.*"
|
||||||
|
push_script: |
|
||||||
|
if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ]; then
|
||||||
|
source './.ci/export-cirrus-vars.sh'
|
||||||
|
.ci/github-upload.sh
|
||||||
|
fi;
|
||||||
|
@ -49,11 +49,18 @@ jobs:
|
|||||||
condition: succeeded()
|
condition: succeeded()
|
||||||
artifact: RPCS3 for Linux ($(COMPILER))
|
artifact: RPCS3 for Linux ($(COMPILER))
|
||||||
|
|
||||||
- bash: .ci/github-upload.sh
|
# - bash: |
|
||||||
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'gcc'))
|
# COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
|
||||||
displayName: Push build to GitHub
|
# COMM_COUNT=$(git rev-list --count HEAD)
|
||||||
env:
|
# COMM_HASH=$(git rev-parse --short=8 HEAD)
|
||||||
RPCS3_TOKEN: $(RPCS3-Token)
|
|
||||||
|
# export AVVER="${COMM_TAG}-${COMM_COUNT}"
|
||||||
|
|
||||||
|
# .ci/github-upload.sh
|
||||||
|
# condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'gcc'))
|
||||||
|
# displayName: Push build to GitHub
|
||||||
|
# env:
|
||||||
|
# RPCS3_TOKEN: $(RPCS3-Token)
|
||||||
|
|
||||||
- job: Windows_Build
|
- job: Windows_Build
|
||||||
variables:
|
variables:
|
||||||
@ -114,8 +121,8 @@ jobs:
|
|||||||
condition: succeeded()
|
condition: succeeded()
|
||||||
artifact: RPCS3 for Windows
|
artifact: RPCS3 for Windows
|
||||||
|
|
||||||
- bash: .ci/github-upload.sh
|
# - bash: .ci/github-upload.sh
|
||||||
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
# condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||||||
displayName: Push build to GitHub
|
# displayName: Push build to GitHub
|
||||||
env:
|
# env:
|
||||||
RPCS3_TOKEN: $(RPCS3-Token)
|
# RPCS3_TOKEN: $(RPCS3-Token)
|
||||||
|
Loading…
Reference in New Issue
Block a user