From d35973fe0cc378522304946f80066309173c7795 Mon Sep 17 00:00:00 2001 From: wenfeng song Date: Fri, 22 Mar 2024 10:19:02 +1100 Subject: [PATCH 01/10] support macOS 10.14 Mojave for x86_64 deployment --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca288993d..79f60bacd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,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' From 3e1a091f210bff74fe48fa5957772ab803e57cb1 Mon Sep 17 00:00:00 2001 From: wenfeng song Date: Fri, 22 Mar 2024 14:24:40 +1100 Subject: [PATCH 02/10] bump version to 1.5.2 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79f60bacd..c7bdde379 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,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.2-28.1.2-m112" LIBWEBRTC_RELEASE_TAG: "m112-release" LIBWEBRTC_VERSION: "112.0" VENDOR: "Millicast" From 9337840787d5c8cd4d835c92f1e42c2dfcccd31a Mon Sep 17 00:00:00 2001 From: wenfeng song Date: Fri, 22 Mar 2024 14:26:40 +1100 Subject: [PATCH 03/10] bump version to 1.5.3 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7bdde379..7ba278e68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,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.2-28.1.2-m112" + OBS_VERSION: "1.5.3-28.1.2-m112" LIBWEBRTC_RELEASE_TAG: "m112-release" LIBWEBRTC_VERSION: "112.0" VENDOR: "Millicast" From ed9fa1fbc478534d6e98fb6833c4fc4e22f679e8 Mon Sep 17 00:00:00 2001 From: Marek Sobolak Date: Fri, 22 Mar 2024 12:58:19 +0100 Subject: [PATCH 04/10] Update 01_install_dependencies.ps1 Replace powershell Invoke-WebRequest by curl. --- CI/windows/01_install_dependencies.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/windows/01_install_dependencies.ps1 b/CI/windows/01_install_dependencies.ps1 index c78c589a6..04f66d69c 100644 --- a/CI/windows/01_install_dependencies.ps1 +++ b/CI/windows/01_install_dependencies.ps1 @@ -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..." From 89eb76c7d923ed3e7d419accd12b3c023d996cef Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Fri, 22 Mar 2024 13:29:38 +0100 Subject: [PATCH 05/10] Fix cmake parsing issue - Windows runner has cmake 3.28 - It is not detecting properly escaped quotes around x64 arch - Harcode it to make sure it works --- CI/windows/02_build_obs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/windows/02_build_obs.ps1 b/CI/windows/02_build_obs.ps1 index 86e38d5eb..13e1afdc3 100644 --- a/CI/windows/02_build_obs.ps1 +++ b/CI/windows/02_build_obs.ps1 @@ -72,7 +72,7 @@ function Configure-OBS { $CmakeCommand = @( "-G", ${CmakeGenerator} - "-DCMAKE_GENERATOR_PLATFORM=`"${GeneratorPlatform}`"", + "-DCMAKE_GENERATOR_PLATFORM=x64", "-DCMAKE_SYSTEM_VERSION=`"${CmakeSystemVersion}`"", "-DCMAKE_PREFIX_PATH:PATH=`"${CmakePrefixPath}`"", "-DCEF_ROOT_DIR:PATH=`"${CefDirectory}`"", From 87c440dcb666000b02be4cd241f0d0555683521d Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 14:30:01 +0100 Subject: [PATCH 06/10] Fix ffmpeg installation on Windows - Lets see if this fixes the windows build --- .github/workflows/main.yml | 3 +++ CI/windows/02_build_obs.ps1 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ba278e68..65e19f194 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -490,6 +490,9 @@ jobs: - name: 'Install dependencies' run: ./CI/windows/01_install_dependencies.ps1 -BuildArch ${{ env.TARGET_ARCH }} + - name: 'Fix ffmpeg installation' + run: choco install ffmpeg + - name: 'Setup plugings' run: | git stash diff --git a/CI/windows/02_build_obs.ps1 b/CI/windows/02_build_obs.ps1 index 13e1afdc3..ae4a67bfa 100644 --- a/CI/windows/02_build_obs.ps1 +++ b/CI/windows/02_build_obs.ps1 @@ -92,6 +92,9 @@ function Configure-OBS { "-DCOPIED_DEPENDENCIES=OFF", "-DCOPY_DEPENDENCIES=ON", "-DBUILD_FOR_DISTRIBUTION=ON", + "-DFFMPEG_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg", + "-DAVCODEC_INCLUDE_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg\include", + "-DAVCODEC_LIBRARY:FILEPATH=C:\ProgramData\chocolatey\lib\ffmpeg\lib\avcodec.lib", "$(if (Test-Path Env:CI) { "-DOBS_BUILD_NUMBER=${Env:GITHUB_RUN_ID}" })", "$(if (Test-Path Variable:$Quiet) { "-Wno-deprecated -Wno-dev --log-level=ERROR" })", "-Dlibwebrtc_DIR=`"C:/Program Files/libwebrtc/cmake`"", From 2b19d8d95cd519c4956698d10f19bdac20897d9c Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 14:44:09 +0100 Subject: [PATCH 07/10] Add workflow concurrency group - This will autocancel new workflows if same branch is pushed with new/ammended commits --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65e19f194..88e2ee579 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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' From c7471df8931c5c74074ed3cc72ea956ad9a051b1 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 15:12:46 +0100 Subject: [PATCH 08/10] Windows runner use cmake 3.21 - This is workaround - Download and use cmake 3.21 on Windows - Elleviate these issues with 3.28 on these new windows machines - Like not finding ffmpeg --- .github/workflows/main.yml | 25 +++++++++++++++++++++++-- CI/windows/02_build_obs.ps1 | 3 --- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88e2ee579..b590fa8e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -497,6 +497,17 @@ jobs: - 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 + cmake --version + shell: powershell + - name: 'Setup plugings' run: | git stash @@ -505,10 +516,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 }} diff --git a/CI/windows/02_build_obs.ps1 b/CI/windows/02_build_obs.ps1 index ae4a67bfa..13e1afdc3 100644 --- a/CI/windows/02_build_obs.ps1 +++ b/CI/windows/02_build_obs.ps1 @@ -92,9 +92,6 @@ function Configure-OBS { "-DCOPIED_DEPENDENCIES=OFF", "-DCOPY_DEPENDENCIES=ON", "-DBUILD_FOR_DISTRIBUTION=ON", - "-DFFMPEG_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg", - "-DAVCODEC_INCLUDE_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg\include", - "-DAVCODEC_LIBRARY:FILEPATH=C:\ProgramData\chocolatey\lib\ffmpeg\lib\avcodec.lib", "$(if (Test-Path Env:CI) { "-DOBS_BUILD_NUMBER=${Env:GITHUB_RUN_ID}" })", "$(if (Test-Path Variable:$Quiet) { "-Wno-deprecated -Wno-dev --log-level=ERROR" })", "-Dlibwebrtc_DIR=`"C:/Program Files/libwebrtc/cmake`"", From 5f76913185a57fd1663d2b47fdd479de8a9b358b Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 15:53:15 +0100 Subject: [PATCH 09/10] 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' From a9f14aa8bfbd0738414937c1e05d1cf473b30773 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Mon, 25 Mar 2024 07:15:47 +0100 Subject: [PATCH 10/10] Revert windows character espace - We now use cmake 3.21 which should fix this This reverts commit a179e454f4af0518cf9d3917ca6b6af3b4bdaec6. --- CI/windows/02_build_obs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/windows/02_build_obs.ps1 b/CI/windows/02_build_obs.ps1 index 13e1afdc3..86e38d5eb 100644 --- a/CI/windows/02_build_obs.ps1 +++ b/CI/windows/02_build_obs.ps1 @@ -72,7 +72,7 @@ function Configure-OBS { $CmakeCommand = @( "-G", ${CmakeGenerator} - "-DCMAKE_GENERATOR_PLATFORM=x64", + "-DCMAKE_GENERATOR_PLATFORM=`"${GeneratorPlatform}`"", "-DCMAKE_SYSTEM_VERSION=`"${CmakeSystemVersion}`"", "-DCMAKE_PREFIX_PATH:PATH=`"${CmakePrefixPath}`"", "-DCEF_ROOT_DIR:PATH=`"${CefDirectory}`"",