Skip to content

Commit 9484059

Browse files
committed
test autobuild for csharp
1 parent 8b9989b commit 9484059

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

.github/workflows/codeql.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ jobs:
4646
- language: actions
4747
build-mode: none
4848
- language: csharp
49-
build-mode: none
49+
build-mode: autobuild
50+
# Using autobuild to improve analysis quality (dependency resolution).
51+
# If autobuild fails (Unity packages may not have .csproj files),
52+
# consider switching to 'none' and accepting lower quality metrics.
5053
# c-cpp and Swift analysis removed: Unity SDKs don't include build projects in the repo
5154
# (Unity generates Xcode/Android projects during build). CodeQL's C/C++ autobuilder
5255
# doesn't recognize .mm (Objective-C++) files as source files. The minimal native
@@ -66,8 +69,11 @@ jobs:
6669
# Add any setup steps before running the `github/codeql-action/init` action.
6770
# This includes steps like installing compilers or runtimes (`actions/setup-node`
6871
# or others). This is typically only required for manual builds.
69-
# - name: Setup runtime (example)
70-
# uses: actions/setup-example@v1
72+
- name: Setup .NET
73+
if: matrix.language == 'csharp'
74+
uses: actions/setup-dotnet@v5
75+
with:
76+
dotnet-version: "6.0.x"
7177

7278
# Initializes the CodeQL tools for scanning.
7379
- name: Initialize CodeQL
@@ -83,23 +89,6 @@ jobs:
8389
# Consider enabling security queries for better coverage:
8490
# queries: security-extended,security-and-quality
8591

86-
# If the analyze step fails for one of the languages you are analyzing with
87-
# "We were unable to automatically build your code", modify the matrix above
88-
# to set the build mode to "manual" for that language. Then modify this step
89-
# to build your code.
90-
# ℹ️ Command-line programs to run using the OS shell.
91-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
92-
- name: Run manual build steps
93-
if: matrix.build-mode == 'manual'
94-
shell: bash
95-
run: |
96-
echo 'If you are using a "manual" build mode for one or more of the' \
97-
'languages you are analyzing, replace this with the commands to build' \
98-
'your code, for example:'
99-
echo ' make bootstrap'
100-
echo ' make release'
101-
exit 1
102-
10392
- name: Perform CodeQL Analysis
10493
uses: github/codeql-action/analyze@v4
10594
with:

0 commit comments

Comments
 (0)