Skip to content

Commit

Permalink
ADO pipeline changes for OpenSSF Best Practices (microsoft#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored May 17, 2024
1 parent adaff17 commit 8bda2a0
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ For the latest version of DirectXMath, bug reports, etc. please visit the projec

## Release Notes

FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DirectXMath/security/advisories).

For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DirectXMath/blob/main/CHANGELOG.md).

* The clang/LLVM toolset currently does not respect the ``float_control`` pragma for SSE instrinsics. Therefore, the use of ``/fp:fast`` is not recommended on clang/LLVM until this issue is fixed. See [55713](https://github.com/llvm/llvm-project/issues/55713).

## Support
Expand All @@ -96,6 +100,8 @@ This project welcomes contributions and suggestions. Most contributions require

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Tests for new features should also be submitted as a PR to the [Test Suite](https://github.com/walbourn/directxmathtest/wiki) repository.

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
Expand Down
24 changes: 20 additions & 4 deletions build/DirectXMath-GitHub-Dev17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,38 @@ schedules:
include:
- main

trigger: none
trigger:
branches:
include:
- main
paths:
exclude:
- '*.md'
- LICENSE
- CMake*
- '.nuget/*'
- build/*.cmake
- build/*.in

pr:
branches:
include:
- main
paths:
include:
- build/DirectXMath-GitHub-Dev17.yml
exclude:
- '*.md'
- LICENSE
- CMake*
- '.nuget/*'
- build/*.cmake
- build/*.in
drafts: false

resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

Expand Down
6 changes: 3 additions & 3 deletions build/DirectXMath-GitHub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ resources:

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

pool:
vmImage: windows-2019

variables:
Codeql.Enabled: false
GITHUB_PAT: $(GITHUBPUBLICTOKEN)

pool:
vmImage: windows-2019

jobs:
- job: BUILD_DEV16
displayName: 'Visual Studio 2019 (v142)'
Expand Down
48 changes: 47 additions & 1 deletion build/DirectXMath-SDL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ schedules:
- main

trigger: none
pr: none

pr:
branches:
include:
- main
paths:
include:
- build/DirectXMath-SDL.yml

resources:
repositories:
Expand All @@ -26,6 +33,7 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: true
Codeql.Language: cpp
VC_PATH: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
VS_GENERATOR: 'Visual Studio 17 2022'
GITHUB_PAT: $(GITHUBPUBLICTOKEN)

Expand Down Expand Up @@ -86,3 +94,41 @@ jobs:
GdnBreakPolicyMinSev: 'Error'
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection

- job: VC_PREFAST
displayName: 'Build using /analyze (PREFAST)'
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
- task: CmdLine@2
displayName: Fetch Tests
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
- task: CmdLine@2
displayName: Setup environment for CMake to use VS
inputs:
script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1
displayName: CMake Config
inputs:
cwd: '$(Build.SourcesDirectory)/Tests/headertest'
cmakeArgs: --preset=x64-Debug -DENABLE_CODE_ANALYSIS=ON
- task: CMake@1
displayName: CMake Build
inputs:
cwd: '$(Build.SourcesDirectory)/Tests/headertest'
cmakeArgs: --build out/build/x64-Debug

0 comments on commit 8bda2a0

Please sign in to comment.