Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cd01349
libobs-metal: Add opt-outs for swift-format lints
PatTheMav Jun 19, 2026
6953601
libobs-metal: Fix swift-format issues
PatTheMav Jun 23, 2026
d3595cd
plugins: Fix swift-format issues in virtualcam
PatTheMav Jul 23, 2026
0cc39e7
cmake: Update formatting for gersemi 0.28.0
PatTheMav Aug 1, 2026
cce7d6a
build-aux: Update formatter script
PatTheMav Jun 22, 2026
401700d
CI: Update format check actions
PatTheMav Aug 2, 2026
2bd8742
cmake: Fix Xcode warning of duplicate copy steps
PatTheMav Jul 24, 2026
5e78058
cmake: Enable Xcode compilation caching by default
PatTheMav Jun 23, 2026
5885763
cmake: Fix sub-project locations on Windows
PatTheMav Aug 1, 2026
55e98b8
cmake: Fix use of potentially undeclared variables
PatTheMav Aug 1, 2026
c241025
cmake: Fix use of PRE_BUILD in add_custom_command
PatTheMav Aug 1, 2026
d6e976e
cmake: Add application category for macOS
PatTheMav Aug 1, 2026
6403830
cmake: Switch AUTHOR_WARNING to WARNING
PatTheMav Aug 1, 2026
3290c3f
cmake: Add policy to switch CMP0200 to NEW
PatTheMav Aug 1, 2026
70b81b7
cmake: Switch pre-release message to STATUS
PatTheMav Aug 1, 2026
b52b87f
cmake: Remove superfluous formatting
PatTheMav Aug 1, 2026
640bb32
cmake: Fix version detection for sparse checkouts
PatTheMav Aug 1, 2026
0c17784
cmake: Elevate warnings to errors on CI only
PatTheMav Aug 1, 2026
0b058e2
cmake: Temporarily downgrade MbedTLS warning
PatTheMav Aug 1, 2026
6411eed
cmake: Remove global policy include
PatTheMav Aug 4, 2026
bcfacae
cmake: Enforce policies in CMakePresets file
PatTheMav Aug 4, 2026
c0c749c
CI: Add check-runner repository action
PatTheMav Aug 1, 2026
4f5e153
CI: Add clean-cache repository action
PatTheMav Aug 1, 2026
6d6faae
CI: Add create-pull-request repository action
PatTheMav Jul 23, 2026
33e2268
CI: Add check-version-tag repository action
PatTheMav Jul 23, 2026
758de8f
CI: Add generate-short-sha repository action
PatTheMav Jul 23, 2026
559b9b3
CI: Add download-asset repository action
PatTheMav Jul 3, 2026
0d22375
CI: Add lint-obs repository action collection
PatTheMav Aug 1, 2026
419a7e3
CI: Add publish-obs repository action collection
PatTheMav Jul 3, 2026
d5a06d7
CI: Add publish-steam repository action collection
PatTheMav Jul 3, 2026
9fa6567
CI: Add analyze-obs repository action collection
PatTheMav Jul 23, 2026
2cfa791
CI: Add codesign-obs repository action collection
PatTheMav Aug 1, 2026
0520869
CI: Add build-flatpak repository action
PatTheMav Jul 23, 2026
4eeaf39
CI: Add dedicated linting workflow
PatTheMav Aug 1, 2026
92433ca
CI: Add code-sign-project workflow
PatTheMav Jul 23, 2026
a0dcf2a
CI: Update check-changes repository action
PatTheMav Jul 3, 2026
393d502
CI: Replace lint actions with dedicated workflow
PatTheMav Jul 3, 2026
7a846b8
CI: Update flatpak-builder-lint repository action
PatTheMav Jul 3, 2026
6c20d0f
CI: Update build-obs GitHub repository action
PatTheMav Aug 1, 2026
c0aa5e1
CI: Update package-obs GitHub repository action
PatTheMav Aug 2, 2026
4ab75da
CI: Update generate-docs GitHub repository action
PatTheMav Jun 30, 2026
70d73a9
CI: Switch Steam upload from action to workflow
PatTheMav Jul 3, 2026
edf559d
CI: Update static analysis workflow
PatTheMav Jul 3, 2026
6c1dbb4
CI: Update build-project workflow
PatTheMav Aug 2, 2026
b28a052
CI: Replace pull_request GitHub event workflow
PatTheMav Jun 28, 2026
71cf475
CI: Split push GitHub event workflow
PatTheMav Jun 28, 2026
28b4cba
CI: Update publish GitHub event workflow
PatTheMav Jul 3, 2026
243a985
CI: Update dispatch GitHub event workflow
PatTheMav Jul 23, 2026
6642b20
CI: Replace schedule GitHub event workflow
PatTheMav Jul 24, 2026
05b5170
CI: Remove legacy scripts directory
PatTheMav Jul 23, 2026
2277aa9
CI: Remove legacy windows signing code
PatTheMav Jul 3, 2026
6c22d46
CI: Remove legacy macOS signing code
PatTheMav Aug 2, 2026
9327bdd
CI: Add README file for workflows
PatTheMav Jul 3, 2026
cebd542
Update Codestyle for CI scripts and workflow code
PatTheMav Jul 1, 2026
d0c5fa6
SQUASHME: Add unconditional brew update
PatTheMav Aug 4, 2026
e72b78b
SQUASHME: Address Flatpak review comments
PatTheMav Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
86 changes: 86 additions & 0 deletions .github/actions/analyze-obs/merge-clang-sarif/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# merge-clang-sarif Action

