Files
tinyusdz/.github/workflows/windows_ci.yml
Syoyo Fujita a7a009854e Fix Windows OpenUSD binary filename pattern in CI
Update the OpenUSD binary download pattern to match the actual release
artifact naming:
- Old: openusd-*-minsizerel-win64.zip
- New: openusd-*-minsizerel-windows-x86_64.zip

This matches the naming convention used in openusd-bin releases where
platform names follow GitHub Actions standard identifiers
(windows-x86_64, linux-x86_64, etc).

Fixes the "no assets match the file pattern" error in Windows CI.
2026-01-10 22:29:36 +09:00

102 lines
3.4 KiB
YAML

name: Windows
# TODO: MinGW(gcc) build
# TODO: llvm-mingw(clang) build
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
# Windows(x64) + Visual Studio 2019 build
build-windows-msvc:
runs-on: windows-latest
name: Build for Windows(x64, MSVC)
# Use system installed cmake
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Configure
run: .\vcsetup.bat
- name: Build
run: cmake --build build --config Release
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist-win-x64-release
path: |
build/Release/tusdcat.exe
# Test with OpenUSD binary (Windows x64)
- name: Download OpenUSD binary (Windows x64)
run: |
gh release download v25.11-lte `
--repo lighttransport/openusd-bin `
--pattern 'openusd-*-minsizerel-windows-x86_64.zip'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD (Windows x64)
run: |
$archive = Get-ChildItem -Filter "openusd-*-minsizerel-windows-x86_64.zip" | Select-Object -First 1
Expand-Archive -Path $archive.FullName -DestinationPath . -Force
$usdDir = Get-ChildItem -Directory -Filter "openusd-*" | Select-Object -First 1
echo "USD_INSTALL_ROOT=$($usdDir.FullName)" >> $env:GITHUB_ENV
echo "$($usdDir.FullName)\bin" >> $env:GITHUB_PATH
- name: Verify OpenUSD installation (Windows x64)
run: |
usdcat --version
Write-Host "OpenUSD binary location: $(Get-Command usdcat | Select-Object -ExpandProperty Source)"
- name: Test TinyUSDZ and OpenUSD interoperability (Windows x64)
run: |
Write-Host "=== Testing TinyUSDZ <-> OpenUSD interoperability on Windows x64 ==="
# Test 1: Read files with both tools
$testFiles = @("models/suzanne.usdc", "models/cube.usda")
foreach ($usdFile in $testFiles) {
if (Test-Path $usdFile) {
Write-Host "Testing $usdFile"
.\build\Release\tusdcat.exe $usdFile > $null
usdcat $usdFile > $null
Write-Host "✓ Both tools read $usdFile"
}
}
# Test 2: Convert with TinyUSDZ, verify with OpenUSD
if (Test-Path "models/suzanne.usdc") {
.\build\Release\tusdcat.exe models/suzanne.usdc > tinyusdz_output.usda
usdcat tinyusdz_output.usda > $null
Write-Host "✓ OpenUSD read TinyUSDZ-generated USDA"
}
Write-Host "All Windows x64 tests passed!"
# Windows(32bit) + Visual Studio 2019 build
build-windows-msvc-win32:
runs-on: windows-latest
name: Build for Windows(Win32, MSVC)
# Use system installed cmake
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Configure
run: .\vcsetup-32bit.bat
- name: Build
run: cmake --build build_win32 --config Release
- name: Test
run: ctest --test-dir build_win32 -C Release --output-on-failure