From db606e8c660c03da474890785ada7066a1d27ea6 Mon Sep 17 00:00:00 2001 From: Paul Peavyhouse Date: Mon, 13 Nov 2023 10:32:10 -0800 Subject: [PATCH 01/10] CI: Fix random password generation for macOS codesigning `sha1sum` is part of Homebrew's coreutils, but macOS ships with `shasum` by default, which supports many variants and defaults to SHA-1 by default. This is essentially a cherry-pick of: https://github.com/obsproject/obs-studio/commit/1e74256b7ea438f01d3146d3411246215a19cbf5 --- .github/actions/setup-macos-codesigning/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-macos-codesigning/action.yaml b/.github/actions/setup-macos-codesigning/action.yaml index 56cdba48..5f24114b 100644 --- a/.github/actions/setup-macos-codesigning/action.yaml +++ b/.github/actions/setup-macos-codesigning/action.yaml @@ -75,7 +75,7 @@ runs: print -n "${MACOS_SIGNING_CERT}" | base64 --decode --output="${certificate_path}" - : "${MACOS_KEYCHAIN_PASSWORD:="$(print ${RANDOM} | sha1sum | head -c 32)"}" + : "${MACOS_KEYCHAIN_PASSWORD:="$(print ${RANDOM} | shasum | head -c 32)"}" print '::group::Keychain setup' security create-keychain -p "${MACOS_KEYCHAIN_PASSWORD}" ${keychain_path} From 02929855152f1a6051cb10d097898be65eeaa8c0 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Tue, 5 Dec 2023 13:31:13 -0500 Subject: [PATCH 02/10] Build plugin support library with PIC on Linux and BSD Co-authored-by: Patrick Heyer --- cmake/common/helpers_common.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/common/helpers_common.cmake b/cmake/common/helpers_common.cmake index 702cb815..b61fa545 100644 --- a/cmake/common/helpers_common.cmake +++ b/cmake/common/helpers_common.cmake @@ -134,4 +134,10 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-support.c.in") PRIVATE plugin-support.c PUBLIC src/plugin-support.h) target_include_directories(plugin-support PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src") + if(OS_LINUX + OR OS_FREEBSD + OR OS_OPENBSD) + # add fPIC on Linux to prevent shared object errors + set_property(TARGET plugin-support PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() endif() From 620ff697cf35e7dec4d4c6842bccf56377c41171 Mon Sep 17 00:00:00 2001 From: pkv Date: Fri, 8 Dec 2023 15:21:30 +0100 Subject: [PATCH 03/10] cmake: Force PDB generation on Windows for MSVC builds in all configs This is a bugfix written by PatTheMav for obs-studio which applies equally to obs-plugintemplate. Quote [1]: CMake 3.25 changed the way PDB generation is handled by only enabling it for Debug and RelWithDebInfo builds, which prohibits generation of fully optimized builds with associated symbols (which is MSVC's default). If configuring with CMake 3.25 or above, enable this globally for builds using MSVC and fall back to embedded debug information for anything else (which would probably be clang-cl) [1] https://github.com/obsproject/obs-studio/pull/9816/commits/56e2aa09a9192ef12c72f5a985e82a4b88be9ae1 --- cmake/windows/compilerconfig.cmake | 26 ++++++++++++++++++++++---- cmake/windows/helpers.cmake | 7 ++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/cmake/windows/compilerconfig.cmake b/cmake/windows/compilerconfig.cmake index 7af3c4dd..55984f43 100644 --- a/cmake/windows/compilerconfig.cmake +++ b/cmake/windows/compilerconfig.cmake @@ -9,6 +9,15 @@ if(CMAKE_VERSION VERSION_EQUAL 3.24.0) set(THREADS_HAVE_PTHREAD_ARG FALSE) endif() +# CMake 3.25 changed the way symbol generation is handled on Windows +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0) + if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT ProgramDatabase) + else() + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded) + endif() +endif() + message(DEBUG "Current Windows API version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM) message(DEBUG "Maximum Windows API version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM}") @@ -20,15 +29,24 @@ if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.20348) endif() add_compile_options( - /W3 /utf-8 "$<$:/MP>" "$<$:/MP>" + /W3 + /utf-8 + "$<$:/MP>" + "$<$:/MP>" "$<$:${_obs_clang_c_options}>" - "$<$:${_obs_clang_cxx_options}>") + "$<$:${_obs_clang_cxx_options}>" + $<$>:/Gy>) add_compile_definitions(UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS $<$:DEBUG> $<$:_DEBUG>) -add_link_options("$<$>:/OPT:REF>" "$<$:/INCREMENTAL:NO>" - "$<$:/INCREMENTAL:NO>" "$<$:/OPT:ICF>") +# cmake-format: off +add_link_options($<$>:/OPT:REF> + $<$>:/OPT:ICF> + $<$>:/INCREMENTAL:NO> + /DEBUG + /Brepro) +# cmake-format: on if(CMAKE_COMPILE_WARNING_AS_ERROR) add_link_options(/WX) diff --git a/cmake/windows/helpers.cmake b/cmake/windows/helpers.cmake index de7f0733..02868129 100644 --- a/cmake/windows/helpers.cmake +++ b/cmake/windows/helpers.cmake @@ -33,7 +33,7 @@ function(set_target_properties_plugin target) install( FILES "$" - CONFIGURATIONS RelWithDebInfo Debug + CONFIGURATIONS RelWithDebInfo Debug Release DESTINATION obs-plugins/64bit OPTIONAL) @@ -42,8 +42,9 @@ function(set_target_properties_plugin target) TARGET ${target} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_BUILD_DIR}/obs-plugins/64bit" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$" - "$<$:$>" "${OBS_BUILD_DIR}/obs-plugins/64bit" + COMMAND + "${CMAKE_COMMAND}" -E copy_if_different "$" + "$<$:$>" "${OBS_BUILD_DIR}/obs-plugins/64bit" COMMENT "Copy ${target} to obs-studio directory ${OBS_BUILD_DIR}" VERBATIM) endif() From 8fde231c05bbbdebe7126f2433f0b2b4454a0462 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Tue, 4 Jul 2023 23:22:08 +0200 Subject: [PATCH 04/10] Update .clang-format to match obs-studio project Updated to match: https://github.com/obsproject/obs-studio/blob/93f5b45be8c8/.clang-format --- .clang-format | 132 +++++++++++++++++++++++++++++++++++----- src/plugin-support.c.in | 16 ++--- 2 files changed, 124 insertions(+), 24 deletions(-) diff --git a/.clang-format b/.clang-format index 89cbc19a..38b431e1 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,6 @@ -# please use clang-format version 8 or later +# please use clang-format version 16 or later -Standard: Cpp11 +Standard: c++17 AccessModifierOffset: -8 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false @@ -8,14 +8,14 @@ AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: true -#AllowAllArgumentsOnNextLine: false # requires clang-format 9 -#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9 +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false -#AllowShortLambdasOnASingleLine: Inline # requires clang-format 9 +AllowShortLambdasOnASingleLine: Inline AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None @@ -52,8 +52,8 @@ ContinuationIndentWidth: 8 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false -FixNamespaceComments: false -ForEachMacros: +FixNamespaceComments: true +ForEachMacros: - 'json_object_foreach' - 'json_object_foreach_safe' - 'json_array_foreach' @@ -66,7 +66,7 @@ IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: true MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -#ObjCBinPackProtocolList: Auto # requires clang-format 7 +ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 8 ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true @@ -84,13 +84,13 @@ ReflowComments: false SortIncludes: false SortUsingDeclarations: false SpaceAfterCStyleCast: false -#SpaceAfterLogicalNot: false # requires clang-format 9 +SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: false SpaceBeforeAssignmentOperators: true -#SpaceBeforeCtorInitializerColon: true # requires clang-format 7 -#SpaceBeforeInheritanceColon: true # requires clang-format 7 +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements -#SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7 +SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false @@ -98,11 +98,111 @@ SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false -#StatementMacros: # requires clang-format 8 -# - 'Q_OBJECT' +StatementMacros: + - 'Q_OBJECT' TabWidth: 8 -#TypenameMacros: # requires clang-format 9 -# - 'DARRAY' +TypenameMacros: + - 'DARRAY' UseTab: ForContinuationAndIndentation --- Language: ObjC +AccessModifierOffset: 2 +AlignArrayOfStructures: Right +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None +AlignConsecutiveDeclarations: None +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AllowShortBlocksOnASingleLine: Never +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Never +AllowShortLambdasOnASingleLine: None +AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge'] +BitFieldColonSpacing: Both +#BreakBeforeBraces: Webkit +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: true + AfterControlStatement: Never + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: true +BreakAfterAttributes: Never +BreakArrays: false +BreakBeforeConceptDeclarations: Allowed +BreakBeforeInlineASMColon: OnlyMultiline +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterComma +ColumnLimit: 120 +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: true +IndentExternBlock: Indent +IndentGotoLabels: false +IndentRequiresClause: true +IndentWidth: 4 +IndentWrappedFunctionNames: true +InsertBraces: false +InsertNewlineAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: false +LambdaBodyIndentation: Signature +NamespaceIndentation: All +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 4 +ObjCBreakBeforeNestedBlockParam: false +ObjCSpaceAfterProperty: true +ObjCSpaceBeforeProtocolList: true +PPIndentWidth: -1 +PackConstructorInitializers: NextLine +QualifierAlignment: Leave +ReferenceAlignment: Right +RemoveSemicolon: false +RequiresClausePosition: WithPreceding +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Always +ShortNamespaceLines: 1 +SortIncludes: false +#SortUsingDeclarations: LexicographicNumeric +SortUsingDeclarations: true +SpaceAfterCStyleCast: true +SpaceAfterLogicalNot: false +SpaceAroundPointerQualifiers: Default +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInConditionalStatement: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +Standard: c++17 +TabWidth: 4 +UseTab: Never diff --git a/src/plugin-support.c.in b/src/plugin-support.c.in index acf56eef..44a2c1c7 100644 --- a/src/plugin-support.c.in +++ b/src/plugin-support.c.in @@ -23,17 +23,17 @@ const char *PLUGIN_VERSION = "@CMAKE_PROJECT_VERSION@"; void obs_log(int log_level, const char *format, ...) { - size_t length = 4 + strlen(PLUGIN_NAME) + strlen(format); + size_t length = 4 + strlen(PLUGIN_NAME) + strlen(format); - char *template = malloc(length + 1); + char *template = malloc(length + 1); - snprintf(template, length, "[%s] %s", PLUGIN_NAME, format); + snprintf(template, length, "[%s] %s", PLUGIN_NAME, format); - va_list(args); + va_list(args); - va_start(args, format); - blogva(log_level, template, args); - va_end(args); + va_start(args, format); + blogva(log_level, template, args); + va_end(args); - free(template); + free(template); } From bd1d6c7a6bb4aebbe249bc0540277de73c0ed981 Mon Sep 17 00:00:00 2001 From: Paul Peavyhouse Date: Mon, 18 Dec 2023 12:24:49 -0800 Subject: [PATCH 05/10] CI: Set Windows packaging to default to zip (#101) The current code either packages a .msi or generates a .zip. Many users prefer the zip, especially for portable installs. A zip also mitigates code signing warnings. This change always generates the .zip file. If -BuildInstaller is specified then it will also build a .msi file. --- .github/scripts/Package-Windows.ps1 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/scripts/Package-Windows.ps1 b/.github/scripts/Package-Windows.ps1 index 819fe54e..67b02093 100644 --- a/.github/scripts/Package-Windows.ps1 +++ b/.github/scripts/Package-Windows.ps1 @@ -64,10 +64,20 @@ function Package { Remove-Item @RemoveArgs + Log-Group "Archiving ${ProductName}..." + $CompressArgs = @{ + Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*") + CompressionLevel = 'Optimal' + DestinationPath = "${ProjectRoot}/release/${OutputName}.zip" + Verbose = ($Env:CI -ne $null) + } + Compress-Archive -Force @CompressArgs + Log-Group + if ( ( $BuildInstaller ) ) { Log-Group "Packaging ${ProductName}..." - $IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss" + $IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss" if ( ! ( Test-Path -Path $IsccFile ) ) { throw 'InnoSetup install script not found. Run the build script or the CMake build and install procedures first.' } @@ -79,18 +89,9 @@ function Package { Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer" Remove-Item -Path Package -Recurse Pop-Location -Stack BuildTemp - } else { - Log-Group "Archiving ${ProductName}..." - $CompressArgs = @{ - Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*") - CompressionLevel = 'Optimal' - DestinationPath = "${ProjectRoot}/release/${OutputName}.zip" - Verbose = ($Env:CI -ne $null) - } - Compress-Archive -Force @CompressArgs + Log-Group } - Log-Group } Package From bebefd4440386f954c9b1b8cd3240c4812050998 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Mon, 11 Dec 2023 18:24:54 +0100 Subject: [PATCH 06/10] CI: Expose detected plugin name to other workflow jobs --- .github/workflows/build-project.yaml | 14 ++++++++++++++ .github/workflows/push.yaml | 2 +- buildspec.json | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index 8f29b9a5..6425a51f 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -1,6 +1,10 @@ name: Build Project on: workflow_call: + outputs: + pluginName: + description: 'Project name detected by parsing build spec file' + value: ${{ jobs.check-event.outputs.pluginName }} jobs: check-event: name: Check GitHub Event Data 🔎 @@ -14,6 +18,7 @@ jobs: notarize: ${{ steps.setup.outputs.notarize }} config: ${{ steps.setup.outputs.config }} commitHash: ${{ steps.setup.outputs.commitHash }} + pluginName: ${{ steps.setup.outputs.pluginName }} steps: - uses: actions/checkout@v3 with: @@ -57,6 +62,15 @@ jobs: done echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT + plugin_name="$(grep 'name' buildspec.json | sed -E -e 's/^.+"name":[^"]+"(.+)",?$/\1/g')" + plugin_display_name="$(grep 'displayName' buildspec.json | sed -E -e 's/^.+"displayName":[^"]+"(.+)",?$/\1/g' || echo "")" + + if [[ "${plugin_display_name}" ]]; then + echo "pluginName=${plugin_display_name}" >> $GITHUB_OUTPUT + else + echo "pluginName=${plugin_name}" >> $GITHUB_OUTPUT + fi + macos-build: name: Build for macOS 🍏 runs-on: macos-13 diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 9e768551..58fe69bb 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -111,7 +111,7 @@ jobs: draft: true prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }} tag_name: ${{ steps.check.outputs.version }} - name: OBS Studio ${{ steps.check.outputs.version }} + name: ${{ needs.build-project.outputs.pluginName }} ${{ steps.check.outputs.version }} body_path: ${{ github.workspace }}/CHECKSUMS.txt files: | ${{ github.workspace }}/*.exe diff --git a/buildspec.json b/buildspec.json index d87180c8..b1948818 100644 --- a/buildspec.json +++ b/buildspec.json @@ -37,6 +37,7 @@ } }, "name": "obs-plugintemplate", + "displayName": "OBS Plugin Template", "version": "1.0.0", "author": "Your Name Here", "website": "https://example.com", From 23facd5acf7e65f7fecf16b26464f68c17688038 Mon Sep 17 00:00:00 2001 From: EZ64cool Date: Wed, 10 Jan 2024 09:40:07 +0000 Subject: [PATCH 07/10] Upgrade clang-format used in actions to 16 With a recent commit to .clang-format the minimum required version has now increased to 16. Without this clang-format will throw an error of ".clang-format:115:3: error: unknown enumerated scalar" --- .github/actions/run-clang-format/action.yaml | 8 ++++---- build-aux/.run-format.zsh | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/run-clang-format/action.yaml b/.github/actions/run-clang-format/action.yaml index b92910d7..9e873b4d 100644 --- a/.github/actions/run-clang-format/action.yaml +++ b/.github/actions/run-clang-format/action.yaml @@ -28,7 +28,7 @@ runs: echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH - echo "/home/linuxbrew/.linuxbrew/opt/clang-format@13/bin" >> $GITHUB_PATH + echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: @@ -51,11 +51,11 @@ runs: } if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) { - echo ::group::Install clang-format-13 - brew install --quiet obsproject/tools/clang-format@13 + echo ::group::Install clang-format-16 + brew install --quiet obsproject/tools/clang-format@16 echo ::endgroup:: - echo ::group::Run clang-format-13 + echo ::group::Run clang-format-16 ./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check echo ::endgroup:: } diff --git a/build-aux/.run-format.zsh b/build-aux/.run-format.zsh index a71fffff..a99ea911 100755 --- a/build-aux/.run-format.zsh +++ b/build-aux/.run-format.zsh @@ -29,23 +29,23 @@ invoke_formatter() { case ${1} { clang) - if (( ${+commands[clang-format-13]} )) { - local formatter=clang-format-13 + if (( ${+commands[clang-format-16]} )) { + local formatter=clang-format-16 } elif (( ${+commands[clang-format]} )) { local formatter=clang-format local -a formatter_version=($(clang-format --version)) - if ! is-at-least 13.0.1 ${formatter_version[-1]}; then - log_error "clang-format is not version 13.0.1 or above (found ${formatter_version[-1]}." + if ! is-at-least 16.0.5 ${formatter_version[-1]}; then + log_error "clang-format is not version 16.0.5 or above (found ${formatter_version[-1]}." exit 2 fi - if ! is-at-least ${formatter_version[-1]} 13.0.1; then - log_error "clang-format is more recent than version 13.0.1 (found ${formatter_version[-1]})." + if ! is-at-least ${formatter_version[-1]} 16.0.5; then + log_error "clang-format is more recent than version 16.0.5 (found ${formatter_version[-1]})." exit 2 fi } else { - log_error "No viable clang-format version found (required 13.0.1)" + log_error "No viable clang-format version found (required 16.0.5)" exit 2 } From 941b0f26949a2850e38c4630fce44eac4d49f054 Mon Sep 17 00:00:00 2001 From: SoraYuki Date: Mon, 13 Nov 2023 22:00:45 +0800 Subject: [PATCH 08/10] buildspec: Update OBS Studio dependency to 30.0.2 --- buildspec.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/buildspec.json b/buildspec.json index b1948818..6a29f1be 100644 --- a/buildspec.json +++ b/buildspec.json @@ -1,33 +1,33 @@ { "dependencies": { "obs-studio": { - "version": "29.1.2", + "version": "30.0.2", "baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags", "label": "OBS sources", "hashes": { - "macos": "215f1fa5772c5dd9f3d6e35b0cb573912b00320149666a77864f9d305525504b", - "windows-x64": "46d451f3f42b9d2c59339ec268165849c7b7904cdf1cc2a8d44c015815a9e37d" + "macos": "be12c3ad0a85713750d8325e4b1db75086223402d7080d0e3c2833d7c5e83c27", + "windows-x64": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7" } }, "prebuilt": { - "version": "2023-04-12", + "version": "2023-11-03", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built obs-deps", "hashes": { - "macos": "9535c6e1ad96f7d49960251e85a245774088d48da1d602bb82f734b10219125a", - "windows-x64": "c13a14a1acc4224b21304d97b63da4121de1ed6981297e50496fbc474abc0503" + "macos": "90c2fc069847ec2768dcc867c1c63b112c615ed845a907dc44acab7a97181974", + "windows-x64": "d0825a6fb65822c993a3059edfba70d72d2e632ef74893588cf12b1f0d329ce6" } }, "qt6": { - "version": "2023-04-12", + "version": "2023-11-03", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built Qt6", "hashes": { - "macos": "eb7614544ab4f3d2c6052c797635602280ca5b028a6b987523d8484222ce45d1", - "windows-x64": "4d39364b8a8dee5aa24fcebd8440d5c22bb4551c6b440ffeacce7d61f2ed1add" + "macos": "ba4a7152848da0053f63427a2a2cb0a199af3992997c0db08564df6f48c9db98", + "windows-x64": "bc57dedf76b47119a6dce0435a2f21b35b08c8f2948b1cb34a157320f77732d1" }, "debugSymbols": { - "windows-x64": "f34ee5067be19ed370268b15c53684b7b8aaa867dc800b68931df905d679e31f" + "windows-x64": "fd8ecd1d8cd2ef049d9f4d7fb5c134f784836d6020758094855dfa98bd025036" } } }, From 42c8b4fa29b275ae19bce8091ea6506021f450ca Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Wed, 10 Jan 2024 00:20:41 -0500 Subject: [PATCH 09/10] cmake: Move common variables to an inherited preset Move ENABLE_FRONTEND_API and ENABLE_QT from individual presets to a common preset that is hidden but inherited by the individual presets. --- CMakePresets.json | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index fc86c17c..9ffee7a8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -6,10 +6,19 @@ "patch": 0 }, "configurePresets": [ + { + "name": "template", + "hidden": true, + "cacheVariables": { + "ENABLE_FRONTEND_API": false, + "ENABLE_QT": false + } + }, { "name": "macos", "displayName": "macOS Universal", "description": "Build for macOS 11.0+ (Universal binary)", + "inherits": ["template"], "binaryDir": "${sourceDir}/build_macos", "condition": { "type": "equals", @@ -22,9 +31,7 @@ "QT_VERSION": "6", "CMAKE_OSX_DEPLOYMENT_TARGET": "11.0", "CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}", - "CODESIGN_TEAM": "$penv{CODESIGN_TEAM}", - "ENABLE_FRONTEND_API": false, - "ENABLE_QT": false + "CODESIGN_TEAM": "$penv{CODESIGN_TEAM}" } }, { @@ -41,6 +48,7 @@ "name": "windows-x64", "displayName": "Windows x64", "description": "Build for Windows x64", + "inherits": ["template"], "binaryDir": "${sourceDir}/build_x64", "condition": { "type": "equals", @@ -52,9 +60,7 @@ "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { "QT_VERSION": "6", - "CMAKE_SYSTEM_VERSION": "10.0.18363.657", - "ENABLE_FRONTEND_API": false, - "ENABLE_QT": false + "CMAKE_SYSTEM_VERSION": "10.0.18363.657" } }, { @@ -70,6 +76,7 @@ "name": "linux-x86_64", "displayName": "Linux x86_64", "description": "Build for Linux x86_64", + "inherits": ["template"], "binaryDir": "${sourceDir}/build_x86_64", "condition": { "type": "equals", @@ -80,9 +87,7 @@ "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { "QT_VERSION": "6", - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "ENABLE_FRONTEND_API": false, - "ENABLE_QT": false + "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, { @@ -99,6 +104,7 @@ "name": "linux-aarch64", "displayName": "Linux aarch64", "description": "Build for Linux aarch64", + "inherits": ["template"], "binaryDir": "${sourceDir}/build_aarch64", "condition": { "type": "equals", @@ -109,9 +115,7 @@ "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { "QT_VERSION": "6", - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "ENABLE_FRONTEND_API": false, - "ENABLE_QT": false + "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, { From 68e9fcdd23643bbc2dda099168cab65c1a9f9a0f Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Mon, 29 Jan 2024 14:57:32 -0500 Subject: [PATCH 10/10] CI: Update first-party GitHub Actions from v3 to v4 GitHub Actions has deprecated Actions based on node16. The v4 actions are based on node20. Replace first-party v3 actions with their v4 counterparts. See: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/ --- .github/workflows/build-project.yaml | 24 ++++++++++++------------ .github/workflows/check-format.yaml | 4 ++-- .github/workflows/push.yaml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index 6425a51f..93e57c8d 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -20,7 +20,7 @@ jobs: commitHash: ${{ steps.setup.outputs.commitHash }} pluginName: ${{ steps.setup.outputs.pluginName }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check Event Data ☑️ @@ -79,7 +79,7 @@ jobs: run: shell: zsh --no-rcs --errexit --pipefail {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -104,7 +104,7 @@ jobs: print "pluginName=${product_name}" >> $GITHUB_OUTPUT print "pluginVersion=${product_version}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: ccache-cache with: path: ${{ github.workspace }}/.ccache @@ -149,13 +149,13 @@ jobs: codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }} - name: Upload Artifacts 📡 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }} path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal.* - name: Upload Debug Symbol Artifacts 🪲 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ needs.check-event.outputs.config == 'Release' }} with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}-dSYMs @@ -169,7 +169,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -186,7 +186,7 @@ jobs: echo "pluginName=${product_name}" >> $GITHUB_OUTPUT echo "pluginVersion=${product_version}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: ccache-cache with: path: ${{ github.workspace }}/.ccache @@ -211,19 +211,19 @@ jobs: config: ${{ needs.check-event.outputs.config }} - name: Upload Source Tarball 🗜️ - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }} path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-source.* - name: Upload Artifacts 📡 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }} path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-x86_64*.* - name: Upload debug symbol artifacts 🪲 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ fromJSON(needs.check-event.outputs.package) }} with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym @@ -237,7 +237,7 @@ jobs: run: shell: pwsh steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -271,7 +271,7 @@ jobs: package: ${{ fromJSON(needs.check-event.outputs.package) }} - name: Upload Artifacts 📡 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }} path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.* diff --git a/.github/workflows/check-format.yaml b/.github/workflows/check-format.yaml index bbb3aa2a..e30b916f 100644 --- a/.github/workflows/check-format.yaml +++ b/.github/workflows/check-format.yaml @@ -5,7 +5,7 @@ jobs: clang-format: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: clang-format check 🐉 @@ -17,7 +17,7 @@ jobs: cmake-format: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: cmake-format check 🎛️ diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 58fe69bb..64ec703e 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -59,7 +59,7 @@ jobs: esac - name: Download Build Artifacts 📥 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 if: fromJSON(steps.check.outputs.validTag) id: download