The merge-clang-sarif action combines multiple SARIF files as typically generated by Clang Static Analyzer into a single merged SARIF file as required by CodeQL.

## Documentation

### Inputs

| Input | Description | Default |
|:-----:|-------------|:-------:|
| `path` | The path on the runner to a directory with SARIF files that need to be merged. | `REQUIRED` |
| `output-name` | An optional output name for the merged SARIF file. | `merged.sarif` |

### Outputs

| Output | Description |
|:------:|-------------|
| `path` | The path to the generated merged SARIF file using the specified `output-name`. |

## Common Usage

The action requires generated SARIF files to be collected into a single location for merging, so a preparation step might be necessary before invoking the action itself:

```yaml
- name: Gather All SARIF Files
shell: bash --noprofile --norc -eo errexit -eo pipefail -eo nounset {0}
working-directory: ${{ github.workspace }}
run: |
mkdir -p "${RUNNER_TEMP}/codeql"
find . -type f -name '*.sarif' | xargs -I '{}' mv '{}' "${RUNNER_TEMP}/codeql"
```

This location can then be passed to the action directly:

```yaml
- name: Merge SARIF files
uses: ./.github/actions/merge-clang-sarif
with:
path: ${{ format('{0}/codeql', runner.temp) }}
output-name: my-merged-report.sarif
```

## Notes

* The action runs no verification on the SARIF files found in the provided input `path`. Any file with the `.sarif` suffix will be used as input for merging. An invalid SARIF file can thus lead to making the action fail.
* The provided input `path` needs to exist on the runner's file system and needs to be a directory.

## Developer Notes

* The merging of files is necessary because CodeQL requires all reports to originate from a single run of the associated "tool", but Clang Static Analyzer produces reports for each translation unit, which represents individual runs of the tool.
* The action is designed and tested for SARIF files generated by `AppleClang` 21.0+.

The actual merging of files is done entirely by `jq` using the following query:

