mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
Add SDL build pipeline (#412)
This commit is contained in:
parent
53ba375fbf
commit
3aebd48c6f
@ -498,7 +498,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219")
|
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4711" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34)
|
||||||
list(APPEND WarningsEXE "/wd5262" "/wd5264")
|
list(APPEND WarningsEXE "/wd5262" "/wd5264")
|
||||||
endif()
|
endif()
|
||||||
|
@ -812,7 +812,7 @@ HRESULT DirectX::CaptureTexture(
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BYTE* pData;
|
BYTE* pData = nullptr;
|
||||||
hr = pStaging->Map(0, nullptr, reinterpret_cast<void**>(&pData));
|
hr = pStaging->Map(0, nullptr, reinterpret_cast<void**>(&pData));
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
101
build/DirectXTex-SDL.yml
Normal file
101
build/DirectXTex-SDL.yml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# Copyright (c) Microsoft Corporation.
|
||||||
|
# Licensed under the MIT License.
|
||||||
|
#
|
||||||
|
# http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
|
|
||||||
|
# Runs various SDL recommended tools on the code.
|
||||||
|
|
||||||
|
schedules:
|
||||||
|
- cron: "0 3 * * 0,3,5"
|
||||||
|
displayName: 'Three times a week'
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- main
|
||||||
|
|
||||||
|
trigger: none
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: self
|
||||||
|
type: git
|
||||||
|
ref: refs/heads/main
|
||||||
|
|
||||||
|
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
|
||||||
|
|
||||||
|
variables:
|
||||||
|
VS_GENERATOR: 'Visual Studio 17 2022'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: windows-2022
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: SDL_BUILD
|
||||||
|
displayName: 'Build using required SDL tools'
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
clean: true
|
||||||
|
fetchTags: false
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: 'NPM install'
|
||||||
|
inputs:
|
||||||
|
versionSpec: 14.x
|
||||||
|
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
|
||||||
|
displayName: 'Run Credential Scanner'
|
||||||
|
inputs:
|
||||||
|
debugMode: false
|
||||||
|
folderSuppression: false
|
||||||
|
- task: PoliCheck@2
|
||||||
|
displayName: 'Run PoliCheck'
|
||||||
|
inputs:
|
||||||
|
result: PoliCheck.xml
|
||||||
|
- task: Armory@2
|
||||||
|
displayName: Run ARMory
|
||||||
|
- task: CMake@1
|
||||||
|
displayName: 'CMake (MSVC): Config x64'
|
||||||
|
inputs:
|
||||||
|
cwd: '$(Build.SourcesDirectory)'
|
||||||
|
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON'
|
||||||
|
- task: Semmle@1
|
||||||
|
displayName: 'Run CodeQL (Semmle) (C++)'
|
||||||
|
env:
|
||||||
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||||
|
inputs:
|
||||||
|
sourceCodeDirectory: '$(Build.SourcesDirectory)'
|
||||||
|
language: 'cpp'
|
||||||
|
querySuite: 'Recommended'
|
||||||
|
timeout: '1800'
|
||||||
|
ram: '16384'
|
||||||
|
addProjectDirToScanningExclusionList: true
|
||||||
|
buildCommandsString: '"%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat" && msbuild $(Build.SourcesDirectory)/out/DirectXTex.sln /p:Configuration=Release'
|
||||||
|
- task: CMake@1
|
||||||
|
displayName: 'CMake (MSVC): Build x64 Release'
|
||||||
|
inputs:
|
||||||
|
cwd: '$(Build.SourcesDirectory)'
|
||||||
|
cmakeArgs: --build out -v --config RelWithDebInfo
|
||||||
|
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
|
||||||
|
displayName: 'Run AntiMalware'
|
||||||
|
inputs:
|
||||||
|
InputType: 'Basic'
|
||||||
|
ScanType: 'CustomScan'
|
||||||
|
FileDirPath: $(Agent.BuildDirectory)
|
||||||
|
EnableSERVICEs: true
|
||||||
|
SupportLogOnError: false
|
||||||
|
TreatSignatureUpdateFailureAs: 'Warning'
|
||||||
|
SignatureFreshness: 'OneDay'
|
||||||
|
TreatStaleSignatureAs: 'Error'
|
||||||
|
condition: always()
|
||||||
|
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
|
||||||
|
displayName: 'Run BinSkim'
|
||||||
|
inputs:
|
||||||
|
AnalyzeTargetBinskim: ''
|
||||||
|
AnalyzeTargetGlob: +:file|out\bin\**\RelWithDebInfo\*.exe
|
||||||
|
AnalyzeVerbose: true
|
||||||
|
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
|
||||||
|
displayName: 'Post Analysis'
|
||||||
|
inputs:
|
||||||
|
GdnBreakAllTools: true
|
||||||
|
GdnBreakPolicy: 'Microsoft'
|
||||||
|
GdnBreakPolicyMinSev: 'Error'
|
||||||
|
- task: ComponentGovernanceComponentDetection@0
|
||||||
|
displayName: Component Detection
|
Loading…
x
Reference in New Issue
Block a user