Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support macOS 10.14 Mojave for x86_64 deployment #378

Merged
merged 10 commits into from
Mar 25, 2024
54 changes: 44 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- 'RELEASE_NOTES.md'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

env:
CACHE_REVISION: '006'
CEF_BUILD_VERSION_MAC: '5060'
Expand Down Expand Up @@ -40,7 +44,7 @@ env:
YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
OBS_VERSION: "1.5.1-28.1.2-m112"
OBS_VERSION: "1.5.3-28.1.2-m112"
LIBWEBRTC_RELEASE_TAG: "m112-release"
LIBWEBRTC_VERSION: "112.0"
VENDOR: "Millicast"
Expand All @@ -52,7 +56,7 @@ jobs:
name: 'MacOS-x86_64'
runs-on: [macos-12]
env:
MACOSX_DEPLOYMENT_TARGET_X86_64: '10.15'
MACOSX_DEPLOYMENT_TARGET_X86_64: '10.14'
SPARKLE_VERSION: '1.26.0'
SPARKLE_HASH: '8312cbf7528297a49f1b97692c33cb8d33254c396dc51be394e9484e4b6833a0'
BLOCKED_FORMULAS: 'speexdsp curl php composer'
Expand Down Expand Up @@ -127,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 }}
Expand Down Expand Up @@ -191,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'
Expand Down Expand Up @@ -260,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'
Expand Down Expand Up @@ -490,6 +501,19 @@ jobs:
- name: 'Install dependencies'
run: ./CI/windows/01_install_dependencies.ps1 -BuildArch ${{ env.TARGET_ARCH }}

- name: 'Fix ffmpeg installation'
run: choco install ffmpeg

- name: Install cmake 3.21 and set path
run: |
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3-windows-x86_64.zip" -OutFile "cmake.zip"
Expand-Archive "cmake.zip" -DestinationPath "C:\Program Files\cmake-3.21"
$newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH
echo "PATH=$newPath" >> $GITHUB_ENV
echo "$env:PATH =$newPath"
Remove-Item cmake.zip
shell: powershell

- name: 'Setup plugings'
run: |
git stash
Expand All @@ -498,10 +522,20 @@ jobs:
git submodule update --init --recursive

- name: 'Build OBS with no NDI'
run: ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR
run: |
$newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH
echo "PATH=$newPath" >> $GITHUB_ENV
echo "$env:PATH =$newPath"
./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR
shell: powershell

- name: 'Build OBS with NDI'
run: ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR -Ndi ON
run: |
$newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH
echo "PATH=$newPath" >> $GITHUB_ENV
echo "$env:PATH =$newPath"
./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR -Ndi ON
shell: powershell

- name: 'Prepare package'
run: ./CI/windows/before-deploy-win.cmd ${{ env.VENDOR }}
Expand Down
2 changes: 1 addition & 1 deletion CI/windows/01_install_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function Install-cef {
if (!((Test-Path "${DepsBuildDir}/cef_binary_${Version}_windows_${ArchSuffix}") -and (Test-Path "${DepsBuildDir}/cef_binary_${Version}_windows_${ArchSuffix}/build/libcef_dll_wrapper/Release/libcef_dll_wrapper.lib"))) {
Write-Step "Download..."
$ProgressPreference = $(if ($Quiet.isPresent) { 'SilentlyContinue' } else { 'Continue' })
Invoke-WebRequest -Uri "https://cdn-fastly.obsproject.com/downloads/cef_binary_${Version}_windows_${ArchSuffix}.zip" -UseBasicParsing -OutFile "cef_binary_${Version}_windows_${ArchSuffix}.zip"
cmd.exe /c curl -L -H "Accept: application/octet-stream" "https://cdn-fastly.obsproject.com/downloads/cef_binary_${Version}_windows_${ArchSuffix}.zip" --output "cef_binary_${Version}_windows_${ArchSuffix}.zip"
$ProgressPreference = "Continue"

Write-Step "Unpack..."
Expand Down
Loading