```typescript
{
// All SARIF files generated by Clang share the same schema and version object, so simply use the
// first such element.
"$schema": first(.[]."$schema"),
"version": first(.[].version),
"runs": [{
"tool": {
// The driver object is almost identical in all files apart from the "rules" object.
// So reuse the driver object of the first such element, but remove the "rules" key.
// The add a new "rules" key and collect all rules from all driver objects in all files
// and ensure the rules collection only contains unique elements.
"driver": (first(.[].runs[].tool.driver) | del(.rules)) + {
"rules": reduce(.[].runs[].tool.driver.rules) as $obj ([]; . + $obj) | unique
}
},
// Gather all artifacts elements into a single unique collection.
"artifacts": reduce(.[].runs[].artifacts) as $obj ([]; . + $obj) | unique,
// Gather all results elements into a single unique collection, but also remove any
// "endLine" and "endColumn" keys deep in the "codeFlows" collection whose value is
// a zero, which is not allowed by SARIF.
"results": (reduce(.[].runs[].results) as $obj ([]; . + $obj))
| del(
.[].codeFlows[].threadFlows[].locations[].location.physicalLocation.region.endLine,
.[].codeFlows[].threadFlows[].locations[].location.physicalLocation.region.endColumn
| select(. == 0)
)
}]
}
```

* File paths are handled in their UNIX variant and converted from and to Windows format at the input/output edge of the Bash script.
23 changes: 23 additions & 0 deletions .github/actions/analyze-obs/merge-clang-sarif/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Merge Clang SARIF Files
description: Merges SARIF files generated by Clang Static Analyzer into a single tool run as required by CodeQL.
inputs:
path:
description: The path on the runner to a directory with SARIF files that need to be merged.
required: true
output-name:
description: An optional output name for the merged SARIF file.
default: 'merged.sarif'
outputs:
path:
description: The path to the generated merged SARIF file using the specified output-name.
value: ${{ steps.merge.outputs.path }}
runs:
using: composite
steps:
- name: Merge SARIF Files
id: merge
shell: bash --noprofile --norc -eo errexit -eo pipefail -eo nounset {0}
env:
SARIF_PATH: ${{ inputs.path }}
OUTPUT_NAME: ${{ inputs.output-name }}
run: ${GITHUB_ACTION_PATH}/merge-sarif.bash
61 changes: 61 additions & 0 deletions .github/actions/analyze-obs/merge-clang-sarif/merge-sarif.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# shellcheck disable=SC2154

set -o errexit
set -o nounset
set -o pipefail

: "${CI:?}"
if [[ -n "${RUNNER_DEBUG:-}" ]]; then set -x; fi

