mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
usdcat doesn't support --version flag. It requires input files and exits with error "inputFiles is required" when run without arguments. Changed all verification steps to use `usdcat --help` which properly displays the help text and exits with success.
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
name: macOS
|
|
|
|
# TODO: Build with Python.
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
pull_request:
|
|
branches: [ dev ]
|
|
|
|
jobs:
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
name: Build for macOS
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
- name: CmakeAndBuild
|
|
run: |
|
|
./scripts/bootstrap-cmake-macos.sh
|
|
cd build
|
|
make VERBOSE=1
|
|
- name: Ctest
|
|
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: |
|
|
mkdir -p openusd
|
|
tar -xzf openusd-*-minsizerel-macos-arm64.tar.gz -C openusd
|
|
USD_ROOT="$(pwd)/openusd"
|
|
echo "USD_INSTALL_ROOT=$USD_ROOT" >> $GITHUB_ENV
|
|
echo "$USD_ROOT/bin" >> $GITHUB_PATH
|
|
echo "DYLD_LIBRARY_PATH=$USD_ROOT/lib:$USD_ROOT/tbb/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
echo "PYTHONPATH=$USD_ROOT/lib/python:$PYTHONPATH" >> $GITHUB_ENV
|
|
echo "PXR_PLUGINPATH_NAME=$USD_ROOT/lib/usd" >> $GITHUB_ENV
|
|
|
|
- name: Verify OpenUSD installation (macOS ARM64)
|
|
run: |
|
|
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!"
|