Skip to content

Commit 0405ccf

Browse files
authored
Add CoPilot skills (#708)
1 parent c016980 commit 0405ccf

16 files changed

Lines changed: 2452 additions & 31 deletions

File tree

.github/copilot-instructions.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ These instructions define how GitHub Copilot should assist with this project. Th
3131

3232
## File Structure
3333

34-
```txt
34+
```plaintext
3535
.azuredevops/ # Azure DevOps pipeline configuration and policy files.
3636
.github/ # GitHub Actions workflow files and linter configuration files.
3737
.nuget/ # NuGet package configuration files.
@@ -47,6 +47,7 @@ Texdiag/ # CLI tool for diagnosing and validating DDS texture files.
4747
DDSTextureLoader/ # Standalone version of the DDS texture loader for Direct3D 9/11/12.
4848
ScreenGrab/ # Standalone version of the screenshot capture utility for Direct3D 9/11/12.
4949
WICTextureLoader/ # Standalone version of the WIC texture loader for Direct3D 9/11/12.
50+
skills/ # Published CoPilot skills for use by developers.
5051
Tests/ # Tests are designed to be cloned from a separate repository at this location.
5152
wiki/ # Local clone of the GitHub wiki documentation repository.
5253
```
@@ -299,30 +300,4 @@ When reviewing documentation, do the following:
299300

300301
## Release Process
301302

302-
1. Ensure all changes are merged into the `main` branch and that all tests pass.
303-
2. Git pull the local repository to ensure it is up to date with the `main` branch.
304-
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.
305-
4. Edit the `CHANGELOG.md` file to update it with a summary of changes.
306-
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.
307-
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.
308-
7. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.
309-
8. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
310-
9. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
311-
10. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build signed binaries and the NuGet packages.
312-
11. Run the PowerShell script `build\downloadartifacts.ps1` to download the signed binaries from the Azure DevOps pipeline artifacts.
313-
12. Edit the GitHub release and upload the signed binaries to the release assets.
314-
13. 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.
315-
14. Validate the NuGet packages with <https://github.com/walbourn/contentexporter> by pushing the NuGet packages to a local Packages Source folder, updating the NuGet packages from that folder, and then build the project.
316-
15. 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.
317-
16. Run the MSCodeHub pipeline to publish the NuGet packages to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.
318-
17. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
319-
18. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXTex port in VCPKG with the new release version. This will edit the files in `ports\directxtex`.
320-
19. Test the VCPKG port using all appropriate triplets and features.
321-
20. Run `.\vcpkg --x-add-version directxtex` to update the VCPKG versioning history.
322-
21. Submit a PR to the VCPKG repository to update the DirectXTex port back to the main GitHub repo. The PR will be reviewed and merged by the VCPKG maintainers.
323-
22. If relevant changes were made to the `texassemble`, `texconv` or `texdiag` tools, update the winget manifests for those tools in the `winget` repository.
324-
- Git pull a local repository to `D:\winget-pkgs` in sync with the `master` branch of the WinGet repository.
325-
- Run the PowerShell script `build\updatewinget.ps1` to update the winget manifests for the tools with the new release version.
326-
- Submit a PR to the `winget` repository to update the manifests for each tool — they must be done as distinct PRs. The PRs will be reviewed and merged by the winget maintainers.
327-
328-
> When fully completed, be sure to update the GitHub release with links to the matching NuGet packages, the VCPKG port, and the winget manifests for the tools.
303+
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.

.github/skills/release/SKILL.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: Release Process
3+
description: Guide for performing the DirectXTex release process. Use this skill when asked to help with releasing a new version, publishing packages, or updating ports.
4+
---
5+
6+
# Release Process
7+
8+
## Prerequisites
9+
10+
- All changes merged into the `main` branch with all tests passing.
11+
- GPG signing configured for your GitHub account (for verified tags).
12+
- Access to the MSCodeHub mirror repository and Azure DevOps pipelines.
13+
- Local repositories:
14+
- VCPKG at `d:\vcpkg` (synced with `main` branch)
15+
- WinGet at `D:\winget-pkgs` (synced with `master` branch, only if tool updates needed)
16+
- PATs will be needed for scripts that access GitHub and ADO.
17+
18+
<!-- markdownlint-disable MD029 -->
19+
## Steps
20+
21+
### Phase 1: Prepare Release
22+
23+
1. Git pull the local repository to ensure it is up to date with the `main` branch.
24+
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.
25+
3. Edit the `CHANGELOG.md` file to update it with a summary of changes.
26+
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.
27+
28+
### Phase 2: Tag and Create GitHub Release
29+
30+
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.
31+
6. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.
32+
33+
### Phase 3: MSCodeHub and Signed Binaries
34+
35+
7. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
36+
8. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
37+
9. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build signed binaries and the NuGet packages.
38+
10. Run the PowerShell script `build\downloadbuild.ps1` to download the signed binaries from the Azure DevOps pipeline artifacts.
39+
11. Edit the GitHub release and upload the signed binaries to the release assets.
40+
41+
### Phase 4: Source Archive Signing
42+
43+
12. 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.
44+
13. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.
45+
46+
### Phase 5: NuGet Validation and Publishing
47+
48+
14. Validate the NuGet packages with <https://github.com/walbourn/contentexporter> by pushing the NuGet packages to a local Packages Source folder, updating the NuGet packages from that folder, and then build the project.
49+
15. Run the PowerShell script `build\promotenuget.ps1 -Version <version> -Release` to promote the version to the Release view on the project-scoped ADO feed. The `-Version` parameter is required and should match the NuGet package version (e.g., `2026.6.2.1`).
50+
16. Run the MSCodeHub pipeline to publish the NuGet packages to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.
51+
52+
### Phase 6: VCPKG Port Update
53+
54+
17. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
55+
18. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXTex port in VCPKG with the new release version. This will edit the files in `ports\directxtex`.
56+
If the port includes patches, review them to determine if they should be removed or updated for the new release (the `updatevcpkg.ps1` script will warn about this).
57+
19. Test the VCPKG port using the script at `assets/vcpkgdxtex.cmd` (in this skill folder). Copy it to `d:\vcpkg` and run from there after bootstrapping VCPKG.
58+
20. Run `.\vcpkg x-add-version directxtex` to update the VCPKG versioning history.
59+
21. Submit a PR to the VCPKG repository to update the DirectXTex port back to the main GitHub repo. The PR will be reviewed and merged by the VCPKG maintainers.
60+
61+
### Phase 7: WinGet Manifests (Conditional)
62+
63+
If relevant changes were made to the `texassemble`, `texconv` or `texdiag` tools:
64+
65+
22. Git pull a local repository to `D:\winget-pkgs` in sync with the `master` branch of the WinGet repository.
66+
23. Run the PowerShell script `build\updatewinget.ps1` to update the winget manifests for the tools with the new release version.
67+
24. Submit a PR to the `winget` repository to update the manifests for each tool — they must be done as distinct PRs. The PRs will be reviewed and merged by the winget maintainers.
68+
69+
### Phase 8: Finalize
70+
71+
When fully completed, be sure to update the GitHub release with links to the matching NuGet packages, the VCPKG port, and the winget manifests for the tools.
72+
73+
## Key Scripts
74+
75+
| Script | Purpose |
76+
| --- | --- |
77+
| `build\preparerelease.ps1` | Creates topic branch, updates version numbers and changelog stub |
78+
| `build\completerelease.ps1` | Sets tags, creates GitHub release from changelog |
79+
| `build\downloadbuild.ps1` | Downloads signed binaries from Azure DevOps |
80+
| `build\promotenuget.ps1` | Promotes NuGet package to Release view on ADO feed |
81+
| `build\updatevcpkg.ps1` | Updates DirectXTex VCPKG port files |
82+
| `assets\vcpkgdxtex.cmd` | Tests VCPKG port across all triplets and features |
83+
| `build\updatewinget.ps1` | Updates winget manifests for CLI tools |
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
@set VCPKG_BINARY_SOURCES=clear
2+
@set VCPKG_ROOT=%cd%
3+
@if %1.==xbox. goto xbox
4+
@if %1.==clang. goto clang
5+
.\vcpkg install directxtex[core]:x86-windows
6+
@if errorlevel 1 goto error
7+
.\vcpkg install directxtex:x86-windows --recurse
8+
@if errorlevel 1 goto error
9+
.\vcpkg install directxtex[tools]:x86-windows --recurse
10+
@if errorlevel 1 goto error
11+
.\vcpkg install directxtex[dx12]:x86-windows --recurse
12+
@if errorlevel 1 goto error
13+
.\vcpkg install directxtex[openexr,tools]:x86-windows --recurse
14+
@if errorlevel 1 goto error
15+
.\vcpkg install directxtex[spectre]:x86-windows --recurse
16+
@if errorlevel 1 goto error
17+
.\vcpkg install directxtex:x86-windows-static
18+
@if errorlevel 1 goto error
19+
.\vcpkg install directxtex:x86-windows-static-md
20+
@if errorlevel 1 goto error
21+
.\vcpkg install directxtex[core]:x64-windows
22+
@if errorlevel 1 goto error
23+
.\vcpkg install directxtex:x64-windows --recurse
24+
@if errorlevel 1 goto error
25+
.\vcpkg install directxtex[tools]:x64-windows --recurse
26+
@if errorlevel 1 goto error
27+
.\vcpkg install directxtex[dx12]:x64-windows --recurse
28+
@if errorlevel 1 goto error
29+
.\vcpkg install directxtex[openexr,tools]:x64-windows --recurse
30+
@if errorlevel 1 goto error
31+
.\vcpkg install directxtex[spectre]:x64-windows --recurse
32+
@if errorlevel 1 goto error
33+
.\vcpkg install directxtex:x64-windows-static
34+
@if errorlevel 1 goto error
35+
.\vcpkg install directxtex:x64-windows-static-md
36+
@if errorlevel 1 goto error
37+
.\vcpkg install directxtex:arm64-windows
38+
@if errorlevel 1 goto error
39+
.\vcpkg install directxtex[tools]:arm64-windows --recurse
40+
@if errorlevel 1 goto error
41+
.\vcpkg install directxtex[spectre]:arm64-windows --recurse
42+
@if errorlevel 1 goto error
43+
.\vcpkg install directxtex:arm64-windows-static
44+
@if errorlevel 1 goto error
45+
.\vcpkg install directxtex:arm64-windows-static-md
46+
@if errorlevel 1 goto error
47+
.\vcpkg install directxtex:arm64ec-windows
48+
@if errorlevel 1 goto error
49+
.\vcpkg install directxtex[tools]:arm64ec-windows --recurse
50+
@if errorlevel 1 goto error
51+
.\vcpkg install directxtex[spectre]:arm64ec-windows --recurse
52+
@if errorlevel 1 goto error
53+
.\vcpkg install directxtex:x86-uwp
54+
@if errorlevel 1 goto error
55+
.\vcpkg install directxtex:x64-uwp
56+
@if errorlevel 1 goto error
57+
.\vcpkg install directxtex:arm64-uwp
58+
@if errorlevel 1 goto error
59+
@where /Q x86_64-w64-mingw32-g++.exe
60+
@if errorlevel 1 goto skipgcc64
61+
.\vcpkg install directxtex:x64-mingw-dynamic
62+
@if errorlevel 1 goto error
63+
.\vcpkg install directxtex[dx12]:x64-mingw-dynamic --recurse
64+
@if errorlevel 1 goto error
65+
.\vcpkg install directxtex[tools]:x64-mingw-dynamic --recurse
66+
@if errorlevel 1 goto error
67+
.\vcpkg install directxtex:x64-mingw-static
68+
@if errorlevel 1 goto error
69+
.\vcpkg install directxtex[dx12]:x64-mingw-static --recurse
70+
@if errorlevel 1 goto error
71+
.\vcpkg install directxtex[tools]:x64-mingw-static --recurse
72+
@if errorlevel 1 goto error
73+
:skipgcc64
74+
@where /Q i686-w64-mingw32-g++.exe
75+
@if errorlevel 1 goto skipgcc32
76+
.\vcpkg install directxtex:x86-mingw-static
77+
@if errorlevel 1 goto :error
78+
.\vcpkg install directxtex[dx12]:x86-mingw-static --recurse
79+
@if errorlevel 1 goto :error
80+
.\vcpkg install directxtex[tools]:x86-mingw-static --recurse
81+
@if errorlevel 1 goto :error
82+
.\vcpkg install directxtex:x86-mingw-dynamic
83+
@if errorlevel 1 goto :error
84+
.\vcpkg install directxtex[dx12]:x86-mingw-dynamic --recurse
85+
@if errorlevel 1 goto :error
86+
.\vcpkg install directxtex[tools]:x86-mingw-dynamic --recurse
87+
@if errorlevel 1 goto :error
88+
:skipgcc32
89+
@if "%GXDKLatest%."=="." goto finish
90+
:xbox
91+
.\vcpkg install directxtex:x64-xbox-scarlett
92+
@if errorlevel 1 goto error
93+
.\vcpkg install directxtex:x64-xbox-scarlett-static
94+
@if errorlevel 1 goto error
95+
.\vcpkg install directxtex:x64-xbox-xboxone
96+
@if errorlevel 1 goto error
97+
.\vcpkg install directxtex:x64-xbox-xboxone-static
98+
@if errorlevel 1 goto error
99+
@if exist "%VCPKG_ROOT%\installed\x64-windows\include\DirectXTex.h" .\vcpkg remove directxtex:x64-windows
100+
@if errorlevel 1 goto error
101+
.\vcpkg install directxtex[xbox,tools]:x64-windows --recurse
102+
@if errorlevel 1 goto error
103+
@goto finish
104+
:clang
105+
.\vcpkg install directxtex[core]:x64-clangcl-dynamic
106+
@if errorlevel 1 goto error
107+
.\vcpkg install directxtex:x64-clangcl-dynamic --recurse
108+
@if errorlevel 1 goto error
109+
.\vcpkg install directxtex[tools]:x64-clangcl-dynamic --recurse
110+
@if errorlevel 1 goto error
111+
.\vcpkg install directxtex[dx12]:x64-clangcl-dynamic --recurse
112+
@if errorlevel 1 goto error
113+
.\vcpkg install directxtex:x64-clangcl-static
114+
@if errorlevel 1 goto error
115+
.\vcpkg install directxtex:arm64-clangcl-dynamic
116+
@if errorlevel 1 goto error
117+
.\vcpkg install directxtex[tools]:arm64-clangcl-dynamic --recurse
118+
@if errorlevel 1 goto error
119+
.\vcpkg install directxtex:arm64-clangcl-static
120+
@if errorlevel 1 goto error
121+
.\vcpkg install directxtex:x64-clangcl-uwp
122+
@if errorlevel 1 goto error
123+
.\vcpkg install directxtex:arm64-clangcl-uwp
124+
@if errorlevel 1 goto error
125+
@if "%GXDKLatest%."=="." goto finish
126+
.\vcpkg install directxtex:x64-clangcl-scarlett
127+
@if errorlevel 1 goto error
128+
.\vcpkg install directxtex:x64-clangcl-scarlett-static
129+
@if errorlevel 1 goto error
130+
.\vcpkg install directxtex:x64-clangcl-xboxone
131+
@if errorlevel 1 goto error
132+
.\vcpkg install directxtex:x64-clangcl-xboxone-static
133+
@if errorlevel 1 goto error
134+
@if exist "%VCPKG_ROOT%\installed\x64-clangcl-dynamic\include\DirectXTex.h" .\vcpkg remove directxtex:x64-clangcl-dynamic
135+
@if errorlevel 1 goto error
136+
.\vcpkg install directxtex[xbox,tools]:x64-clangcl-dynamic --recurse
137+
@if errorlevel 1 goto error
138+
:finish
139+
@echo SUCCEEDED
140+
@if %1.==xbox. goto eof
141+
@if %1.==clang. goto eof
142+
@echo .
143+
@echo . Run on x64-linux and arm64-linux
144+
@echo . ./vcpkg install directxtex
145+
@echo . ./vcpkg install directxtex[dx12] --recurse
146+
@echo . ./vcpkg install directxtex[openexr] --recurse
147+
@echo . ./vcpkg install directxtex[jpeg] --recurse
148+
@echo . ./vcpkg install directxtex[png] --recurse
149+
@where /Q x86_64-w64-mingw32-g++.exe
150+
@if NOT errorlevel 1 goto gcc64
151+
@echo .
152+
@echo . Run for MinGW64
153+
@echo . .\vcpkg install directxtex:x64-mingw-dynamic
154+
@echo . .\vcpkg install directxtex[dx12]:x64-mingw-dynamic --recurse
155+
@echo . .\vcpkg install directxtex[tools]:x64-mingw-dynamic --recurse
156+
@echo . .\vcpkg install directxtex:x64-mingw-static
157+
@echo . .\vcpkg install directxtex[dx12]:x64-mingw-static --recurse
158+
@echo . .\vcpkg install directxtex[tools]:x64-mingw-static --recurse
159+
:gcc64
160+
@where /Q i686-w64-mingw32-g++.exe
161+
@if NOT errorlevel 1 goto gcc32
162+
@echo .
163+
@echo . Run for MinGW32
164+
@echo . .\vcpkg install directxtex:x86-mingw-dynamic
165+
@echo . .\vcpkg install directxtex[dx12]:x86-mingw-dynamic --recurse
166+
@echo . .\vcpkg install directxtex[tools]:x86-mingw-dynamic --recurse
167+
@echo . .\vcpkg install directxtex:x86-mingw-static
168+
@echo . .\vcpkg install directxtex[dx12]:x86-mingw-static --recurse
169+
@echo . .\vcpkg install directxtex[tools]:x86-mingw-static --recurse
170+
:gcc32
171+
@goto eof
172+
:error
173+
@echo FAILED
174+
:eof

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
6262

6363
- name: Initialize CodeQL
64-
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
64+
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
6565
with:
6666
languages: c-cpp
6767
build-mode: manual
@@ -75,6 +75,6 @@ jobs:
7575
run: cmake --build out\build\x64-Debug
7676

7777
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
78+
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
7979
with:
8080
category: "/language:c-cpp"

.github/workflows/msvc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ jobs:
8585

8686
# Upload SARIF file to GitHub Code Scanning Alerts
8787
- name: Upload SARIF to GitHub
88-
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
88+
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
8989
with:
9090
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ x64
4848
/CMakeUserPresets.json
4949
/build/vcpkg_installed
5050
/build/*.exe
51+
!**/skills/**

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,26 @@ These components are designed to work without requiring any content from the leg
6767

6868
* Contains miscellaneous build files and scripts.
6969

70+
* ``skills\``
71+
72+
* Contains published CoPilot skills for use by developers.
73+
7074
## Documentation
7175

7276
Documentation is available on the [GitHub wiki](https://github.com/Microsoft/DirectXTex/wiki).
7377

78+
## CoPilot Usage
79+
80+
For CoPilot CLI assistance with using DirectXTex, try:
81+
82+
```bash
83+
winget install GitHub.Copilot
84+
winget install GitHub.cli
85+
gh skill install microsoft/directxtex
86+
copilot
87+
/skills list
88+
```
89+
7490
## Notices
7591

7692
All content and source code for this package are subject to the terms of the [MIT License](https://github.com/microsoft/DirectXTex/blob/main/LICENSE).

0 commit comments

Comments
 (0)