Skip to content

Commit ab06128

Browse files
authored
Update MinGW GitHub action to cover more compiler versions (#307)
1 parent 27a4d44 commit ab06128

4 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/copilot-instructions.md

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

2020
## General Guidelines
2121

22-
- **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/DirectXTK/wiki/Implementation). The library's public API requires C++11, and the project builds with C++17 (`CMAKE_CXX_STANDARD 17`). The command-line tools also use C++17, including `<filesystem>` for long file path support. This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, or MinGW 12.2.
22+
- **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/DirectXMesh/wiki/Implementation). The library's public API requires C++11, and the project builds with C++17 (`CMAKE_CXX_STANDARD 17`). The command-line tools also use C++17, including `<filesystem>` for long file path support. This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, and GCC on Linux or Windows.
2323
> Notable `.editorconfig` rules: C/C++ files use 4-space indentation, `crlf` line endings, and `latin1` charset — avoid non-ASCII characters in source files.
2424
- **Documentation**: The project provides documentation in the form of wiki pages available at [Documentation](https://github.com/microsoft/DirectXMesh/wiki/).
2525
- **Error Handling**: Use C++ exceptions for error handling and uses RAII smart pointers to ensure resources are properly managed. For some functions that return HRESULT error codes, they are marked `noexcept`, use `std::nothrow` for memory allocation, and should not throw exceptions.
2626
- **Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxmeshtest/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxmeshtest/wiki). See [test copilot instructions](https://github.com/walbourn/directxmeshtest/blob/main/.github/copilot-instructions.md) for additional information on the tests.
2727
- **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. Functions that read input from geometry files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files.
2828
- **Dependencies**: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath and DirectX-Headers. The project can be built without these dependencies, relying on the Windows SDK for core functionality.
29-
- **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 a subset of unit tests, and static code analysis including GitHub super-linter, CodeQL, and MSVC Code Analysis.
29+
- **Continuous Integration**: This project implements GitHub Actions for continuous integration, ensuring that all code changes are tested and validated before merging. Platforms tested include Windows (MSVC, clang-cl, MinGW), Windows on ARM64, Xbox, UWP, and WSL (Linux). This includes building the project for a number of configurations and toolsets, running a subset of unit tests, and static code analysis including GitHub super-linter, CodeQL, and MSVC Code Analysis.
3030
- **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.
3131

3232
## File Structure
@@ -267,7 +267,7 @@ The following symbols are not custom error codes, but aliases for `HRESULT_FROM_
267267

268268
When reviewing code, focus on the following aspects:
269269

270-
- Adherence to coding standards defined in `.editorconfig` and on the [wiki](https://github.com/microsoft/DirectXTK/wiki/Implementation).
270+
- Adherence to coding standards defined in `.editorconfig` and on the [wiki](https://github.com/microsoft/DirectXMesh/wiki/Implementation).
271271
- Make coding recommendations based on the *C++ Core Guidelines*.
272272
- Proper use of RAII and smart pointers.
273273
- Correct error handling practices and C++ Exception safety.

.github/workflows/mingw.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ permissions:
3939

4040
jobs:
4141
build:
42-
runs-on: windows-2022
43-
4442
strategy:
4543
fail-fast: false
4644

4745
matrix:
4846
build_type: [x64-Debug-MinGW, x64-Release-MinGW]
4947
shared: ['OFF', 'ON']
48+
os: [windows-2022, windows-2025]
49+
50+
runs-on: ${{ matrix.os }}
5051

5152
steps:
5253
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -104,4 +105,4 @@ jobs:
104105
105106
- name: 'Build'
106107
working-directory: ${{ github.workspace }}
107-
run: cmake --build out\build\${{ matrix.build_type }}
108+
run: cmake --build out/build/${{ matrix.build_type }}

CMakePresets.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@
305305

306306
{ "name": "x64-Debug-Linux", "description": "WSL Linux x64 (Debug)", "inherits": [ "base", "x64", "Debug", "VCPKG" ] },
307307
{ "name": "x64-Release-Linux", "description": "WSL Linux x64 (Release)", "inherits": [ "base", "x64", "Release", "VCPKG" ] },
308-
{ "name": "arm64-Debug-Linux", "description": "WSL Linux ARM64 (Debug)", "inherits": [ "base", "ARM64", "Debug", "VCPKG" ] },
309-
{ "name": "arm64-Release-Linux", "description": "WSL Linux ARM64 (Release)", "inherits": [ "base", "ARM64", "Release", "VCPKG" ] },
308+
{ "name": "arm64-Debug-Linux", "description": "WSL Linux AArch64 (Debug)", "inherits": [ "base", "ARM64", "Debug", "VCPKG" ] },
309+
{ "name": "arm64-Release-Linux", "description": "WSL Linux AArch64 (Release)", "inherits": [ "base", "ARM64", "Release", "VCPKG" ] },
310310

311311
{ "name": "x64-Debug-ICC" , "description": "Intel Classic Compiler (Debug) with DX12", "inherits": [ "base", "x64", "Debug", "Intel" ] },
312312
{ "name": "x64-Release-ICC" , "description": "Intel Classic Compiler (Release) with DX12", "inherits": [ "base", "x64", "Release", "Intel" ] },
@@ -342,6 +342,11 @@
342342
{ "name": "x86-Debug-MinGW" , "configurePreset": "x86-Debug-MinGW" },
343343
{ "name": "x86-Release-MinGW" , "configurePreset": "x86-Release-MinGW" },
344344

345+
{ "name": "x64-Debug-Linux", "configurePreset": "x64-Debug-Linux" },
346+
{ "name": "x64-Release-Linux", "configurePreset": "x64-Release-Linux" },
347+
{ "name": "arm64-Debug-Linux", "configurePreset": "arm64-Debug-Linux" },
348+
{ "name": "arm64-Release-Linux", "configurePreset": "arm64-Release-Linux" },
349+
345350
{ "name": "x64-Debug-ICC" , "configurePreset": "x64-Debug-ICC" },
346351
{ "name": "x64-Release-ICC", "configurePreset": "x64-Release-ICC" },
347352

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Copyright (c) Microsoft Corporation.
1010

1111
This package contains DirectXMesh, a shared source library for performing various geometry content processing operations including generating normals and tangent frames, triangle adjacency computations, vertex cache optimization, and meshlet generation.
1212

13-
This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, or MinGW 12.2. Use of the Windows 10 May 2020 Update SDK ([19041](https://walbourn.github.io/windows-10-may-2020-update-sdk/)) or later is required for Visual Studio. It can also be built for Windows Subsystem for Linux using GCC 11 or later.
13+
This code is designed to build with Visual Studio 2022, Visual Studio 2026, or clang for Windows v12 or later, or MinGW. Use of the Windows 10 May 2020 Update SDK ([19041](https://walbourn.github.io/windows-10-may-2020-update-sdk/)) or later is required for Visual Studio. It can also be built for Windows Subsystem for Linux using GCC 12 or later.
1414

1515
These components are designed to work without requiring any content from the legacy DirectX SDK. For details, see [Where is the DirectX SDK?](https://aka.ms/dxsdk).
1616

@@ -70,6 +70,8 @@ FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DirectXMesh/s
7070

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

73+
* The *directxmesh_desktop_win10* and *directxmesh_uwp* NuGet packages are deprecated. The best way to integrate the latest DirectXMesh into your C++ project is using [vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/directxmesh).
74+
7375
* The CMake projects require 3.21 or later.
7476

7577
* Starting with the May 2026 release, the functions `OptimizeFaces`, `OptimizeFacesLRU`, `OptimizeFacesEx`, and `OptimizeFacesLRUEx` now take an `nVerts` parameter in order to validate the input indices. This is a *breaking change*.
@@ -139,4 +141,6 @@ Thanks to Matt Hurliman for his contribution of the meshlet generation functions
139141

140142
Thanks to Adrian Stone (Game Angst) for the public domain implementation of Tom Forsyth's linear-speed vertex cache optimization, and thanks to Tom Forsyth for his contribution.
141143

142-
Thanks to Andrew Farrier and Scott Matloff for their on-going help with code reviews.
144+
Thanks to Andrew Farrier, Jon Martin, and Scott Matloff for their help with code reviews.
145+
146+
Thanks to Shawn Hargreaves and Nada Ouf for their continued support for this library.

0 commit comments

Comments
 (0)