From 99bf779695a8f4eb0bc46286a6104512495fd363 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 15 Jul 2025 21:07:19 -0700 Subject: [PATCH 1/5] GitHub Actions using Windows on ARM64 native --- .github/linters/actionlint.yml | 4 ++ .github/workflows/arm64.yml | 62 ++++++++++++++++++++++++++++++ .github/workflows/arm64test.yml | 68 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 +- CMakePresets.json | 11 ------ 5 files changed, 135 insertions(+), 12 deletions(-) create mode 100644 .github/linters/actionlint.yml create mode 100644 .github/workflows/arm64.yml create mode 100644 .github/workflows/arm64test.yml diff --git a/.github/linters/actionlint.yml b/.github/linters/actionlint.yml new file mode 100644 index 0000000..8f70803 --- /dev/null +++ b/.github/linters/actionlint.yml @@ -0,0 +1,4 @@ +self-hosted-runner: + # Workaround until linter is updated + labels: + - windows-11-arm diff --git a/.github/workflows/arm64.yml b/.github/workflows/arm64.yml new file mode 100644 index 0000000..28275fd --- /dev/null +++ b/.github/workflows/arm64.yml @@ -0,0 +1,62 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +name: 'CMake (Windows on ARM64)' + +on: + push: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.nuget/*' + - build/*.ps1 + pull_request: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.nuget/*' + - build/*.ps1 + +permissions: + contents: read + +jobs: + build: + runs-on: windows-11-arm + + strategy: + fail-fast: false + + matrix: + build_type: [arm64-Debug, arm64-Release] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Clone test repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: walbourn/directxmathtest + path: Tests + ref: main + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: arm64 + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out/build/${{ matrix.build_type }} diff --git a/.github/workflows/arm64test.yml b/.github/workflows/arm64test.yml new file mode 100644 index 0000000..d2d7abc --- /dev/null +++ b/.github/workflows/arm64test.yml @@ -0,0 +1,68 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +name: 'CTest (arm64)' + +on: + push: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.nuget/*' + - build/*.ps1 + pull_request: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.nuget/*' + - build/*.ps1 + +permissions: + contents: read + +jobs: + build: + runs-on: windows-11-arm + timeout-minutes: 20 + + strategy: + fail-fast: false + + matrix: + build_type: [arm64-Debug, arm64-Release] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Clone test repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: walbourn/directxmathtest + path: Tests + ref: main + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: arm64 + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out/build/${{ matrix.build_type }} + + - timeout-minutes: 10 + name: 'Test' + working-directory: ${{ github.workspace }} + run: ctest --preset=${{ matrix.build_type }} --output-on-failure diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f01f7c9..30fdb2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ # # http://go.microsoft.com/fwlink/?LinkID=615560 -name: 'CTest (Windows)' +name: 'CTest (x64)' on: push: diff --git a/CMakePresets.json b/CMakePresets.json index ab5817b..43259e0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -29,15 +29,6 @@ "cacheVariables": { "DXMATH_ARCHITECTURE": "x86" }, "hidden": true }, - { - "name": "ARM", - "architecture": { - "value": "arm", - "strategy": "external" - }, - "cacheVariables": { "DXMATH_ARCHITECTURE": "arm" }, - "hidden": true - }, { "name": "ARM64", "architecture": { @@ -188,8 +179,6 @@ { "name": "x64-Release" , "description": "MSVC for x64 (Release) - SSE/SSE2", "inherits": [ "base", "x64", "Release", "MSVC" ] }, { "name": "x86-Debug" , "description": "MSVC for x86 (Debug) - SSE/SSE2", "inherits": [ "base", "x86", "Debug", "MSVC" ] }, { "name": "x86-Release" , "description": "MSVC for x86 (Release) - SSE/SSE2", "inherits": [ "base", "x86", "Release", "MSVC" ] }, - { "name": "arm-Debug" , "description": "MSVC for ARM (Debug) - ARM-NEON", "inherits": [ "base", "ARM", "Debug", "MSVC" ] }, - { "name": "arm-Release" , "description": "MSVC for ARM (Release) - ARM-NEON", "inherits": [ "base", "ARM", "Release", "MSVC" ] }, { "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) - ARM-NEON", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] }, { "name": "arm64-Release" , "description": "MSVC for ARM64 (Release) - ARM-NEON", "inherits": [ "base", "ARM64", "Release", "MSVC" ] }, { "name": "arm64ec-Debug" , "description": "MSVC for ARM64EC (Debug) - ARM-NEON", "inherits": [ "base", "ARM64EC", "Debug", "MSVC" ] }, From cf464e3c1e803770849541043a15d5404564ff24 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 17 Jul 2025 20:07:15 -0700 Subject: [PATCH 2/5] windows-2019 retired for ADO --- .../DirectXMath-GitHub-CMake-Dev17.yml | 3 +- .../pipelines/DirectXMath-GitHub-CMake.yml | 34 ++++--------------- .../pipelines/DirectXMath-GitHub-Dev17.yml | 10 ------ .azuredevops/pipelines/DirectXMath-GitHub.yml | 20 +---------- 4 files changed, 8 insertions(+), 59 deletions(-) diff --git a/.azuredevops/pipelines/DirectXMath-GitHub-CMake-Dev17.yml b/.azuredevops/pipelines/DirectXMath-GitHub-CMake-Dev17.yml index 25392fa..741443b 100644 --- a/.azuredevops/pipelines/DirectXMath-GitHub-CMake-Dev17.yml +++ b/.azuredevops/pipelines/DirectXMath-GitHub-CMake-Dev17.yml @@ -3,7 +3,7 @@ # # http://go.microsoft.com/fwlink/?LinkID=615560 -# Builds the library and test suite using CMake with VS Generator (GitHub Actions covers Ninja) +# Builds the library and test suite using CMake using VS Generator (GitHub Actions covers Ninja) schedules: - cron: "0 0 * * *" @@ -30,7 +30,6 @@ resources: - repository: self type: git ref: refs/heads/main - trigger: none - repository: testRepo name: walbourn/directxmathtest type: github diff --git a/.azuredevops/pipelines/DirectXMath-GitHub-CMake.yml b/.azuredevops/pipelines/DirectXMath-GitHub-CMake.yml index d5f4ef9..9d9ae46 100644 --- a/.azuredevops/pipelines/DirectXMath-GitHub-CMake.yml +++ b/.azuredevops/pipelines/DirectXMath-GitHub-CMake.yml @@ -50,11 +50,11 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) variables: Codeql.Enabled: false - VS_GENERATOR: 'Visual Studio 16 2019' + VS_GENERATOR: 'Visual Studio 17 2022' WIN10_SDK: '10.0.19041.0' pool: - vmImage: windows-2019 + vmImage: windows-2022 jobs: - job: CMAKE_BUILD @@ -77,7 +77,7 @@ jobs: inputs: cwd: '$(Build.SourcesDirectory)' cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -G "$(VS_GENERATOR)" -T v142 -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: CMake (Build x64) inputs: @@ -88,7 +88,7 @@ jobs: inputs: cwd: Tests cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -G "$(VS_GENERATOR)" -T v142 -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: CMake Test (Build x64) inputs: @@ -99,7 +99,7 @@ jobs: inputs: cwd: '$(Build.SourcesDirectory)' cmakeArgs: > - -G "$(VS_GENERATOR)" -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -G "$(VS_GENERATOR)" -T v142 -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: CMake (Build ARM64) inputs: @@ -110,31 +110,9 @@ jobs: inputs: cwd: Tests cmakeArgs: > - -G "$(VS_GENERATOR)" -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -G "$(VS_GENERATOR)" -T v142 -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: CMake Test (Build ARM64) inputs: cwd: Tests cmakeArgs: --build out2 -v - - task: CMake@1 - displayName: CMake (ClangCl) - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - - task: CMake@1 - displayName: CMake (Build) - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out3 -v - - task: CMake@1 - displayName: CMake Test (ClangCL) - inputs: - cwd: Tests - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - - task: CMake@1 - displayName: CMake Test (Build) - inputs: - cwd: Tests - cmakeArgs: --build out3 -v diff --git a/.azuredevops/pipelines/DirectXMath-GitHub-Dev17.yml b/.azuredevops/pipelines/DirectXMath-GitHub-Dev17.yml index 44c3c97..2bc7666 100644 --- a/.azuredevops/pipelines/DirectXMath-GitHub-Dev17.yml +++ b/.azuredevops/pipelines/DirectXMath-GitHub-Dev17.yml @@ -67,7 +67,6 @@ jobs: Debug_x86: BuildPlatform: x86 BuildConfiguration: Debug - steps: - checkout: self clean: true @@ -84,7 +83,6 @@ jobs: displayName: Build solution math3_2022.sln inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' msbuildArchitecture: x64 @@ -92,7 +90,6 @@ jobs: displayName: Build solution math3_2022.sln no-intrinsics inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'NI $(BuildConfiguration)' msbuildArchitecture: x64 @@ -100,7 +97,6 @@ jobs: displayName: Build solution math3_2022.sln SSE3 inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'SSE3 $(BuildConfiguration)' msbuildArchitecture: x64 @@ -109,7 +105,6 @@ jobs: displayName: Build solution math3_2022.sln SSE4 inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'SSE4 $(BuildConfiguration)' msbuildArchitecture: x64 @@ -118,7 +113,6 @@ jobs: displayName: Build solution math3_2022.sln AVX inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'AVX $(BuildConfiguration)' msbuildArchitecture: x64 @@ -127,7 +121,6 @@ jobs: displayName: Build solution math3_2022.sln AVX2 inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'AVX2 $(BuildConfiguration)' msbuildArchitecture: x64 @@ -136,7 +129,6 @@ jobs: displayName: Build solution math3_2022.sln x87 inputs: solution: Tests/math3/math3_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: 'x87 $(BuildConfiguration)' msbuildArchitecture: x64 @@ -182,7 +174,6 @@ jobs: displayName: Build solution shmath_2022.sln inputs: solution: Tests/shmath/shmath_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' msbuildArchitecture: x64 @@ -190,7 +181,6 @@ jobs: displayName: Build solution XDSPTest_2022 inputs: solution: Tests/xdsp/XDSPTest_2022.sln - vsVersion: 17.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' msbuildArchitecture: x64 diff --git a/.azuredevops/pipelines/DirectXMath-GitHub.yml b/.azuredevops/pipelines/DirectXMath-GitHub.yml index e95c9b3..463d8fd 100644 --- a/.azuredevops/pipelines/DirectXMath-GitHub.yml +++ b/.azuredevops/pipelines/DirectXMath-GitHub.yml @@ -36,7 +36,7 @@ resources: name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) pool: - vmImage: windows-2019 + vmImage: windows-2022 variables: Codeql.Enabled: true @@ -76,49 +76,42 @@ jobs: displayName: Build solution math3_2019.sln inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln no-intrinsics inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'NI $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln SSE3 inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'SSE3 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln SSE4 inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'SSE4 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln AVX inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'AVX $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln AVX2 inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'AVX2 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2019.sln x87 inputs: solution: Tests/math3/math3_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'x87 $(BuildConfiguration)' condition: eq(variables['BuildPlatform'], 'x86') @@ -157,14 +150,12 @@ jobs: displayName: Build solution shmath_2019.sln inputs: solution: Tests/shmath/shmath_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution XDSPTest_2019 inputs: solution: Tests/xdsp/XDSPTest_2019.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' @@ -201,49 +192,42 @@ jobs: displayName: Build solution math3_2017.sln inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln no-intrinsics inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'NI $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln SSE3 inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'SSE3 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln SSE4 inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'SSE4 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln AVX inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'AVX $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln AVX2 inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'AVX2 $(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution math3_2017.sln x86dbg x87 inputs: solution: Tests/math3/math3_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: 'x87 $(BuildConfiguration)' condition: eq(variables['BuildPlatform'], 'x86') @@ -282,13 +266,11 @@ jobs: displayName: Build solution shmath_2017.sln inputs: solution: Tests/shmath/shmath_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' - task: VSBuild@1 displayName: Build solution XDSPTest_2017 inputs: solution: Tests/xdsp/XDSPTest_2017.sln - vsVersion: 16.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' From e0e56fa3131e57f542e61527b3d63d08a29eefc5 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 19 Jul 2025 15:00:56 -0700 Subject: [PATCH 3/5] Update armt ets --- .github/workflows/arm64test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arm64test.yml b/.github/workflows/arm64test.yml index d2d7abc..0644004 100644 --- a/.github/workflows/arm64test.yml +++ b/.github/workflows/arm64test.yml @@ -35,7 +35,7 @@ jobs: fail-fast: false matrix: - build_type: [arm64-Debug, arm64-Release] + build_type: [arm64-Release] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 From bcd0e40e99f598d802fb2cbcd6e029348f029c29 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 19 Jul 2025 17:19:25 -0700 Subject: [PATCH 4/5] Remove v141 from ADO tests --- .azuredevops/pipelines/DirectXMath-GitHub.yml | 116 ------------------ 1 file changed, 116 deletions(-) diff --git a/.azuredevops/pipelines/DirectXMath-GitHub.yml b/.azuredevops/pipelines/DirectXMath-GitHub.yml index 463d8fd..217b54c 100644 --- a/.azuredevops/pipelines/DirectXMath-GitHub.yml +++ b/.azuredevops/pipelines/DirectXMath-GitHub.yml @@ -158,119 +158,3 @@ jobs: solution: Tests/xdsp/XDSPTest_2019.sln platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' - - - job: BUILD_LEGACY - displayName: 'Visual Studio 2019 (v141) Legacy' - strategy: - maxParallel: 4 - matrix: - Release_x64: - BuildPlatform: x64 - BuildConfiguration: Release - Debug_x64: - BuildPlatform: x64 - BuildConfiguration: Debug - Release_x86: - BuildPlatform: x86 - BuildConfiguration: Release - Debug_x86: - BuildPlatform: x86 - BuildConfiguration: Debug - steps: - - checkout: self - clean: true - fetchTags: false - fetchDepth: 1 - path: 's' - - checkout: testRepo - displayName: Fetch Tests - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/Tests' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: '$(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln no-intrinsics - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'NI $(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln SSE3 - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'SSE3 $(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln SSE4 - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'SSE4 $(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln AVX - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'AVX $(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln AVX2 - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'AVX2 $(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution math3_2017.sln x86dbg x87 - inputs: - solution: Tests/math3/math3_2017.sln - platform: '$(BuildPlatform)' - configuration: 'x87 $(BuildConfiguration)' - condition: eq(variables['BuildPlatform'], 'x86') - - - job: BUILD_EXTS_LEGACY - displayName: 'Visual Studio 2019 (v141) Legacy - SHMath and XDSP' - cancelTimeoutInMinutes: 1 - strategy: - maxParallel: 1 - matrix: - Release_x64: - BuildPlatform: x64 - BuildConfiguration: Release - Debug_x64: - BuildPlatform: x64 - BuildConfiguration: Debug - Release_x86: - BuildPlatform: x86 - BuildConfiguration: Release - Debug_x86: - BuildPlatform: x86 - BuildConfiguration: Debug - steps: - - checkout: self - clean: true - fetchTags: false - fetchDepth: 1 - path: 's' - - checkout: testRepo - displayName: Fetch Tests - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/Tests' - - task: VSBuild@1 - displayName: Build solution shmath_2017.sln - inputs: - solution: Tests/shmath/shmath_2017.sln - platform: '$(BuildPlatform)' - configuration: '$(BuildConfiguration)' - - task: VSBuild@1 - displayName: Build solution XDSPTest_2017 - inputs: - solution: Tests/xdsp/XDSPTest_2017.sln - platform: '$(BuildPlatform)' - configuration: '$(BuildConfiguration)' From fc4ddd020a9cb949aabd609267562a05a07dec3f Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 22 Jul 2025 15:16:13 -0700 Subject: [PATCH 5/5] Add CoPilot instructions --- .github/copilot-instructions.md | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..450e744 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,85 @@ +# GitHub Copilot Instructions + +These instructions define how GitHub Copilot should assist with this project. The goal is to ensure consistent, high-quality code generation aligned with our conventions, stack, and best practices. + +## Context + +- **Project Type**: Math Library / DirectX / Direct3D +- **Project Name**: DirectXMath SIMD C++ linear algebra library +- **Language**: C++ +- **Framework / Libraries**: STL / CMake / CTest + +## Getting Started + +- See the Getting Started guide on [Microsoft Learn](https://learn.microsoft.com/windows/win32/dxmath/pg-xnamath-getting-started). +- The recommended way to integrate *DirectXMath* into your project is by using the *vcpkg* Package Manager. +- You can make use of the nuget.org package **directxmath**. +- You can also use the library source code directly in your project or as a git submodule. +- The Windows SDK includes the DirectXMath library, although that version is not as up-to-date as other integration methods. + +## General Guidelines + +- **Code Style**: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in `.editorconfig` for indentation, line endings, and other formatting. Additional information can be found on the wiki at [Implementation](https://github.com/microsoft/DirectXMath/wiki/Implementation). The code requires C++11/C++14 features. +- **Documentation**: The project provides documentation on [Microsoft Learn](https://learn.microsoft.com/windows/win32/dxmath/directxmath-portal) with additional wiki pages available on [GitHub](https://github.com/microsoft/DirectXMath/wiki/). +- **Error Handling**: The majority of functions have no error conditions and do not throw C++ exceptions which is why they are marked `noexcept`. A few functions have `bool` results to indicate success or failure. +- **Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxmathtest/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxmathtest/wiki). +- **Security**: This project uses secure coding practices from the Microsoft Secure Coding Guidelines, and is subject to the `SECURITY.md` file in the root of the repository. +- **Dependencies**: The project has minimal dependencies, primarily relying on compiler intrinsics. It is designed to be self-contained and portable across different platforms and toolsets. +- **Continuous Integration**: This project implements GitHub Actions for continuous integration, ensuring that all code changes are tested and validated before merging. This includes building the project for a number of configurations and toolsets, running unit tests, and static code analysis including GitHub super-linter, CodeQL, and MSVC Code Analysis. +- **Code of Conduct**: The project adheres to the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). All contributors are expected to follow this code of conduct in all interactions related to the project. + +## File Structure + +```txt +.azuredevops/ # Azure DevOps pipeline configuration and policy files. +.github/ # GitHub Actions workflow files and linter configuration files. +.nuget/ # NuGet package configuration files. +build/ # Miscellaneous build files and scripts. +Inc/ # DirectXMath public and implementation files. The library is header-only, so all files are in this directory. +Extensions/ # Extensions to the DirectXMath library with standalone SSE-level specific functions for runtime selection of SIMD instruction set. +MatrixStack/ # D3DX9-like matrix stack implementation for DirectXMath. +SHMath/ # Spherical harmonic functions using DirectXMath. +Stereo3D/ # Stereo 3D projection matrix functions using DirectXMath created for HoloLens. +XDSP/ # Digital Signal Processing (DSP) functions using DirectXMath. +Tests/ # Tests are designed to be cloned from a separate repository at this location. +``` + +> The `Extensions` are not needed if building the library using `/arch:AVX` or `/arch:AVX2` which causes the DirectXMath library to build utilizing the additional SIMD instructions. + +## References + +- [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) +- [Microsoft Secure Coding Guidelines](https://learn.microsoft.com/en-us/security/develop/secure-coding-guidelines) +- [CMake Documentation](https://cmake.org/documentation/) +- [VCPK Documentation](https://learn.microsoft.com/vcpkg/) +- [DirectXMath Documentation](https://learn.microsoft.com/windows/win32/dxmath/directxmath-portal) +- [DirectXMath Wiki](https://github.com/microsoft/DirectXMath/wiki/) +- [Games for Windows and the DirectX SDK blog - March 2012](https://walbourn.github.io/introducing-directxmath/) + +## No speculation + +When creating documentation: + +### Document Only What Exists + +- Only document features, patterns, and decisions that are explicitly present in the source code. +- Only include configurations and requirements that are clearly specified. +- Do not make assumptions about implementation details. + +### Handle Missing Information + +- Ask the user questions to gather missing information. +- Document gaps in current implementation or specifications. +- List open questions that need to be addressed. + +### Source Material + +- Always cite the specific source file and line numbers for documented features. +- Link directly to relevant source code when possible. +- Indicate when information comes from requirements vs. implementation. + +### Verification Process + +- Review each documented item against source code whenever related to the task. +- Remove any speculative content. +- Ensure all documentation is verifiable against the current state of the codebase.