From 900e95af496c49957d409ff90181a0ad69807f15 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 15:53:15 +0100 Subject: [PATCH] Run macOS arm64 on github hosted runner - This will be using x64 machines, but Xcode lets you cross-compile for both archs - For webrtc/native-sdks we build everything on x64 machines - I am not sure though if some of these deps installed or whatever except to be on arm64 system - Like how OBS build is configured and such and going into this would be waste of time now - Thus if this doesn't work we will just fix the self hosted machine and thats it --- .github/workflows/main.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b590fa8e1..0d4221ddc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,7 +131,6 @@ jobs: security unlock-keychain -p "${KEYCHAIN_PASSWORD}" ${KEYCHAIN_PATH} security import ${CERTIFACTE_PATH} -P ${MACOS_SIGNING_CERT_PASSWORD} -A -t cert -f pkcs12 -k ${KEYCHAIN_PATH} security list-keychain -d user -s ${KEYCHAIN_PATH} - env: MACOS_SIGNING_CERT: ${{ secrets.MACOS_SIGNING_CERT }} MACOS_SIGNING_CERT_PASSWORD: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }} @@ -195,7 +194,7 @@ jobs: macos_build_arm64: name: 'MacOS-arm64' - runs-on: ['self-hosted', 'macOS', 'ARM64'] + runs-on: [macos-12] env: MACOSX_DEPLOYMENT_TARGET_ARM64: '11.0' SPARKLE_VERSION: '1.26.0' @@ -264,12 +263,20 @@ jobs: rm -rf ${{ github.workspace }}/plugins/obs-browser git submodule update --init --recursive - - name: 'Unlock keychain' + - name: 'Install MacOS cert and create keychain' run: | - security -v unlock-keychain -p ${MACOS_KEYCHAIN_PASSWORD} ${MACOS_KEYCHAIN_PATH} && echo "Keychain is unlocked" || exit 1 + echo -n ${MACOS_SIGNING_CERT} | base64 --decode -o ${CERTIFACTE_PATH} + security create-keychain -p "${KEYCHAIN_PASSWORD}" ${KEYCHAIN_PATH} + security set-keychain-settings -lut 3600 $KEYCHAIN_PATH + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" ${KEYCHAIN_PATH} + security import ${CERTIFACTE_PATH} -P ${MACOS_SIGNING_CERT_PASSWORD} -A -t cert -f pkcs12 -k ${KEYCHAIN_PATH} + security list-keychain -d user -s ${KEYCHAIN_PATH} env: - MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} - MACOS_KEYCHAIN_PATH: /Users/dolbyvoice/Library/Keychains/cosmosoftware.keychain-db + MACOS_SIGNING_CERT: ${{ secrets.MACOS_SIGNING_CERT }} + MACOS_SIGNING_CERT_PASSWORD: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} + KEYCHAIN_PATH: ${{ github.workspace }}/app-signing.keychain-db + CERTIFACTE_PATH: ${{ github.workspace }}/app-signing-cert.p12 # Geneate OBS without obs-ndi plugin - name: 'Build OBS - no NDI' @@ -505,7 +512,6 @@ jobs: echo "PATH=$newPath" >> $GITHUB_ENV echo "$env:PATH =$newPath" Remove-Item cmake.zip - cmake --version shell: powershell - name: 'Setup plugings'