From ae3a5a135d888438e0431c01770448bcee933398 Mon Sep 17 00:00:00 2001 From: walbourn Date: Mon, 6 Jul 2026 21:19:30 -0700 Subject: [PATCH 1/4] MinGW update and pipeline updates --- .../DirectXMesh-GitHub-CMake-Dev17.yml | 250 ------------------ .../pipelines/DirectXMesh-GitHub-CMake.yml | 151 ----------- .../pipelines/DirectXMesh-GitHub-MinGW.yml | 205 -------------- .../pipelines/DirectXMesh-GitHub-WSL-11.yml | 148 ----------- .github/workflows/mingw.yml | 97 +++++++ .github/workflows/vcpkg.yml | 27 +- 6 files changed, 99 insertions(+), 779 deletions(-) delete mode 100644 .azuredevops/pipelines/DirectXMesh-GitHub-CMake-Dev17.yml delete mode 100644 .azuredevops/pipelines/DirectXMesh-GitHub-CMake.yml delete mode 100644 .azuredevops/pipelines/DirectXMesh-GitHub-MinGW.yml delete mode 100644 .azuredevops/pipelines/DirectXMesh-GitHub-WSL-11.yml create mode 100644 .github/workflows/mingw.yml diff --git a/.azuredevops/pipelines/DirectXMesh-GitHub-CMake-Dev17.yml b/.azuredevops/pipelines/DirectXMesh-GitHub-CMake-Dev17.yml deleted file mode 100644 index eb3b266e..00000000 --- a/.azuredevops/pipelines/DirectXMesh-GitHub-CMake-Dev17.yml +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# -# https://go.microsoft.com/fwlink/?LinkID=324981 - -# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). - -schedules: - - cron: "0 4 * * *" - displayName: 'Nightly build' - branches: - include: - - main - -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - -pr: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - drafts: false - -resources: - repositories: - - repository: self - type: git - ref: refs/heads/main - -name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) - -variables: - Codeql.Enabled: false - VS_GENERATOR: 'Visual Studio 17 2022' - WIN10_SDK: '10.0.19041.0' - WIN11_SDK: '10.0.26100.0' - -pool: - vmImage: windows-2022 - -jobs: - - job: CMAKE_BUILD - displayName: CMake using VS Generator - steps: - - checkout: self - clean: true - fetchTags: false - - task: CMake@1 - displayName: 'CMake (MSVC): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (MSVC): Config x86' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A Win32 -B out2 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC): Build x86 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out2 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC): Build x86 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out2 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (MSVC): Config ARM64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A ARM64 -B out3 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC): Build ARM64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out3 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC): Build ARM64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out3 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (UWP): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out4 - -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 - - task: CMake@1 - displayName: 'CMake (UWP): Build x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out4 -v - - task: CMake@1 - displayName: 'CMake (ClangCl): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out5 - -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - - task: CMake@1 - displayName: 'CMake (ClangCl): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out5 -v --config Debug - - task: CMake@1 - displayName: 'CMake (ClangCl): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out5 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (ClangCl): Config ARM64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out6 - -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) - - task: CMake@1 - displayName: 'CMake (ClangCl): Build ARM64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out6 -v --config Debug - - task: CMake@1 - displayName: 'CMake (Win10): Config' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out7 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=ON - - task: CMake@1 - displayName: 'CMake (Win10): Build' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out7 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out8 - -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON - -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out8 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out8 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Config ARM64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A ARM64 -B out9 - -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON - -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Build ARM64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out9 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC Spectre): Build ARM64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out9 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (Win10 Spectre): Config' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out10 - -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON - -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=ON - - task: CMake@1 - displayName: 'CMake (Win10 Spectre): Build' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out10 -v --config Debug - - task: CMake@1 - displayName: 'CMake (DLL): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -A x64 -B out11 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=ON - -DBUILD_SHARED_LIBS=ON - - task: CMake@1 - displayName: 'CMake (DLL): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out11 -v --config Debug - - task: CMake@1 - displayName: 'CMake (DLL): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out10 -v --config RelWithDebInfo diff --git a/.azuredevops/pipelines/DirectXMesh-GitHub-CMake.yml b/.azuredevops/pipelines/DirectXMesh-GitHub-CMake.yml deleted file mode 100644 index d14ead5a..00000000 --- a/.azuredevops/pipelines/DirectXMesh-GitHub-CMake.yml +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# -# https://go.microsoft.com/fwlink/?LinkID=324981 - -# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). - -schedules: - - cron: "0 4 * * *" - displayName: 'Nightly build' - branches: - include: - - main - -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - -pr: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - drafts: false - -resources: - repositories: - - repository: self - type: git - ref: refs/heads/main - -name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) - -variables: - Codeql.Enabled: false - VS_GENERATOR: 'Visual Studio 17 2022' - WIN10_SDK: '10.0.19041.0' - WIN11_SDK: '10.0.26100.0' - -pool: - vmImage: windows-2022 - -jobs: - - job: CMAKE_BUILD - displayName: CMake using VS Generator - steps: - - checkout: self - clean: true - fetchTags: false - - task: CMake@1 - displayName: 'CMake (MSVC): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -T v142 -A x64 -B out - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (MSVC): Config x86' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -T v142 -A Win32 -B out2 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=OFF - - task: CMake@1 - displayName: 'CMake (MSVC): Build x86 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out2 -v --config Debug - - task: CMake@1 - displayName: 'CMake (MSVC): Build x86 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out2 -v --config RelWithDebInfo - - task: CMake@1 - displayName: 'CMake (UWP): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -T v142 -A x64 -B out3 - -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 - - task: CMake@1 - displayName: 'CMake (UWP): Build x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out3 -v - - task: CMake@1 - displayName: 'CMake (Win10): Config' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -T v142 -A x64 -B out4 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=ON - - task: CMake@1 - displayName: 'CMake (Win10): Build' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out4 -v --config Debug - - task: CMake@1 - displayName: 'CMake (DLL): Config x64' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: > - -G "$(VS_GENERATOR)" -T v142 -A x64 -B out5 - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - -DBUILD_DX12=ON - -DBUILD_SHARED_LIBS=ON - - task: CMake@1 - displayName: 'CMake (DLL): Build x64 Debug' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out5 -v --config Debug - - task: CMake@1 - displayName: 'CMake (DLL): Build x64 Release' - inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: --build out5 -v --config RelWithDebInfo diff --git a/.azuredevops/pipelines/DirectXMesh-GitHub-MinGW.yml b/.azuredevops/pipelines/DirectXMesh-GitHub-MinGW.yml deleted file mode 100644 index e367a0ba..00000000 --- a/.azuredevops/pipelines/DirectXMesh-GitHub-MinGW.yml +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# -# https://go.microsoft.com/fwlink/?LinkID=324981 - -# Builds the library and test suite using the MinGW compiler. - -schedules: - - cron: "0 4 * * *" - displayName: 'Nightly build' - branches: - include: - - main - -trigger: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - -pr: - branches: - include: - - main - paths: - exclude: - - '*.md' - - LICENSE - - '.github/**' - - '.nuget/*' - - build/*.cmd - - build/*.props - - build/*.ps1 - - build/*.targets - - build/*.xvd - drafts: false - -resources: - repositories: - - repository: self - type: git - ref: refs/heads/main - - repository: vcpkgRepo - name: Microsoft/vcpkg - type: github - endpoint: microsoft - ref: refs/tags/$(VCPKG_TAG) - - repository: testRepo - name: walbourn/directxmeshtest - type: github - endpoint: microsoft - ref: refs/heads/main - -name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) - -pool: - vmImage: windows-2022 - -variables: - - group: dxmesh-shared-variables - - name: Codeql.Enabled - value: false - - name: VCPKG_ROOT - value: '$(Build.SourcesDirectory)/vcpkg' - - name: VCPKG_CMAKE_DIR - value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' - - name: VCPKG_MANIFEST_DIR - value: '$(Build.SourcesDirectory)/build' - - name: BASE_URL - value: https://github.com/brechtsanders/winlibs_mingw/releases/download - - name: URL_MINGW32 - value: $(BASE_URL)/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-i686-posix-dwarf-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip - - name: HASH_MINGW32 - value: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272' - -jobs: - - job: MINGW32_BUILD - displayName: 'Minimalist GNU for Windows (MinGW32)' - steps: - - checkout: self - clean: true - fetchTags: false - fetchDepth: 1 - path: 's' - - checkout: vcpkgRepo - displayName: Fetch VCPKG - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/vcpkg' - - task: CmdLine@2 - displayName: VCPKG Bootstrap - inputs: - script: | - call bootstrap-vcpkg.bat - echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x86-mingw-static - echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x86-mingw-static - - workingDirectory: $(Build.SourcesDirectory)\vcpkg - - task: PowerShell@2 - displayName: Install MinGW32 - inputs: - targetType: inline - script: | - $ProgressPreference = 'SilentlyContinue' - Write-Host "Downloading winlibs..." - Invoke-WebRequest -Uri "$(URL_MINGW32)" -OutFile "gw32.zip" - Write-Host "Downloaded." - $fileHash = Get-FileHash -Algorithm SHA512 gw32.zip | ForEach { $_.Hash} | Out-String - $filehash = $fileHash.Trim() - Write-Host "##[debug]SHA512: " $fileHash - if ($fileHash -ne '$(HASH_MINGW32)') { - Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop - } - Write-Host "Extracting winlibs..." - Expand-Archive -LiteralPath 'gw32.zip' - Write-Host "Extracted." - Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" - Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" - - workingDirectory: $(Build.SourcesDirectory) - - task: CmdLine@2 - displayName: GCC version - inputs: - script: g++ --version - - task: CmdLine@2 - displayName: VCPKG install packages - inputs: - script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-mingw-static - workingDirectory: $(VCPKG_ROOT) - - task: CMake@1 - displayName: CMake (MinGW32) - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: > - -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - - task: CMake@1 - displayName: CMake (MinGW32) Build - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: --build out - - - job: MINGW64_BUILD - displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON' - steps: - - checkout: self - clean: true - fetchTags: false - fetchDepth: 1 - path: 's' - - checkout: vcpkgRepo - displayName: Fetch VCPKG - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/vcpkg' - - checkout: testRepo - displayName: Fetch Tests - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/Tests' - - task: CmdLine@2 - displayName: VCPKG Bootstrap - inputs: - script: | - call bootstrap-vcpkg.bat - echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-mingw-static - echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-mingw-static - - workingDirectory: $(Build.SourcesDirectory)\vcpkg - - task: CmdLine@2 - displayName: GCC version - inputs: - script: g++ --version - - task: CmdLine@2 - displayName: VCPKG install packages - inputs: - script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-mingw-static - workingDirectory: $(VCPKG_ROOT) - - task: CMake@1 - displayName: CMake (MinGW-W64) - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: > - -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - - task: CMake@1 - displayName: CMake (MinGW-W64) Build - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: --build out diff --git a/.azuredevops/pipelines/DirectXMesh-GitHub-WSL-11.yml b/.azuredevops/pipelines/DirectXMesh-GitHub-WSL-11.yml deleted file mode 100644 index 91d0b48d..00000000 --- a/.azuredevops/pipelines/DirectXMesh-GitHub-WSL-11.yml +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# -# https://go.microsoft.com/fwlink/?LinkID=324981 - -# Builds the library for Windows Subsystem for Linux (WSL) - -schedules: - - cron: "0 1 * * *" - displayName: 'Nightly build' - branches: - include: - - main - -trigger: none - -pr: - branches: - include: - - main - paths: - include: - - '.azuredevops/pipelines/DirectXMesh-GitHub-WSL-11.yml' - - CMake* - - build/*.cmake - - build/*.in - -resources: - repositories: - - repository: self - type: git - ref: refs/heads/main - trigger: none - - repository: dxHeadersRepo - name: Microsoft/DirectX-Headers - type: github - endpoint: microsoft - ref: refs/heads/main - - repository: dxMathRepo - name: Microsoft/DirectXMath - type: github - endpoint: microsoft - ref: refs/heads/main - -name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) - -pool: - vmImage: ubuntu-22.04 - -variables: - Codeql.Enabled: false - LOCAL_PKG_DIR: '$(Agent.BuildDirectory)/install/' - SAL_URL: https://raw.githubusercontent.com/dotnet/runtime/v8.0.1/src/coreclr/pal/inc/rt/sal.h - SAL_HASH: 0f5a80b97564217db2ba3e4624cc9eb308e19cc9911dae21d983c4ab37003f4756473297ba81b386c498514cedc1ef5a3553d7002edc09aeb6a1335df973095f - -jobs: - - job: BUILD_WSL - displayName: 'Windows Subsystem for Linux (WSL)' - timeoutInMinutes: 120 - cancelTimeoutInMinutes: 1 - steps: - - checkout: self - clean: true - fetchTags: false - fetchDepth: 1 - path: 's' - - checkout: dxHeadersRepo - displayName: Fetch DirectX-Headers - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/DirectX-Headers' - - checkout: dxMathRepo - displayName: Fetch DirectX-Math - clean: true - fetchTags: false - fetchDepth: 1 - path: 's/DirectXMath' - - task: CMake@1 - displayName: CMake DirectX-Headers - inputs: - cwd: DirectX-Headers - cmakeArgs: > - . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF - -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) - - task: CMake@1 - displayName: CMake DirectX-Headers (Build) - inputs: - cwd: DirectX-Headers - cmakeArgs: --build . -v - - task: CMake@1 - displayName: CMake DirectX-Headers (Install) - inputs: - cwd: DirectX-Headers - cmakeArgs: --install . - - task: CMake@1 - displayName: CMake DirectXMath - inputs: - cwd: DirectXMath - cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) - - task: CMake@1 - displayName: CMake DirectXMath (Build) - inputs: - cwd: DirectXMath - cmakeArgs: --build . -v - - task: CMake@1 - displayName: CMake DirectXMath (Install) - inputs: - cwd: DirectXMath - cmakeArgs: --install . - - task: PowerShell@2 - displayName: Fetch SAL.H - inputs: - targetType: inline - script: | - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "$(SAL_URL)" -OutFile $(LOCAL_PKG_DIR)/include/sal.h - $fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String - $filehash = $fileHash.Trim() - Write-Host "##[debug]SHA512: " $filehash - if ($fileHash -ne "$(SAL_HASH)") { - Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop - } - - - task: CMake@1 - displayName: CMake DirectXMesh (Config) dbg - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: > - -B out -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - - task: CMake@1 - displayName: CMake DirectXMesh (Build) dbg - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: --build out -v - - task: CMake@1 - displayName: CMake DirectXMesh (Config) rel - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: > - -B out2 -DCMAKE_BUILD_TYPE=Release - -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - - task: CMake@1 - displayName: CMake DirectXMesh (Build) rel - inputs: - cwd: $(Build.SourcesDirectory) - cmakeArgs: --build out2 -v diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml new file mode 100644 index 00000000..2f28e0a2 --- /dev/null +++ b/.github/workflows/mingw.yml @@ -0,0 +1,97 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# https://go.microsoft.com/fwlink/?LinkID=324981 + +name: 'CMake (MinGW)' + +on: + push: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.github/*.md' + - '.nuget/*' + - build/*.cmd + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.xvd + pull_request: + branches: "main" + paths-ignore: + - '*.md' + - LICENSE + - '.azuredevops/**' + - '.github/*.md' + - '.nuget/*' + - build/*.cmd + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.xvd + workflow_dispatch: {} + +permissions: + contents: read + +jobs: + build: + runs-on: windows-2022 + + strategy: + fail-fast: false + + matrix: + build_type: [x64-Debug-MinGW, x64-Release-MinGW] + shared: ['OFF'] + + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: 'Install Ninja' + run: choco install ninja + + - name: 'Set triplet' + shell: pwsh + run: | + echo "VCPKG_INSTALLED_DIR=${{ github.workspace }}/build/vcpkg_installed" >> $env:GITHUB_ENV + echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV + + - name: Get vcpkg commit hash + shell: pwsh + run: | + if ($Env:vcpkgRelease) { + echo "Using vcpkg commit from repo variable..." + $VCPKG_COMMIT_ID = $Env:vcpkgRelease + } + else { + echo "Fetching latest vcpkg commit hash..." + $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value + $VCPKG_COMMIT_ID = $commit + } + Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" + echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV + env: + vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}' + + - uses: lukka/run-vcpkg@305c06bd4dee21e23dcf142c85c657a993f7aa1a # v11 + with: + runVcpkgInstall: true + vcpkgJsonGlob: '**/build/vcpkg.json' + vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: > + cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON + -DBUILD_SHARED_LIBS=${{ matrix.shared }} + -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" + -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" + -DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index cd70f1fc..81bb954b 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -66,25 +66,9 @@ jobs: build_type: arm64ec-Debug-VCPKG arch: amd64_arm64 shared: 'OFF' - - toolver: '14' - build_type: x64-Debug-MinGW - arch: amd64 - shared: 'OFF' - - toolver: '14' - build_type: x64-Release-MinGW - arch: amd64 - shared: 'OFF' - - toolver: '14' - build_type: x64-Debug-MinGW - arch: amd64 - shared: 'ON' - - toolver: '14' - build_type: x64-Release-MinGW - arch: amd64 - shared: 'ON' steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: 'Install Ninja' run: choco install ninja @@ -99,14 +83,7 @@ jobs: run: | if ("${{ matrix.arch }}" -eq "amd64") { - if ("${{ matrix.build_type }}" -match "MinGW") - { - echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV - } - else - { - echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV - } + echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV } elseif ("${{ matrix.arch }}" -eq "amd64_x86") { From 04f896cb0ad3e2e7fa18bd757d70152f4ed73fa0 Mon Sep 17 00:00:00 2001 From: walbourn Date: Tue, 7 Jul 2026 00:09:53 -0700 Subject: [PATCH 2/4] Add tests --- .github/workflows/mingw.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 2f28e0a2..c3e5e4dd 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -51,6 +51,13 @@ jobs: steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - name: Clone test repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + repository: walbourn/directxmeshtest + path: Tests + ref: main + - name: 'Install Ninja' run: choco install ninja From 75a75ad54b47df4e4b7d97f7c5b065bd822d6bb2 Mon Sep 17 00:00:00 2001 From: walbourn Date: Tue, 7 Jul 2026 00:14:19 -0700 Subject: [PATCH 3/4] Update preset --- CMakePresets.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 14cc5987..d82ca22a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -165,7 +165,7 @@ "name": "MinGW32", "hidden": true, "environment": { - "PATH": "$penv{PATH};c:/mingw32/bin;c:/mingw32/libexec/gcc/i686-w64-mingw32/12.2.0" + "PATH": "$penv{PATH};c:/mingw32/bin;c:/mingw32/libexec/gcc/i686-w64-mingw32/16.1.0" }, "cacheVariables": { "VCPKG_TARGET_TRIPLET": "x86-mingw-static", @@ -176,7 +176,7 @@ "name": "MinGW64", "hidden": true, "environment": { - "PATH": "$penv{PATH};c:/mingw64/bin;c:/mingw64/libexec/gcc/x86_64-w64-mingw32/12.2.0" + "PATH": "$penv{PATH};c:/mingw64/bin;c:/mingw64/libexec/gcc/x86_64-w64-mingw32/16.1.0" }, "cacheVariables": { "VCPKG_TARGET_TRIPLET": "x64-mingw-static", From 4bff8fedd123467279fb1c41e6d6233dec7b1e9b Mon Sep 17 00:00:00 2001 From: walbourn Date: Tue, 7 Jul 2026 18:56:35 -0700 Subject: [PATCH 4/4] Fix warning --- .github/workflows/mingw.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index c3e5e4dd..50df2a05 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -46,7 +46,7 @@ jobs: matrix: build_type: [x64-Debug-MinGW, x64-Release-MinGW] - shared: ['OFF'] + shared: ['OFF', 'ON'] steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -61,11 +61,14 @@ jobs: - name: 'Install Ninja' run: choco install ninja + # we set the media paths to silence a CMake warning in the tests, but we don't run them here. - name: 'Set triplet' shell: pwsh run: | echo "VCPKG_INSTALLED_DIR=${{ github.workspace }}/build/vcpkg_installed" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV + echo "DIRECTXMESH_MEDIA_PATH=${{ github.workspace }}" >> $env:GITHUB_ENV + echo "DIRECTXTEX_MEDIA_PATH=${{ github.workspace }}" >> $env:GITHUB_ENV - name: Get vcpkg commit hash shell: pwsh