summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatTheMav <PatTheMav@users.noreply.github.com>2022-11-14 19:35:02 +0100
committerPatTheMav <PatTheMav@users.noreply.github.com>2022-11-15 22:06:45 +0100
commitf10adb296edff5a2f342dc09fb69d22ac5174f52 (patch)
tree5224110da61446f3d4dd6eefcde91e0da0f2561d
parent24818dc8027cacbc71ef03a5ca081983c689e4dd (diff)
CI: Add camera extension branch to workflowmacos-camera-extension
Required to get full workflow runs without creating PRs or merging
-rw-r--r--.github/workflows/clang-format.yml3
-rw-r--r--.github/workflows/docs.yml2
-rw-r--r--.github/workflows/main.yml373
-rw-r--r--.github/workflows/qt-xml.yml2
-rw-r--r--.github/workflows/services-json.yml2
5 files changed, 22 insertions, 360 deletions
diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml
index 6e62216a6..20b44ff8e 100644
--- a/.github/workflows/clang-format.yml
+++ b/.github/workflows/clang-format.yml
@@ -3,7 +3,8 @@ name: Clang Format Check
on:
push:
paths-ignore: ['**.md']
- branches-ignore: [master]
+ branches:
+ - bla
pull_request:
paths-ignore: ['**.md']
branches-ignore: [master]
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d4d9d1050..1d24ee2ff 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -2,6 +2,8 @@ name: Generate Documentation
on:
push:
+ branches:
+ - master
paths-ignore:
- "cmake/**"
pull_request:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d350ab9c3..b384a7c24 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -5,6 +5,7 @@ on:
paths-ignore: ['**.md']
branches:
- master
+ - macos-camera-extension
- 'release/**'
tags: ['*']
pull_request:
@@ -40,38 +41,13 @@ env:
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
jobs:
- clang_check:
- name: '01 - Code Format Check'
- runs-on: [ubuntu-22.04]
- steps:
- - name: 'Checkout'
- uses: actions/checkout@v3
- with:
- submodules: 'recursive'
-
- - name: 'Install clang-format'
- run: sudo apt-get install -y clang-format-13
-
- - name: 'Run clang-format'
- run: |
- ./CI/check-format.sh
- ./CI/check-changes.sh
-
- - name: 'Install cmake-format'
- run: sudo pip install cmakelang
-
- - name: 'Run cmake-format'
- run: |
- ./CI/check-cmake.sh
-
macos_build:
name: '02 - macOS'
runs-on: [macos-12]
strategy:
matrix:
- arch: ['x86_64', 'arm64']
+ arch: ['arm64']
if: always()
- needs: [clang_check]
env:
MACOSX_DEPLOYMENT_TARGET_X86_64: '10.15'
MACOSX_DEPLOYMENT_TARGET_ARM64: '11.0'
@@ -219,353 +195,32 @@ jobs:
echo "BUILD_FOR_DISTRIBUTION=ON" >> $GITHUB_ENV
echo "BUILD_CONFIG=Release" >> $GITHUB_ENV
- - name: 'Build OBS'
- run: CI/macos/02_build_obs.sh --codesign --architecture "${{ matrix.arch }}"
-
- - name: 'Create build artifact'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- run: |
- CI/macos/03_package_obs.sh --codesign --architecture "${{ matrix.arch }}"
- ARTIFACT_NAME=$(basename $(/usr/bin/find build -type f -name "obs-studio-*.dmg" -depth 1 | head -1))
- echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
-
- - name: 'Upload build Artifact'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- uses: actions/upload-artifact@v3
- with:
- name: 'obs-studio-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
- path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'
-
- linux_build:
- name: '02 - Linux'
- runs-on: ${{ matrix.ubuntu }}
- strategy:
- matrix:
- ubuntu: ['ubuntu-20.04', 'ubuntu-22.04']
- if: always()
- needs: [clang_check]
- defaults:
- run:
- shell: bash
- working-directory: 'obs-studio'
- env:
- BUILD_FOR_DISTRIBUTION: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
- steps:
- - name: 'Checkout'
- uses: actions/checkout@v3
- with:
- submodules: 'recursive'
- path: 'obs-studio'
- fetch-depth: 0
-
- - name: 'Check for Github Labels'
- if: github.event_name == 'pull_request'
- run: |
- if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
- echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
- else
- echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
- fi
-
- echo "CACHE_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
-
- - name: 'Restore ccache from cache'
- id: ccache-cache
- uses: actions/cache@v3
- env:
- CACHE_NAME: 'ccache-cache'
- with:
- path: ${{ github.workspace }}/.ccache
- key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ matrix.ubuntu }}-${{ env.CACHE_DATE }}
-
- - name: 'Restore Chromium Embedded Framework from cache'
- id: cef-cache
- uses: actions/cache@v3
- env:
- CACHE_NAME: 'cef-cache'
- with:
- path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_LINUX }}_linux64
- key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_LINUX }}-${{ env.CACHE_REVISION }}
-
- - name: 'Setup build environment'
- id: setup
- run: |
- echo "commitHash=$(git rev-parse --short=9 HEAD)" >> $GITHUB_OUTPUT
-
- - name: 'Install dependencies'
+ - name: Setup tmate session
+ if: ${{ matrix.arch == 'arm64' }}
+ uses: mxschmitt/action-tmate@v3
env:
- RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
- run: CI/linux/01_install_dependencies.sh --disable-pipewire
-
- - name: 'Build OBS'
- run: CI/linux/02_build_obs.sh --disable-pipewire
-
- - name: 'Run tests'
- if: success()
- run: cmake --build build -t test
-
- - name: 'Create build artifact'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- run: |
- CI/linux/03_package_obs.sh
- ARTIFACT_NAME=$(basename $(/usr/bin/find build -maxdepth 1 -type f -name "obs-studio-*.deb" | sort -rn | head -1))
- echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
-
- - name: 'Upload build Artifact'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- uses: actions/upload-artifact@v3
- with:
- name: 'obs-studio-${{ matrix.ubuntu }}-${{ steps.setup.outputs.commitHash }}'
- path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'
-
- windows_build:
- name: '02 - Windows'
- runs-on: [windows-2022]
- needs: [clang_check]
- if: always()
- strategy:
- matrix:
- arch: [x64, x86]
- env:
- CMAKE_GENERATOR: 'Visual Studio 17 2022'
- CMAKE_SYSTEM_VERSION: '10.0.18363.657'
- VIRTUALCAM-GUID: 'A3FCE0F5-3493-419F-958A-ABA1250EC20B'
- BUILD_FOR_DISTRIBUTION: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
- defaults:
- run:
- working-directory: 'obs-studio'
- steps:
- - name: 'Checkout'
- uses: actions/checkout@v3
- with:
- submodules: 'recursive'
- path: 'obs-studio'
- fetch-depth: 0
-
- - name: 'Add msbuild to PATH'
- uses: microsoft/setup-msbuild@v1.1
-
- - name: 'Check for Github Labels'
- if: github.event_name == 'pull_request'
- run: |
- $LabelFound = try { (Invoke-RestMethod -Authentication 'Bearer' -Token (ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText) -Uri "${{ github.event.pull_request.url }}" -UseBasicParsing).labels.name.contains("Seeking Testers") } catch { $false }
- Write-Output "SEEKING_TESTERS=$(if( $LabelFound -eq $true ) { 1 } else { 0 })" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
-
- - name: 'Restore VLC dependency from cache'
- id: vlc-cache
- uses: actions/cache@v3
- env:
- CACHE_NAME: 'vlc-cache'
- with:
- path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_WIN }}
- key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_WIN }}-${{ env.CACHE_REVISION }}
-
- - name: 'Restore Chromium Embedded Framework from cache'
- id: cef-cache
- uses: actions/cache@v3
- env:
- CACHE_NAME: 'cef-cache'
+ CODESIGN_IDENT_USER: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
+ CODESIGN_IDENT_PASS: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
with:
- path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_WIN }}_windows_${{ matrix.arch }}
- key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_WIN }}-${{ matrix.arch }}-${{ env.CACHE_REVISION }}
-
- - name: Setup Environment
- id: setup
- run: |
- $CommitHash = git rev-parse --short=9 HEAD
- "commitHash=${CommitHash}" >> $env:GITHUB_OUTPUT
-
- - name: 'Install dependencies'
- env:
- RESTORED_VLC: ${{ steps.vlc-cache.outputs.cache-hit }}
- RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
- run: CI/windows/01_install_dependencies.ps1 -BuildArch ${{ matrix.arch }}
+ limit-access-to-actor: true
- name: 'Build OBS'
- run: CI/windows/02_build_obs.ps1 -BuildArch ${{ matrix.arch }}
+ run: CI/macos/02_build_obs.sh --codesign --architecture "${{ matrix.arch }}"
- name: 'Create build artifact'
if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- run: |
- CI/windows/03_package_obs.ps1 -BuildArch ${{ matrix.arch }} -Package
- $ArtifactName = Get-ChildItem -filter "obs-studio-*-windows-${{ matrix.arch }}.zip" -File
- Write-Output "FILE_NAME=${ArtifactName}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
-
- - name: 'Upload build artifact'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- uses: actions/upload-artifact@v3
- with:
- name: 'obs-studio-windows-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
- path: '${{ env.FILE_NAME }}'
-
- linux_package:
- name: '02 - Flatpak Bundle'
- runs-on: [ubuntu-latest]
- needs: [clang_check]
- if: always()
- defaults:
- run:
- shell: bash
- container:
- image: bilelmoussaoui/flatpak-github-actions:kde-6.3
- options: --privileged
- steps:
- - name: 'Check for Github Labels'
- if: github.event_name == 'pull_request'
- run: |
- if ! /usr/bin/command -v "jq" >/dev/null 2>&1; then sudo dnf install -y -q jq; fi
- if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
- echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
- else
- echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
- fi
-
- - name: 'Checkout'
- uses: actions/checkout@v3
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- with:
- submodules: 'recursive'
- fetch-depth: 0
-
- - name: 'Setup build environment'
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- run: |
- git config --global --add safe.directory $GITHUB_WORKSPACE
- echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- echo "OBS_GIT_HASH=$(git rev-parse --short=9 HEAD)" >> $GITHUB_ENV
- echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
-
- - name: Build Flatpak Manifest
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
- if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
- with:
- bundle: obs-studio-flatpak-${{ env.OBS_GIT_HASH }}.flatpak
- manifest-path: CI/flatpak/com.obsproject.Studio.json
- cache-key: flatpak-builder-${{ hashFiles('CI/flatpak/com.obsproject.Studio.json') }}
-
- windows_package:
- name: '03 - Windows Installer'
- runs-on: [windows-latest]
- needs: [windows_build]
- if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
- env:
- BUILD_FOR_DISTRIBUTION: 'ON'
- steps:
- - name: 'Checkout'
- uses: actions/checkout@v3
-
- - name: Setup Environment
- id: setup
- run: |
- $CommitHash = git rev-parse --short=9 HEAD
- "commitHash=${CommitHash}" >> $env:GITHUB_OUTPUT
-
- - name: 'Add msbuild to PATH'
- uses: microsoft/setup-msbuild@v1.1
-
- - name: 'Download 64-bit artifact'
- uses: actions/download-artifact@v3
- with:
- name: 'obs-studio-windows-x64-${{ steps.setup.outputs.commitHash }}'
-
- - name: 'Download 32-bit artifact'
- uses: actions/download-artifact@v3
- with:
- name: 'obs-studio-windows-x86-${{ steps.setup.outputs.commitHash }}'
-
- - name: 'Unpack Windows build artifacts'
- id: unpack
- run: |
- if (!(Test-Path install_temp)) {
- $null = New-Item -ItemType Directory -Force -Path install_temp
- }
-
- Expand-Archive -Path "$(Get-ChildItem -filter "obs-studio-*-windows-x86.zip" -File)" -DestinationPath install_temp
- Expand-Archive -Path "$(Get-ChildItem -filter "obs-studio-*-windows-x64.zip" -File)" -Force -DestinationPath install_temp
-
- CI/windows/03_package_obs.ps1 -CombinedArchs -Package
-
- $ArtifactName = (Get-ChildItem -filter "obs-studio-*-windows-x86+x64.zip" -File).Name
- "filename=${ArtifactName}" >> $env:GITHUB_OUTPUT
-
- - name: 'Upload build artifact'
- uses: actions/upload-artifact@v3
- with:
- name: 'obs-studio-windows-installer'
- path: '${{ steps.unpack.outputs.filename }}'
-
- macos_release:
- name: '03 - macOS notarized image'
- runs-on: [macos-12]
- needs: [macos_build]
- env:
- HAVE_CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY != '' && secrets.MACOS_SIGNING_CERT != '' }}
- BUILD_FOR_DISTRIBUTION: 'ON'
- if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
- strategy:
- matrix:
- arch: ['x86_64', 'arm64']
- defaults:
- run:
- shell: bash
- steps:
- - name: 'Checkout'
- if: env.HAVE_CODESIGN_IDENTITY == 'true'
- uses: actions/checkout@v3
-
- - name: 'Setup build environment'
- id: setup
- run: |
- echo "commitHash=$(git rev-parse --short=9 HEAD)" >> $GITHUB_OUTPUT
-
- - name: 'Download artifact'
- if: env.HAVE_CODESIGN_IDENTITY == 'true'
- uses: actions/download-artifact@v3
- with:
- name: 'obs-studio-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
-
- - name: 'Install Apple Developer Certificate'
- if: env.HAVE_CODESIGN_IDENTITY == 'true'
- uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
- with:
- p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
- p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
-
- - name: 'Install Apple Developer Certificate'
- if: ${{ env.HAVE_CODESIGN_IDENTITY == 'true' }}
env:
- BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_SIGNING_CERT }}
- P12_PASSWORD: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
- run: |
- CERTIFICATE_PATH="${RUNNER_TEMP}/build_certificate.p12"
- KEYCHAIN_PATH="${RUNNER_TEMP}/app-signing.keychain-db"
-
- echo -n "${BUILD_CERTIFICATE_BASE64}" | base64 --decode --output "${CERTIFICATE_PATH}"
-
- security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}"
- security set-keychain-settings -lut 21600 "${KEYCHAIN_PATH}"
- security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}"
-
- security import "${CERTIFICATE_PATH}" -P "${P12_PASSWORD}" -A -t cert -f pkcs12 -k "${KEYCHAIN_PATH}"
- security list-keychain -d user -s "${KEYCHAIN_PATH}"
-
- echo "CODESIGN_IDENT=${{ secrets.MACOS_SIGNING_IDENTITY }}" >> $GITHUB_ENV
-
- - name: 'Create disk image for distribution'
- if: ${{ env.HAVE_CODESIGN_IDENTITY == 'true' }}
- env:
- CODESIGN_IDENT: ${{ secrets.MACOS_SIGNING_IDENTITY }}
CODESIGN_IDENT_USER: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
CODESIGN_IDENT_PASS: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
run: |
- ARTIFACT_NAME=$(/usr/bin/find . -type f -name "obs-studio-*.dmg" -depth 1 | head -1)
+ CI/macos/03_package_obs.sh --codesign --architecture "${{ matrix.arch }}"
+ ARTIFACT_NAME=$(/usr/bin/find . -type f -name "obs-studio-*.dmg" -depth 2 | head -1)
CI/macos/03_package_obs.sh --notarize-image ${ARTIFACT_NAME}
-
echo "FILE_NAME=$(basename ${ARTIFACT_NAME})" >> $GITHUB_ENV
- name: 'Upload build Artifact'
- if: env.HAVE_CODESIGN_IDENTITY == 'true'
+ if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
uses: actions/upload-artifact@v3
with:
- name: 'obs-studio-macos-${{ matrix.arch }}-notarized'
- path: '${{ github.workspace }}/${{ env.FILE_NAME }}'
+ name: 'obs-studio-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
+ path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'
diff --git a/.github/workflows/qt-xml.yml b/.github/workflows/qt-xml.yml
index 98798b823..0a9f6d092 100644
--- a/.github/workflows/qt-xml.yml
+++ b/.github/workflows/qt-xml.yml
@@ -2,6 +2,8 @@ name: UI XML Validator
on:
push:
+ branches:
+ - master
paths-ignore:
- "cmake/**"
pull_request:
diff --git a/.github/workflows/services-json.yml b/.github/workflows/services-json.yml
index 6778fa355..482ddd9ac 100644
--- a/.github/workflows/services-json.yml
+++ b/.github/workflows/services-json.yml
@@ -2,6 +2,8 @@ name: Services Validator
on:
push:
+ branches:
+ - master
paths:
- "plugins/rtmp-services/data/services.json"
- "plugins/rtmp-services/data/package.json"