merge-sarif() {
if [[ ! -d "${SARIF_PATH}" ]]; then
echo "::error::Provided path for SARIF files '${SARIF_PATH}' is not a directory."
return 1
fi

if [[ "${RUNNER_OS}" == 'Windows' ]]; then
SARIF_PATH="$(cygpath --unix "${SARIF_PATH}")"
fi

local output
local -a sarif_files=()
if output="$(compgen -G "${SARIF_PATH}/*.sarif")"; then
while read -r file; do
full_path="$(realpath "${file}")"
sarif_files+=("${full_path}")
done <<< "${output}"
fi

if (( ! ${#sarif_files[@]} )); then
echo "::error::No SARIF files found in '${SARIF_PATH}'."
return 1
fi

local output_path="${RUNNER_TEMP}/${OUTPUT_NAME}"
jq --slurp '{
"$schema": first(.[]."$schema"),
"version": first(.[].version),
"runs": [{
"tool": {
"driver": (first(.[].runs[].tool.driver) | del(.rules)) + {
"rules": reduce(.[].runs[].tool.driver.rules) as $obj ([]; . + $obj) | unique
}
},
"artifacts": reduce(.[].runs[].artifacts) as $obj ([]; . + $obj) | unique,
"results": (reduce(.[].runs[].results) as $obj ([]; . + $obj))
| del(
.[].codeFlows[].threadFlows[].locations[].location.physicalLocation.region.endLine,
.[].codeFlows[].threadFlows[].locations[].location.physicalLocation.region.endColumn
| select(. == 0)
)
}]
}' "${sarif_files[@]}" > "${output_path}"

if [[ "${RUNNER_OS}" == 'Windows' ]]; then
output_path="$(cygpath --windows "${output_path}")"
fi
echo "path=${output_path}" >> "${GITHUB_OUTPUT}"
}

merge-sarif
47 changes: 47 additions & 0 deletions .github/actions/analyze-obs/run-clang-analyze/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# run-clang-analyze Action

The run-clang-analyze action uses Clang Static Analyzer to generate SARIF files which can then be uploaded to GitHub as a CodeQL report after merging the files into a format accepted by GitHub.

## Documentation

### Inputs

| Input | Description | Default |
|:-----:|-------------|:-------:|
| `architecture` | The CPU architecture used for building OBS Studio. Available values are `x86_64` and `arm64`.| `REQUIRED` |
| `upload-codeql` | A boolean value to indicate whether the generated SARIF report should be automatically uploaded. |`false`|
| `xcode-version` | An Xcode version number to select a specific Xcode version preinstalled on the runner. | `''` |
| `github-token`| The GitHub token required to upload the SARIF file as CodeQL report. The provided token needs to have the `security-events: write` permission. | `github.token`|

### Outputs

The action has no outputs.

## Common Usage

The action requires no prior setup and can be invoked directly on a checkout of the repository:

```yaml
- name: Analyze OBS Studio
id: analyze
uses: ./.github/actions/analyze-obs/run-clang-analyze
with:
architecture: arm64
upload-codeql: true

```

Be aware that just like the `build-obs` action, environment variables can influence project generation by CMake and code paths might not be included in the build and analysis without them. Thus it should be ensured that a "maximalist" build of OBS Studio can be configured to achieve the highest possible coverage of source code.

## Notes

> [!IMPORTANT]
> The action requires a macOS or Linux GitHub Actions runner.

* The CodeQL report uses the category identifier `clang-analyze`.

## Developer Notes

Under the hood the action uses the `build-obs` action with the optional input `analyze` set to `true`. The action thus mostly serves as a convenience wrapper around this action, with the benefit of automatically gathering and merging of all generated SARIF files so that their contents can be (optionally) uploaded as a single CodeQL report.

The merging is handled by the `merge-clang-sarif` action, refer to its documentation for details about the production of a single CodeQL report file.
62 changes: 62 additions & 0 deletions .github/actions/analyze-obs/run-clang-analyze/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Run clang-analyze
description: >
Uses Clang Static Analyzer to generate SARIF files which can then be uploaded to GitHub as a CodeQL report after
merging the files into a format accepted by GitHub.
inputs:
architecture:
description: >
The CPU architecture used for building OBS Studio. Available values are 'x86_64' and 'arm64'.
required: true
upload-codeql:
description: A boolean value to indicate whether the generated SARIF report should be automatically uploaded.
default: 'false'
xcode-version:
description: An Xcode version number to select a specific Xcode version pre-installed on the runner.
default: ''
github-token:
description: >
The GitHub token required to upload the SARIF file as CodeQL report.
The provided token needs to have the 'security-events: write' permission.
default: ${{ github.token }}
runs:
using: composite
steps:
- name: Check Runner
uses: ./.github/actions/check-runner
with:
os: |
macOS
Linux
custom-error: analyze-obs/run-clang-analyze action requires a macOS or Linux runner.

- name: Build OBS Studio
id: build
uses: ./.github/actions/build-obs
with:
config: Debug
architecture: ${{ inputs.architecture }}
analyze: true
xcode-version: ${{ inputs.xcode-version }}

- name: Gather Xcode SARIF files
if: runner.os == 'macOS'
shell: bash --noprofile --norc -eo errexit -eo pipefail -eo nounset {0}
working-directory: ${{ inputs.working-directory }}
env:
ANALYTICS_PATH: ${{ steps.build.outputs.analyzer-output-path }}
run: zsh --errexit --pipefail --no-rcs ${GITHUB_ACTION_PATH}/gather-xcode-sarif-files.zsh

- name: Merge SARIF files
id: merge
uses: ./.github/actions/analyze-obs/merge-clang-sarif
with:
path: ${{ steps.build.outputs.analyzer-output-path }}
output-name: ${{ format('obs-studio-{0}-{1}.sarif', runner.os, inputs.architecture) }}

- name: Upload CodeQL Report
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
if: ${{ fromJSON(inputs.upload-codeql) }}
with:
token: ${{ inputs.github-token }}
sarif_file: ${{ steps.merge.outputs.path }}
category: ${{ format('clang-analyze ({0} {1}', runner.os, inputs.architecture) }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env zsh

builtin emulate -L zsh
setopt PUSHD_SILENT
setopt EXTENDED_GLOB
setopt ERR_EXIT
setopt ERR_RETURN
setopt NO_UNSET
setopt PIPE_FAIL
setopt NO_AUTO_PUSHD
setopt NO_PUSHD_IGNORE_DUPS
setopt NO_GLOB_SUBST
setopt WARN_CREATE_GLOBAL
setopt WARN_NESTED_VAR

: ${CI:?}
if (( ${+RUNNER_DEBUG} )) setopt XTRACE

gather-xcode-sarif-files() {
local -a analytics_files=(${ANALYTICS_PATH}/StaticAnalyzer/obs-studio/**/*.plist)

