forked from obsproject/obs-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (100 loc) · 3.9 KB
/
analyze-project.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Analyze Project
on:
workflow_call:
jobs:
windows:
name: Windows 🪟 (PVS-Studio)
runs-on: windows-2022
if: github.repository_owner == 'obsproject'
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build OBS Studio 🧱
uses: ./.github/actions/build-obs
env:
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }}
RESTREAM_HASH: ${{ secrets.RESTREAM_HASH }}
YOUTUBE_CLIENTID: ${{ secrets.YOUTUBE_CLIENTID }}
YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
GPU_PRIORITY_VAL: ${{ secrets.GPU_PRIORITY_VAL }}
with:
target: x64
config: Debug
- name: Run PVS-Studio Analysis
uses: ./.github/actions/windows-analysis
with:
pvsUsername: ${{ secrets.PVS_NAME }}
pvsKey: ${{ secrets.PVS_KEY }}
target: x64
config: Debug
macos:
name: macOS 🍏 (clang-analyze)
runs-on: macos-14
defaults:
run:
shell: zsh --no-rcs --errexit --pipefail {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set Up Code Signing 🔑
uses: ./.github/actions/setup-macos-codesigning
id: codesign
with:
codesignIdentity: ${{ secrets.MACOS_SIGNING_IDENTITY }}
codesignCertificate: ${{ secrets.MACOS_SIGNING_CERT }}
certificatePassword: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
keychainPassword: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
provisioningProfile: ${{ secrets.MACOS_SIGNING_PROVISIONING_PROFILE }}
notarizationUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
notarizationPassword: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
- name: Build OBS Studio 🧱
env:
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }}
RESTREAM_HASH: ${{ secrets.RESTREAM_HASH }}
YOUTUBE_CLIENTID: ${{ secrets.YOUTUBE_CLIENTID }}
YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
CODESIGN_IDENT: ${{ steps.codesign.outputs.codesignIdent }}
CODESIGN_TEAM: ${{ steps.codesign.outputs.codesignTeam }}
PROVISIONING_PROFILE: ${{ steps.codesign.outputs.provisioningProfileUUID }}
run: |
: Run macOS Build
local -a build_args=(
--config Debug
--target macos-arm64
--codesign
--analyze
)
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
git fetch origin --no-tags --no-recurse-submodules -q
.github/scripts/build-macos ${build_args}
- name: Compile Analytics Data 📊
run: |
: Compile Analytics Data 📊
local analytics_root='${{ github.workspace }}/analytics'
local -a analytics_files=(${analytics_root}/StaticAnalyzer/obs-studio/**/*.plist)
for file (${analytics_files}) {
mv ${file} ${analytics_root}/${${file:t}//plist/sarif}
}
pushd ${analytics_root}
npx @microsoft/sarif-multitool merge *.sarif
popd
- name: Upload SARIF report files 📦
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "${{ github.workspace }}/analytics/merged.sarif"
category: 'clang-analyze (macOS Apple Silicon)'