|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# http://go.microsoft.com/fwlink/?LinkID=615560 |
| 5 | + |
| 6 | +# Runs various SDL recommended tools on the code. |
| 7 | + |
| 8 | +schedules: |
| 9 | +- cron: "0 3 * * 0,3,5" |
| 10 | + displayName: 'Three times a week' |
| 11 | + branches: |
| 12 | + include: |
| 13 | + - main |
| 14 | + |
| 15 | +trigger: none |
| 16 | +pr: none |
| 17 | + |
| 18 | +resources: |
| 19 | + repositories: |
| 20 | + - repository: self |
| 21 | + type: git |
| 22 | + ref: refs/heads/main |
| 23 | + |
| 24 | +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) |
| 25 | + |
| 26 | +variables: |
| 27 | + VS_GENERATOR: 'Visual Studio 17 2022' |
| 28 | + GITHUB_PAT: $(GITHUBPUBLICTOKEN) |
| 29 | + |
| 30 | +pool: |
| 31 | + vmImage: windows-2022 |
| 32 | + |
| 33 | +jobs: |
| 34 | +- job: SDL_BUILD |
| 35 | + displayName: 'Build using required SDL tools' |
| 36 | + workspace: |
| 37 | + clean: all |
| 38 | + steps: |
| 39 | + - checkout: self |
| 40 | + clean: true |
| 41 | + fetchTags: false |
| 42 | + - task: NodeTool@0 |
| 43 | + displayName: 'NPM install' |
| 44 | + inputs: |
| 45 | + versionSpec: 14.x |
| 46 | + - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3 |
| 47 | + displayName: 'Run Credential Scanner' |
| 48 | + inputs: |
| 49 | + debugMode: false |
| 50 | + folderSuppression: false |
| 51 | + - task: PoliCheck@2 |
| 52 | + displayName: 'Run PoliCheck' |
| 53 | + inputs: |
| 54 | + result: PoliCheck.xml |
| 55 | + - task: CmdLine@2 |
| 56 | + displayName: Fetch Tests |
| 57 | + inputs: |
| 58 | + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests |
| 59 | + - task: Armory@2 |
| 60 | + displayName: Run ARMory |
| 61 | + - task: CMake@1 |
| 62 | + displayName: 'CMake (MSVC): Config x64' |
| 63 | + inputs: |
| 64 | + cwd: '$(Build.SourcesDirectory)/Tests/headertest' |
| 65 | + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out' |
| 66 | + - task: Semmle@1 |
| 67 | + displayName: 'Run CodeQL (Semmle) (C++)' |
| 68 | + env: |
| 69 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 70 | + inputs: |
| 71 | + sourceCodeDirectory: '$(Build.SourcesDirectory)' |
| 72 | + language: 'cpp' |
| 73 | + querySuite: 'Recommended' |
| 74 | + timeout: '1800' |
| 75 | + ram: '16384' |
| 76 | + addProjectDirToScanningExclusionList: true |
| 77 | + buildCommandsString: '"%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" && msbuild $(Build.SourcesDirectory)/Tests/headertest/out/headertest.sln /p:Configuration=Release' |
| 78 | + - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2 |
| 79 | + displayName: 'Post Analysis' |
| 80 | + inputs: |
| 81 | + GdnBreakAllTools: true |
| 82 | + GdnBreakPolicy: 'Microsoft' |
| 83 | + GdnBreakPolicyMinSev: 'Error' |
| 84 | + - task: ComponentGovernanceComponentDetection@0 |
| 85 | + displayName: Component Detection |
0 commit comments