local file
for file (${analytics_files}) {
mv ${file} ${ANALYTICS_PATH}/${${file:t}//plist/sarif}
}
}

gather-xcode-sarif-files
48 changes: 48 additions & 0 deletions .github/actions/analyze-obs/run-pvs-studio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# run-pvs-studio Action

The run-pvs-studio action uses PVS-Studio to run static code analysis on an existing OBS Studio Visual Studio project and uploads the generated SARIF file as a CodeQL report.

## Documentation

### Inputs

| Input | Description | Default |
|:-----:|-------------|:-------:|
| `architecture` | The CPU architecture used for building OBS Studio Available values are `x64` and `arm64`. | `REQUIRED` |
| `upload-codeql` | A boolean value to indicate whether the generated SARIF report should be automatically uploaded. |`false`|
| `github-token`| The GitHub token required to upload the SARIF file as CodeQL report. The provided token needs to have the `security-events: write` permission. | `github.token`|

### Outputs

The action has no outputs.

## Common Usage

The action requires no prior setup and can be invoked directly on a checkout of the repository:

```yaml
- name: Analyze OBS Studio
id: analyze
uses: ./.github/actions/analyze-obs/run-pvs-studio
with:
architecture: x64
upload-codeql: true

```

Be aware that just like the `build-obs` action, environment variables can influence project generation by CMake and code paths might not be included in the build and analysis without them. Thus it should be ensured that a "maximalist" build of OBS Studio can be configured to achieve the highest possible coverage of source code.

## Notes

> [!IMPORTANT]
> The action requires a Windows GitHub Actions runner.

* The action does not do any setup or installation of PVS Studio, this needs to be done in preparation before calling the action.
* The generated PVS-Studio log is uploaded as a workflow artifact by default. The CodeQL report is only optionally uploaded.

## Developer Notes

Under the hood the action uses the `build-obs` action to generate a Visual Studio project and builds the project once before passing the generated solution file to PVS Studio. As Microsoft changed the file extension of Visual Studio solution files with Visual Studio 19 2026 to `slnx` the action tries to pick up (and pass along) either variant inside the automatically selected directory path.

* PVS-Studio is capable of converting its own report into a single SARIF tool report by itself, so no merging or fix-up is necessary.
* File paths are handled in their UNIX variant and converted from and to Windows format at the input/output edge of the Bash script.
Loading