|
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 | | -# |
12 | 1 | name: "CodeQL" |
13 | 2 |
|
14 | 3 | on: |
15 | 4 | push: |
16 | 5 | branches: [ "master" ] |
17 | 6 | pull_request: |
18 | | - # The branches below must be a subset of the branches above |
19 | 7 | branches: [ "master" ] |
20 | 8 | schedule: |
21 | 9 | - cron: '18 17 * * 5' |
22 | 10 |
|
23 | 11 | jobs: |
24 | 12 | analyze: |
25 | | - name: Analyze |
26 | 13 | runs-on: windows-latest |
27 | 14 | permissions: |
28 | 15 | actions: read |
29 | 16 | contents: read |
30 | 17 | security-events: write |
31 | | - |
32 | 18 | strategy: |
33 | 19 | fail-fast: false |
34 | 20 | matrix: |
35 | 21 | 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 |
38 | 22 |
|
39 | 23 | steps: |
40 | | - - name: Checkout repository |
41 | | - uses: actions/checkout@v3 |
| 24 | + - uses: actions/checkout@v3 |
42 | 25 |
|
43 | | - # Initializes the CodeQL tools for scanning. |
44 | 26 | - name: Initialize CodeQL |
45 | | - uses: github/codeql-action/init@v3 |
| 27 | + uses: github/codeql-action/init@v3 |
46 | 28 | with: |
47 | 29 | 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 |
91 | 30 |
|
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 |
96 | 32 | 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 |
101 | 36 |
|
102 | 37 | - name: Perform CodeQL Analysis |
103 | 38 | uses: github/codeql-action/analyze@v3 |
0 commit comments