Skip to content

Commit e4ea402

Browse files
authored
September 4, 2024 (#152)
1 parent c37b79b commit e4ea402

9 files changed

Lines changed: 203 additions & 4 deletions

.github/workflows/wsl.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# https://go.microsoft.com/fwlink/?LinkID=324981
5+
6+
name: 'CMake (WSL)'
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
paths-ignore:
14+
- '*.md'
15+
- LICENSE
16+
- '.nuget/*'
17+
- build/*.cmd
18+
- build/*.props
19+
- build/*.ps1
20+
- build/*.targets
21+
- build/*.yml
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
fail-fast: false
29+
30+
matrix:
31+
build_type: [x64-Debug-Linux, x64-Release-Linux]
32+
gcc: [10, 11, 12]
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: seanmiddleditch/gha-setup-ninja@v5
38+
39+
- uses: lukka/run-vcpkg@v11
40+
with:
41+
runVcpkgInstall: true
42+
vcpkgJsonGlob: '**/build/vcpkg.json'
43+
vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da'
44+
45+
- name: 'Configure CMake'
46+
working-directory: ${{ github.workspace }}
47+
run: >
48+
cmake --preset=${{ matrix.build_type }}
49+
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
50+
-DVCPKG_TARGET_TRIPLET="x64-linux"
51+
52+
env:
53+
CC: gcc-${{ matrix.gcc }}
54+
CXX: g++-${{ matrix.gcc }}
55+
56+
- name: 'Build'
57+
working-directory: ${{ github.workspace }}
58+
run: cmake --build out/build/${{ matrix.build_type }}

.nuget/directxmesh_desktop_2019.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<description>This version is for Windows desktop applications using Visual Studio 2019 (16.11) or Visual Studio 2022 and supports Windows 7 / DirectX 11.
1111

1212
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.</description>
13-
<releaseNotes>Matches the June 4, 2024 release on GitHub.</releaseNotes>
13+
<releaseNotes>Matches the September 4, 2024 release on GitHub.</releaseNotes>
1414
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=324981</projectUrl>
1515
<repository type="git" url="https://github.com/microsoft/DirectXMesh.git" />
1616
<icon>images\icon.jpg</icon>

.nuget/directxmesh_desktop_win10.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<description>This version is for Windows desktop applications using Visual Studio 2019 (16.11) or Visual Studio 2022 and supports Windows 10 / Windows 11 including both DirectX 11 and DirectX 12.
1111

1212
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.</description>
13-
<releaseNotes>Matches the June 4, 2024 release on GitHub.</releaseNotes>
13+
<releaseNotes>Matches the September 4, 2024 release on GitHub.</releaseNotes>
1414
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=324981</projectUrl>
1515
<repository type="git" url="https://github.com/microsoft/DirectXMesh.git" />
1616
<icon>images\icon.jpg</icon>

.nuget/directxmesh_uwp.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<description>This version is for Universal Windows Platform apps on Windows 10 / Windows 11 using Visual Studio 2022.
1111

1212
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.</description>
13-
<releaseNotes>Matches the June 4, 2024 release on GitHub.</releaseNotes>
13+
<releaseNotes>Matches the September 4, 2024 release on GitHub.</releaseNotes>
1414
<projectUrl>http://go.microsoft.com/fwlink/?LinkID=324981</projectUrl>
1515
<repository type="git" url="https://github.com/microsoft/DirectXMesh.git" />
1616
<icon>images\icon.jpg</icon>

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Releases available for download on [GitHub](https://github.com/microsoft/DirectX
66

77
## Release History
88

9+
### September 4, 2024
10+
* CMake project updates including support for ARM64EC
11+
* Minor code review
12+
* Added GitHub Actions YAML files
13+
914
### June 4, 2024
1015
* CMake project updates
1116
* Retired VS 2019 projects for the UWP platform

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkID=324981
66

77
Copyright (c) Microsoft Corporation.
88

9-
**June 4, 2024**
9+
**September 4, 2024**
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

build/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4+
<!--
5+
Copyright (c) Microsoft Corporation.
6+
Licensed under the MIT License.
7+
-->
8+
49
<PropertyGroup>
510
<ExtractedFolder Condition="'$(ExtractedFolder)'==''">C:\xtracted\</ExtractedFolder>
611
<ExtractedFolder Condition="!HasTrailingSlash('$(ExtractedFolder)')">$(ExtractedFolder)\</ExtractedFolder>

build/preparerelease.ps1

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<#
2+
3+
.NOTES
4+
Copyright (c) Microsoft Corporation.
5+
Licensed under the MIT License.
6+
7+
.SYNOPSIS
8+
Prepares a PR for release
9+
10+
.DESCRIPTION
11+
This script is used to do the edits required for preparing a release PR.
12+
13+
.PARAMETER BaseBranch
14+
This the branch to use as the base of the release. Defaults to 'main'.
15+
16+
.PARAMETER TargetBranch
17+
This is the name of the newly created branch for the release PR. Defaults to '<DATETAG>release'. If set to 'none', then no branch is created.
18+
19+
.PARAMETER UpdateVersion
20+
This is a $true or $false value that indicates if the library version number should be incremented. Defaults to $true.
21+
22+
.LINK
23+
https://github.com/microsoft/DirectXMesh/wiki
24+
25+
#>
26+
27+
param(
28+
[string]$BaseBranch = "main",
29+
[string]$TargetBranch = $null,
30+
[bool]$UpdateVersion = $true
31+
)
32+
33+
$reporoot = Split-Path -Path $PSScriptRoot -Parent
34+
$cmake = $reporoot + "\CMakeLists.txt"
35+
$header = $reporoot + "\DirectXMesh\DirectXMesh.h"
36+
$readme = $reporoot + "\README.md"
37+
$history = $reporoot + "\CHANGELOG.md"
38+
39+
if ((-Not (Test-Path $cmake)) -Or (-Not (Test-Path $header)) -Or (-Not (Test-Path $readme)) -Or (-Not (Test-Path $history))) {
40+
Write-Error "ERROR: Unexpected location of script file!" -ErrorAction Stop
41+
}
42+
43+
$branch = git branch --show-current
44+
if ($branch -ne $BaseBranch) {
45+
Write-Error "ERROR: Must be in the $BaseBranch branch!" -ErrorAction Stop
46+
}
47+
48+
git pull -q
49+
if ($LastExitCode -ne 0) {
50+
Write-Error "ERROR: Failed to sync branch!" -ErrorAction Stop
51+
}
52+
53+
$version = Get-Content ($cmake) | Select-String -Pattern "set\(DIRECTXMESH_VERSION" -CaseSensitive
54+
if (-Not ($version -match "([0-9]?\.[0-9]?\.[0-9]?)")) {
55+
Write-Error "ERROR: Failed to current version!" -ErrorAction Stop
56+
}
57+
$version = $Matches.0
58+
$rawversion = $version.replace('.','')
59+
60+
$newreleasedate = Get-Date -Format "MMMM d, yyyy"
61+
$newreleasetag = (Get-Date -Format "MMMyyyy").ToLower()
62+
63+
if($UpdateVersion) {
64+
[string]$newrawversion = ([int]$rawversion + 1)
65+
}
66+
else {
67+
$newrawversion = $rawversion
68+
}
69+
70+
$newversion = $newrawversion[0] + "." + $newrawversion[1] + "." + $newrawversion[2]
71+
72+
$rawreleasedate = $(Get-Content $readme) | Select-String -Pattern "\*\*[A-Z][a-z]+\S.\d+,?\S.\d\d\d\d\*\*"
73+
if ([string]::IsNullOrEmpty($rawreleasedate)) {
74+
Write-Error "ERROR: Failed to current release date!" -ErrorAction Stop
75+
}
76+
$releasedate = $rawreleasedate -replace '\*',''
77+
78+
if($releasedate -eq $newreleasedate) {
79+
Write-Error ("ERROR: Release "+$releasedate+" already exists!") -ErrorAction Stop
80+
}
81+
82+
if ($TargetBranch -ne 'none') {
83+
if ([string]::IsNullOrEmpty($TargetBranch)) {
84+
$TargetBranch = $newreleasetag + "release"
85+
}
86+
87+
git checkout -b $TargetBranch
88+
if ($LastExitCode -ne 0) {
89+
Write-Error "ERROR: Failed to create new topic branch!" -ErrorAction Stop
90+
}
91+
}
92+
93+
Write-Host " Old Version: " $version
94+
Write-Host "Old Release Date: " $releasedate
95+
Write-Host "->"
96+
Write-Host " Release Date: " $newreleasedate
97+
Write-Host " Release Tag: " $newreleasetag
98+
Write-Host " Release Version: " $newversion
99+
100+
if($UpdateVersion) {
101+
(Get-Content $cmake).Replace("set(DIRECTXMESH_VERSION $version)","set(DIRECTXMESH_VERSION $newversion)") | Set-Content $cmake
102+
(Get-Content $header).Replace("#define DIRECTX_MESH_VERSION $rawversion","#define DIRECTX_MESH_VERSION $newrawversion") | Set-Content $header
103+
}
104+
105+
(Get-Content $readme).Replace("$rawreleasedate", "**$newreleasedate**") | Set-Content $readme
106+
107+
Get-ChildItem -Path ($reporoot + "\.nuget") -Filter *.nuspec | Foreach-Object {
108+
(Get-Content -Path $_.Fullname).Replace("$releasedate", "$newreleasedate") | Set-Content -Path $_.Fullname -Encoding utf8
109+
}
110+
111+
[System.Collections.ArrayList]$file = Get-Content $history
112+
$inserthere = @()
113+
114+
for ($i=0; $i -lt $file.count; $i++) {
115+
if ($file[$i] -match "## Release History") {
116+
$inserthere += $i + 1
117+
}
118+
}
119+
120+
$file.insert($inserthere[0], "`n### $newreleasedate`n* change history here")
121+
Set-Content -Path $history -Value $file
122+
123+
code $history $readme
124+
if ($LastExitCode -ne 0) {
125+
Write-Error "ERROR: Failed to launch VS Code!" -ErrorAction Stop
126+
}

build/versioninfo.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<#
2+
Copyright (c) Microsoft Corporation.
3+
Licensed under the MIT License.
4+
#>
5+
16
param(
27
[string]$version
38
)

0 commit comments

Comments
 (0)