Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ 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.
skills/ # Published CoPilot skills for use by developers.
Tests/ # Tests are designed to be cloned from a separate repository at this location.
wiki/ # Local clone of the GitHub wiki documentation repository.
```
Expand Down Expand Up @@ -515,24 +516,4 @@ When reviewing code, focus on the following aspects:

## Release Process

1. Ensure all changes are merged into the `main` branch and that all tests pass.
2. Git pull the local repository to ensure it is up to date with the `main` branch.
3. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release.
4. Edit the `CHANGELOG.md` file to update it with a summary of changes.
5. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding.
6. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified.
7. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.
8. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
9. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
10. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet package.
11. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.
12. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed.
13. Run the MSCodeHub pipeline to publish the NuGet package to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.
14. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
15. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`.
16. Test the VCPKG port using all appropriate triplets and features.
17. Run `.\vcpkg --x-add-version directxmath` to update the VCPKG versioning history.
18. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers.
19. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review.

> When fully completed, be sure to update the GitHub release with links to the matching NuGet packages and the VCPKG port.
The release process is documented in the [release skill](.github/skills/release/SKILL.md). Invoke the `release` skill for step-by-step guidance when performing a release.
71 changes: 71 additions & 0 deletions .github/skills/release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Release Process
description: Guide for performing the DirectXMath release process. Use this skill when asked to help with releasing a new version, publishing packages, or updating ports.
---

# Release Process

## Prerequisites

- All changes merged into the `main` branch with all tests passing.
- GPG signing configured for your GitHub account (for verified tags).
- Access to the MSCodeHub mirror repository and Azure DevOps pipelines.
- Local repository:
- VCPKG at `d:\vcpkg` (synced with `main` branch)
- PATs will be needed for scripts that access GitHub and ADO.

<!-- markdownlint-disable MD029 -->
## Steps

### Phase 1: Prepare Release

1. Git pull the local repository to ensure it is up to date with the `main` branch.
2. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release.
3. Edit the `CHANGELOG.md` file to update it with a summary of changes.
4. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding.

### Phase 2: Tag and Create GitHub Release

5. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified.
6. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.

### Phase 3: MSCodeHub and Signed Binaries

7. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
8. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
9. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet package.

### Phase 4: Source Archive Signing

10. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences.
11. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.

### Phase 5: NuGet Validation and Publishing

12. Download the NuGet package from the ADO pipeline build, and review it with a local project or using NuGet Package Explorer.
13. Upload the nupkg to nuget.org via the website.

### Phase 6: VCPKG Port Update

14. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
15. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`.
16. Test the VCPKG port using the script at `assets/vcpkgdxmath.cmd` (in this skill folder). Copy it to `d:\vcpkg` and run from there after bootstrapping VCPKG.
17. Run `.\vcpkg x-add-version directxmath` to update the VCPKG versioning history.
18. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers.

### Phase 7: Windows SDK Update

19. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review.

### Phase 8: Finalize

When fully completed, be sure to update the GitHub release with links to the matching NuGet packages and the VCPKG port.

## Key Scripts

| Script | Purpose |
| --- | --- |
| `build\preparerelease.ps1` | Creates topic branch, updates version numbers and changelog stub |
| `build\completerelease.ps1` | Sets tags, creates GitHub release from changelog |
| `build\updatevcpkg.ps1` | Updates DirectXMath VCPKG port files |
| `assets\vcpkgdxmath.cmd` | Tests VCPKG port across all triplets and features |
210 changes: 210 additions & 0 deletions .github/skills/release/assets/vcpkgdxmath.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
@set VCPKG_BINARY_SOURCES=clear
@set VCPKG_ROOT=%cd%
@if %1.==xbox. goto xbox
@if %1.==clang. goto clang
.\vcpkg install directxmath:x86-windows
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x86-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:x86-windows-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x86-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:x86-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-windows
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:x64-windows-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:x64-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-windows
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:arm64-windows-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11,dx12]:arm64-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x86-uwp
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x86-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x86-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x86-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-uwp
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x64-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-uwp
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:arm64-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:arm64-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:arm64-uwp --recurse
@if errorlevel 1 goto error
@where /Q x86_64-w64-mingw32-g++.exe
@if errorlevel 1 goto skipgcc64
.\vcpkg install directxmath:x64-mingw-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x64-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-mingw-static --recurse
@if errorlevel 1 goto error
:skipgcc64
@where /Q i686-w64-mingw32-g++.exe
@if errorlevel 1 goto skipgcc32
.\vcpkg install directxmath:x86-mingw-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x86-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x86-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x86-mingw-static --recurse
@if errorlevel 1 goto error
:skipgcc32
@if "%GXDKLatest%."=="." goto finish
:xbox
.\vcpkg install directxmath:x64-xbox-scarlett
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-xbox-scarlett --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-xbox-scarlett --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-xbox-scarlett-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-xbox-scarlett-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-xbox-xboxone
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-xbox-xboxone --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-xbox-xboxone --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-xbox-xboxone-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-xbox-xboxone-static --recurse
@if errorlevel 1 goto error
@goto finish
:clang
.\vcpkg install directxmath:x64-clangcl-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-clangcl-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-clangcl-uwp
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-clangcl-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:x64-clangcl-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-clangcl-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-clangcl-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:arm64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:arm64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:arm64-clangcl-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:arm64-clangcl-uwp
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:arm64-clangcl-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx11]:arm64-clangcl-uwp --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:arm64-clangcl-uwp --recurse
@if errorlevel 1 goto error
@if "%GXDKLatest%."=="." goto finish
.\vcpkg install directxmath:x64-clangcl-scarlett
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-clangcl-scarlett --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-scarlett --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-clangcl-scarlett-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-scarlett-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-clangcl-xboxone
@if errorlevel 1 goto error
.\vcpkg install directxmath[xdsp]:x64-clangcl-xboxone --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-xboxone --recurse
@if errorlevel 1 goto error
.\vcpkg install directxmath:x64-clangcl-xboxone-static
@if errorlevel 1 goto error
.\vcpkg install directxmath[dx12]:x64-clangcl-xboxone-static --recurse
@if errorlevel 1 goto error
:finish
@echo SUCCEEDED
@if %1.==xbox. goto eof
@if %1.==clang. goto eof
@echo .
@echo . Run on x64-linux and arm64-linux
@echo . ./vcpkg install directxmath
@echo . ./vcpkg install directxmath[xdsp] --recurse
@echo . ./vcpkg install directxmath[dx12] --recurse
@where /Q x86_64-w64-mingw32-g++.exe
@if NOT errorlevel 1 goto gcc64
@echo .
@echo . Run for MinGW64
@echo . .\vcpkg install directxmath:x64-mingw-static
@echo . .\vcpkg install directxmath[xdsp]:x64-mingw-static --recurse
@echo . .\vcpkg install directxmath[dx11]:x64-mingw-static --recurse
@echo . .\vcpkg install directxmath[dx12]:x64-mingw-static --recurse
:gcc64
@where /Q i686-w64-mingw32-g++.exe
@if NOT errorlevel 1 goto gcc32
@echo .
@echo . Run for MinGW32
@echo . .\vcpkg install directxmath:x86-mingw-static
@echo . .\vcpkg install directxmath[xdsp]:x86-mingw-static --recurse
@echo . .\vcpkg install directxmath[dx11]:x86-mingw-static --recurse
@echo . .\vcpkg install directxmath[dx12]:x86-mingw-static --recurse
:gcc32
@goto eof
:error
@echo FAILED
:eof
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Initialize CodeQL
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: c-cpp
build-mode: manual
Expand All @@ -72,6 +72,6 @@ jobs:
run: cmake --build out/build/x64-Debug

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
category: "/language:c-cpp"
2 changes: 1 addition & 1 deletion .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ jobs:

# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
/wiki
/out
/CMakeUserPresets.json
!**/skills/**
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ These components are designed to work without requiring any content from the leg

* Contains miscellaneous build files and scripts.

* ``skills\``

* Contains published CoPilot skills for use by developers.

## Documentation

Documentation is available on the [Microsoft Docs](https://docs.microsoft.com/en-us/windows/desktop/dxmath/directxmath-portal). Additional information can be found on the [project wiki](https://github.com/microsoft/DirectXMath/wiki).
Expand Down
Loading
Loading