Update to match FP32 CodeGen changes. #2323
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build macOS | |
on: [push, pull_request] | |
jobs: | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Install Vulkan SDK | |
run: | | |
cd $RUNNER_WORKSPACE | |
curl -L --show-error --output vulkansdk.dmg https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/mac/vulkansdk-macos-${VULKAN_SDK_VERSION}.dmg?Human=true | |
hdiutil attach vulkansdk.dmg | |
sudo /Volumes/vulkansdk-macos-${VULKAN_SDK_VERSION}/InstallVulkan.app/Contents/MacOS/InstallVulkan in --al --c | |
echo "VULKAN_SDK=~/VulkanSDK/${VULKAN_SDK_VERSION}/macOS" >> $GITHUB_ENV | |
env: | |
VULKAN_SDK_VERSION: '1.3.268.1' | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-${{ matrix.qt-arch }}-QtCache | |
- name: Install AppDmg | |
run: npm install -g appdmg | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Force Fetch Git Tags | |
run: git fetch --tags --force | |
- name: Cache Qt ARM | |
uses: actions/cache@v3 | |
id: cache-qt-arm | |
with: | |
path: qt-5.15.2.arm64_big_sur.bottle.tar.gz | |
key: ${{ runner.os }}-QtARMCache | |
- name: Download Qt ARM Library | |
if: steps.cache-qt-arm.outputs.cache-hit != 'true' | |
run: curl -L --show-error --header Authorization:\ Bearer\ QQ== --output qt-5.15.2.arm64_big_sur.bottle.tar.gz https://ghcr.io/v2/homebrew/core/qt/5/blobs/sha256:ca6ad27d24c751b85f2b577df3773d52b48f0f286c5b1414ae8d1437ad72a3e4 | |
- name: Prepare Qt Universal Libs | |
run: | | |
tar xf qt-5.15.2.arm64_big_sur.bottle.tar.gz | |
python3 .github/CI_MISC/pre_qt_universal_build.py $Qt5_DIR/ `pwd`/qt@5/5.15.2/ | |
- name: Set SHORT_HASH | |
run: echo "VALUE=${LONG_HASH:0:8}" >> $GITHUB_OUTPUT | |
id: short_hash | |
env: | |
LONG_HASH: ${{ github.sha }} | |
- name: Generate CMake Project | |
run: | | |
mkdir build | |
cd build | |
cmake .. -G"Xcode" -DBUILD_LIBRETRO_CORE=yes "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" | |
- name: Build | |
run: | | |
cd build | |
xcodebuild -project Play.xcodeproj build -target ALL_BUILD -configuration Release -arch x86_64 -arch arm64 ONLY_ACTIVE_ARCH=NO | |
macdeployqt Source/ui_qt/Release/Play.app | |
- name: Run Tests | |
run: | | |
cd build | |
ctest -C Release | |
- name: Prepare states DB | |
run: | | |
pip3 install requests | |
python3 .github/CI_MISC/build_compatibility_db.py | |
cp states.db build/Source/ui_qt/Release/Play.app/Contents/Resources/ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sign And Notarize | |
if: ${{ env.MACOS_DEVID_CERTIFICATE != null }} | |
run: | | |
./.ci.macos.import_certificate.sh | |
./installer_macos/sign.sh | |
./.ci.macos.notarize.sh | |
env: | |
MACOS_DEVID_CERTIFICATE: ${{ secrets.MACOS_DEVID_CERTIFICATE }} | |
MACOS_DEVID_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_DEVID_CERTIFICATE_PASSWORD }} | |
MACOS_NOTARIZE_APPLEID_USERNAME: ${{ secrets.MACOS_NOTARIZE_APPLEID_USERNAME }} | |
MACOS_NOTARIZE_APPLEID_PASSWORD: ${{ secrets.MACOS_NOTARIZE_APPLEID_PASSWORD }} | |
MACOS_NOTARIZE_TEAMID: ${{ secrets.MACOS_NOTARIZE_TEAMID }} | |
- name: Generate DMG | |
run: | | |
cd build | |
appdmg ../installer_macos/spec.json Play.dmg | |
- name: Upload a Build Artifact dmg | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Play_MacOS_dmg | |
path: build/Play.dmg | |
- name: Upload a Build Artifact libretro | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Play_MacOS_libretro | |
path: build/Source/ui_libretro/Release/play_libretro.dylib | |
- name: Upload to S3 | |
if: ${{ env.AWS_ACCESS_KEY_ID != null}} | |
run: | | |
aws s3 cp build/Play.dmg s3://playbuilds/$SHORT_HASH/Play.dmg --acl public-read | |
aws s3 cp build/Source/ui_libretro/Release/play_libretro.dylib s3://playbuilds/$SHORT_HASH/play_libretro_macOS-x86_64.dylib --acl public-read | |
env: | |
SHORT_HASH: ${{ steps.short_hash.outputs.VALUE }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: 'us-east-2' | |