Skip to content

Commit 9f9b6ad

Browse files
Update codeql.yml
Simplified for .NET 4.8
1 parent bef713f commit 9f9b6ad

File tree

1 file changed

+6
-71
lines changed

1 file changed

+6
-71
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,38 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
154
push:
165
branches: [ "master" ]
176
pull_request:
18-
# The branches below must be a subset of the branches above
197
branches: [ "master" ]
208
schedule:
219
- cron: '18 17 * * 5'
2210

2311
jobs:
2412
analyze:
25-
name: Analyze
2613
runs-on: windows-latest
2714
permissions:
2815
actions: read
2916
contents: read
3017
security-events: write
31-
3218
strategy:
3319
fail-fast: false
3420
matrix:
3521
language: [ 'csharp' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3822

3923
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
24+
- uses: actions/checkout@v3
4225

43-
# Initializes the CodeQL tools for scanning.
4426
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
27+
uses: github/codeql-action/init@v3
4628
with:
4729
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
54-
55-
- name: Install .NET Framework 4.6
56-
# Install all (latest) SDKs which are used by multi framework projects
57-
run: choco install dotnet4.6
58-
59-
- name: Install .NET Framework 4.6.1 Targeting Pack
60-
run: |
61-
# Install all (latest) SDKs which are used by multi framework projects
62-
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
63-
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
64-
$componentsToAdd = @(
65-
"Microsoft.Net.Component.4.6.1.TargetingPack"
66-
)
67-
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
68-
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
69-
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
70-
if ($process.ExitCode -eq 0)
71-
{
72-
Write-Host "components have been successfully added"
73-
}
74-
else
75-
{
76-
Write-Host "components were not installed"
77-
exit 1
78-
}
79-
80-
- name: Install .NET Framework 4.6.1
81-
# Install all (latest) SDKs which are used by multi framework projects
82-
run: choco install dotnet4.6.1
83-
84-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
85-
# If this step fails, then you should remove it and run the build manually (see below)
86-
# - name: Autobuild
87-
# uses: github/codeql-action/autobuild@v2
88-
89-
# ℹ️ Command-line programs to run using the OS shell.
90-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
9130

92-
# If the Autobuild fails above, remove it and uncomment the following three lines.
93-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
94-
95-
- name: Setup msbuild
31+
- name: Setup MSBuild
9632
uses: microsoft/setup-msbuild@v1.1
97-
98-
- name: Build openHistorian
99-
run: |
100-
msbuild Source/openHistorian.sln -t:restore,build -p:Configuration=Debug -p:RestorePackagesConfig=true -p:UseSharedCompilation=false -p:PostBuildEvent=
33+
34+
- name: Build solution
35+
run: msbuild Source/openHistorian.sln -t:restore,build -p:Configuration=Debug -p:UseSharedCompilation=false
10136

10237
- name: Perform CodeQL Analysis
10338
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)