Add OpenUSD binary interoperability testing to CI workflows

Downloads prebuilt OpenUSD binaries from lighttransport/openusd-bin
and tests TinyUSDZ output compatibility with official OpenUSD tools.
Validates that TinyUSDZ-generated USDA files can be read by OpenUSD's
usdcat. Tests run on Linux (x64/ARM64), macOS ARM64, and Windows x64.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Syoyo Fujita
2026-01-10 06:45:56 +09:00
parent 744f6fcc8f
commit 606729bbc5
3 changed files with 196 additions and 0 deletions

View File

@@ -116,6 +116,56 @@ jobs:
- name: tests
run: cd build && ctest --output-on-failure
# Test with OpenUSD binary
- name: Download OpenUSD binary
run: |
gh release download v25.11-lte \
--repo lighttransport/openusd-bin \
--pattern 'openusd-*-minsizerel-linux-x86_64.tar.gz'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD
run: |
tar -xzf openusd-*-minsizerel-linux-x86_64.tar.gz
USD_DIR=$(find . -maxdepth 1 -type d -name "openusd-*" | head -n 1)
echo "USD_DIR=$USD_DIR" >> $GITHUB_ENV
echo "USD_INSTALL_ROOT=$(pwd)/$USD_DIR" >> $GITHUB_ENV
echo "$(pwd)/$USD_DIR/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$(pwd)/$USD_DIR/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
if [ -f "setup-usd-env.sh" ]; then
source setup-usd-env.sh
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
fi
- name: Verify OpenUSD installation
run: |
usdcat --version || usdcat --help
echo "OpenUSD binary: $(which usdcat)"
- name: Test TinyUSDZ and OpenUSD interoperability
run: |
echo "=== Testing TinyUSDZ <-> OpenUSD interoperability ==="
# Test 1: Read files with both tools
for usd_file in models/suzanne.usdc models/cube.usda; do
if [ -f "$usd_file" ]; then
echo "Testing $usd_file"
./build/tusdcat "$usd_file" > /tmp/tusdcat.txt
usdcat "$usd_file" > /tmp/usdcat.txt
echo "✓ Both tools read $usd_file"
fi
done
# Test 2: Convert with TinyUSDZ, verify with OpenUSD
if [ -f "models/suzanne.usdc" ]; then
./build/tusdcat models/suzanne.usdc > /tmp/tinyusdz.usda
usdcat /tmp/tinyusdz.usda > /dev/null
echo "✓ OpenUSD read TinyUSDZ-generated USDA"
fi
echo "All tests passed!"
# ARM64 ASan build to debug segfaults
build-arm64-asan:
@@ -227,3 +277,53 @@ jobs:
- name: tests
run: cd build && ctest --output-on-failure
# Test with OpenUSD binary (ARM64)
- name: Download OpenUSD binary (ARM64)
run: |
gh release download v25.11-lte \
--repo lighttransport/openusd-bin \
--pattern 'openusd-*-minsizerel-linux-aarch64.tar.gz'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD (ARM64)
run: |
tar -xzf openusd-*-minsizerel-linux-aarch64.tar.gz
USD_DIR=$(find . -maxdepth 1 -type d -name "openusd-*" | head -n 1)
echo "USD_DIR=$USD_DIR" >> $GITHUB_ENV
echo "USD_INSTALL_ROOT=$(pwd)/$USD_DIR" >> $GITHUB_ENV
echo "$(pwd)/$USD_DIR/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$(pwd)/$USD_DIR/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
if [ -f "setup-usd-env.sh" ]; then
source setup-usd-env.sh
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
fi
- name: Verify OpenUSD installation (ARM64)
run: |
usdcat --version || usdcat --help
echo "OpenUSD binary: $(which usdcat)"
- name: Test TinyUSDZ and OpenUSD interoperability (ARM64)
run: |
echo "=== Testing TinyUSDZ <-> OpenUSD interoperability on ARM64 ==="
# Test 1: Read files with both tools
for usd_file in models/suzanne.usdc models/cube.usda tests/usdc/timesamples-array-vec2f-001.usdc; do
if [ -f "$usd_file" ]; then
echo "Testing $usd_file"
./build/tusdcat "$usd_file" > /tmp/tusdcat.txt
usdcat "$usd_file" > /tmp/usdcat.txt
echo "✓ Both tools read $usd_file"
fi
done
# Test 2: Convert with TinyUSDZ, verify with OpenUSD
if [ -f "models/suzanne.usdc" ]; then
./build/tusdcat models/suzanne.usdc > /tmp/tinyusdz.usda
usdcat /tmp/tinyusdz.usda > /dev/null
echo "✓ OpenUSD read TinyUSDZ-generated USDA"
fi
echo "All ARM64 tests passed!"

View File

@@ -27,3 +27,53 @@ jobs:
run: |
cd build
ctest --output-on-failure
# Test with OpenUSD binary (macOS ARM64)
- name: Download OpenUSD binary (macOS ARM64)
run: |
gh release download v25.11-lte \
--repo lighttransport/openusd-bin \
--pattern 'openusd-*-minsizerel-macos-arm64.tar.gz'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD (macOS ARM64)
run: |
tar -xzf openusd-*-minsizerel-macos-arm64.tar.gz
USD_DIR=$(find . -maxdepth 1 -type d -name "openusd-*" | head -n 1)
echo "USD_DIR=$USD_DIR" >> $GITHUB_ENV
echo "USD_INSTALL_ROOT=$(pwd)/$USD_DIR" >> $GITHUB_ENV
echo "$(pwd)/$USD_DIR/bin" >> $GITHUB_PATH
echo "DYLD_LIBRARY_PATH=$(pwd)/$USD_DIR/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
if [ -f "setup-usd-env.sh" ]; then
source setup-usd-env.sh
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
fi
- name: Verify OpenUSD installation (macOS ARM64)
run: |
usdcat --version || usdcat --help
echo "OpenUSD binary: $(which usdcat)"
- name: Test TinyUSDZ and OpenUSD interoperability (macOS ARM64)
run: |
echo "=== Testing TinyUSDZ <-> OpenUSD interoperability on macOS ARM64 ==="
# Test 1: Read files with both tools
for usd_file in models/suzanne.usdc models/cube.usda; do
if [ -f "$usd_file" ]; then
echo "Testing $usd_file"
./build/tusdcat "$usd_file" > /tmp/tusdcat.txt
usdcat "$usd_file" > /tmp/usdcat.txt
echo "✓ Both tools read $usd_file"
fi
done
# Test 2: Convert with TinyUSDZ, verify with OpenUSD
if [ -f "models/suzanne.usdc" ]; then
./build/tusdcat models/suzanne.usdc > /tmp/tinyusdz.usda
usdcat /tmp/tinyusdz.usda > /dev/null
echo "✓ OpenUSD read TinyUSDZ-generated USDA"
fi
echo "All macOS ARM64 tests passed!"

View File

@@ -35,6 +35,52 @@ jobs:
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-win64.zip'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD (Windows x64)
run: |
$archive = Get-ChildItem -Filter "openusd-*-minsizerel-win64.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: