1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 11:43:05 +01:00

Mac build on Azure

This commit is contained in:
Zion Nimchuk 2023-09-19 12:07:13 -07:00 committed by Megamouse
parent cf20526f9f
commit 3c70573be0
4 changed files with 96 additions and 38 deletions

View File

@ -35,9 +35,9 @@ if [ ! -d "/tmp/Qt/$QT_VER" ]; then
cd qt-downloader
git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597
cd "/tmp/Qt"
"/opt/homebrew/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
"$BREW_X64_PATH/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64"
"/opt/homebrew/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia
fi
cd "$WORKDIR"

View File

@ -38,7 +38,7 @@ echo "IconIndex=0" >> Quickstart.url
DMG_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.dmg"
/opt/homebrew/bin/create-dmg --volname RPCS3 \
"$BREW_X64_PATH/bin/create-dmg" --volname RPCS3 \
--window-size 800 400 \
--icon-size 100 \
--icon rpcs3.app 200 190 \
@ -51,7 +51,7 @@ DMG_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-$
"$DMG_FILEPATH" \
RPCS3.app
/opt/homebrew/bin/7z a -mx9 rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z RPCS3.app
"$BREW_X64_PATH/bin/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 }')

View File

@ -114,37 +114,37 @@ freebsd_task:
install_script: "sh -ex ./.ci/install-freebsd.sh"
script: "./.ci/build-freebsd.sh"
macos_task:
timeout_in: 12000m
homebrew_cache:
folder: /Users/admin/Library/Caches/Homebrew
qt_cache:
folder: /tmp/Qt
ccache_cache:
folder: /tmp/ccache_dir
matrix:
- name: Cirrus macOS
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
mac_script:
- mkdir artifacts
- chmod +x ".ci/build-mac.sh"
- chmod +x ".ci/deploy-mac.sh"
- ".ci/build-mac.sh"
env:
BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts
ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_MAXSIZE: 300M
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-mac"
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
artifacts:
name: Artifact
path: "artifacts/*"
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;
# macos_task:
# timeout_in: 12000m
# homebrew_cache:
# folder: /Users/admin/Library/Caches/Homebrew
# qt_cache:
# folder: /tmp/Qt
# ccache_cache:
# folder: /tmp/ccache_dir
# matrix:
# - name: Cirrus macOS
# macos_instance:
# image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
# mac_script:
# - mkdir artifacts
# - chmod +x ".ci/build-mac.sh"
# - chmod +x ".ci/deploy-mac.sh"
# - ".ci/build-mac.sh"
# env:
# BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts
# ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/
# CCACHE_DIR: "/tmp/ccache_dir"
# CCACHE_MAXSIZE: 300M
# CI_HAS_ARTIFACTS: true
# UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
# UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-mac"
# RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
# artifacts:
# name: Artifact
# path: "artifacts/*"
# 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;

View File

@ -121,3 +121,61 @@ jobs:
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build
variables:
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_MAXSIZE: 300M
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-mac"
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
ARTDIR: $(Build.ArtifactStagingDirectory)
QT_VER: '6.5.2'
QT_VER_MAIN: '6'
pool:
vmImage: "macOS-12"
steps:
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
restoreKeys: |
ccache | "$(Agent.OS)"
displayName: Ccache cache
- task: Cache@2
inputs:
key: qt | "$(Agent.OS)" | "$(QT_VER)"
path: /tmp/Qt
restoreKeys: |
qt | "$(Agent.OS)" | "$(QT_VER)"
displayName: Qt cache
- task: Cache@2
inputs:
key: brew | "$(Agent.OS)"
path: /Users/runner/Library/Caches/Homebrew
restoreKeys: |
brew | "$(Agent.OS)"
displayName: Homebrew cache
- bash: |
chmod +x ".ci/build-mac.sh"
chmod +x ".ci/deploy-mac.sh"
".ci/build-mac.sh"
displayName: Build MacOS
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Mac
- bash: |
source './.ci/export-cirrus-vars.sh'
.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'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)