-
Notifications
You must be signed in to change notification settings - Fork 165
75 lines (74 loc) · 2.49 KB
/
codeql.yml
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
# Do not modify!
# This file was generated from a template using https://github.com/apple/pkl
name: CodeQL
'on':
pull_request:
paths:
- '**.cs'
- '**.cpp'
- '**.hpp'
- '**.csproj'
- .github/workflows/codeql.yml
branches:
- main
push:
branches:
- main
env:
REALM_DISABLE_ANALYTICS: true
concurrency:
group: codeql-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
analyze-csharp:
name: Analyze C#
permissions:
actions: read
contents: read
security-events: write
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Initialize CodeQL
uses: github/codeql-action/init@a57c67b89589d2d13d5ac85a9fc4679c7539f94c
with:
languages: csharp
config: |-
queries:
- uses: security-and-quality
query-filters:
- exclude:
id: cs/call-to-unmanaged-code
- exclude:
id: cs/unmanaged-code
- name: Setup JDK
uses: actions/setup-java@2e74cbce18569d23ca8b812590dbb83f13ac7c5a
with:
distribution: microsoft
java-version: 17
- name: Setup Android
uses: android-actions/setup-android@e1f5280adf78cf863c0fa43ffabc64a9cd08153f
- name: Install SDK platform 21
run: sdkmanager --install "platforms;android-21"
- uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59
with:
dotnet-version: 8.0.x
- name: Setup workloads
run: dotnet workload install tvos ios maccatalyst android
- name: Add msbuild to PATH
if: ${{ runner.os == 'Windows' }}
uses: microsoft/setup-msbuild@70b70342ae97ca98d5eaad06cafd26d30f9592a9
- name: Build Realm/Realm
run: msbuild Realm/Realm -restore -p:Configuration=Release -p:UseSharedCompilation=false
- name: Build Realm/Realm.PlatformHelpers
run: msbuild Realm/Realm.PlatformHelpers -restore -p:Configuration=Release -p:UseSharedCompilation=false
- name: Build Realm/Realm.UnityUtils
run: msbuild Realm/Realm.UnityUtils -restore -p:Configuration=Release -p:UseSharedCompilation=false
- name: Build Realm/Realm.UnityWeaver
run: msbuild Realm/Realm.UnityWeaver -restore -p:Configuration=Release -p:UseSharedCompilation=false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a57c67b89589d2d13d5ac85a9fc4679c7539f94c