Files
tinyusdz/.github/workflows/linux_ci.yml
Syoyo Fujita 60b617295e Add libtbb12 installation back for OpenUSD tests
Despite TBB being included in the OpenUSD binary package, the system
still requires libtbb12 to be installed for proper library resolution.
This ensures usdcat and other OpenUSD binaries can find libtbb.so.12.

Fixes failure in workflow run #20869757118.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:47:10 +09:00

340 lines
11 KiB
YAML

name: Linux
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
# Disable gcc4.9 and gcc5 since its too obsolete and failed to do apt-get
## compile with oldest gcc4.9 which supports (most of)C++14
#build-gcc49:
# runs-on: ubuntu-latest
# name: Build with gcc 4.9
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: CmakeAndBuild
# run: |
# sudo apt-add-repository -y 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial main'
# sudo apt-add-repository -y 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe'
# sudo apt-get update
# sudo apt-get install -y build-essential
# sudo apt-get install -y gcc-4.9 g++-4.9 gcc-4.9-multilib
# ./scripts/bootstrap-gcc-49.sh
# cd build-gcc49
# make VERBOSE=1
## compile with older gcc5
#build-gcc5:
# runs-on: ubuntu-latest
# name: Build with gcc 5
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: CmakeAndBuild
# run: |
# sudo apt-add-repository -y 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial main'
# sudo apt-add-repository -y 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe'
# sudo apt-get update
# sudo apt-get install -y build-essential
# sudo apt-get install -y gcc-5 g++-5
# ./scripts/bootstrap-gcc-5.sh
# cd build-gcc5
# make VERBOSE=1
# We can now use native arm64 runner
## Cross-compile for aarch64 linux target
#build-cross-aarch64:
# runs-on: ubuntu-latest
# name: Build on cross aarch64
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: CmakeAndBuild
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential
# sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# ./scripts/bootstrap-gcc-aarch64-cross-ci.sh
# cd build-cross
# make VERBOSE=1
# Build with OpenSubdiv
build-osd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: configure
run: ./scripts/bootstrap-cmake-linux-with-osd.sh
- name: make
run: cd build && make
- name: test
run: cd build && ctest --output-on-failure
# 32bit build(Linux only)
build-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo apt update
sudo apt-get install -y gcc-multilib g++-multilib
- name: configure
run: ./scripts/bootstrap-cmake-linux-32bit.sh
- name: make
run: cd build_m32 && make
- name: test
run: cd build_m32 && ctest --output-on-failure
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# ubuntu-latest(Ubuntu 22.04 as of 2024/01/03) has clang installed,
# so use clang
# TODO: Use libc++ for STL?
- name: configure
run: CXX=clang++ CC=clang ./scripts/bootstrap-cmake-linux.sh
- name: make
run: cd build && make
- name: tests
run: cd build && ctest --output-on-failure
# Test with OpenUSD binary
- name: Install TBB dependency
run: |
sudo apt-get update
sudo apt-get install -y libtbb12
- 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:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v2
- name: prep
run: |
lscpu
cat /proc/cpuinfo
- name: configure
run: CXX=clang++ CC=clang ./scripts/bootstrap-cmake-linux-asan.sh
- name: make
run: cd build_asan && make -j4
# Dedicated USDC tests for files that have shown issues on ARM64
- name: test usdc timesamples files with ASan
run: |
echo "Testing USDC timesamples files with tusdcat (ASan enabled)..."
./build_asan/tusdcat tests/usdc/timesamples-array-vec2f-001.usdc
./build_asan/tusdcat tests/usdc/timesamples-array-float-001.usdc
./build_asan/tusdcat tests/usdc/timesamples-array-int-001.usdc
./build_asan/tusdcat tests/usdc/timesamples-array-dedup-002.usdc
./build_asan/tusdcat tests/usdc/timesamples-array-dedup-001.usdc
./build_asan/tusdcat tests/usdc/timesamples-array-double-001.usdc
echo "All USDC timesamples tests passed."
build-arm64-gcc:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v2
- name: prep
run: |
lscpu
cat /proc/cpuinfo
- name: configure
run: CXX=g++ CC=gcc ./scripts/bootstrap-cmake-linux.sh
- name: make
run: cd build && make
- name: Upload ARM64 tusdcat binary
uses: actions/upload-artifact@v4
with:
name: tusdcat-linux-arm64-gcc
path: build/tusdcat
retention-days: 7
# Dedicated USDC tests for files that have shown issues on ARM64
- name: test usdc timesamples files
run: |
echo "Testing USDC timesamples files with tusdcat..."
./build/tusdcat tests/usdc/timesamples-array-vec2f-001.usdc
./build/tusdcat tests/usdc/timesamples-array-float-001.usdc
./build/tusdcat tests/usdc/timesamples-array-int-001.usdc
./build/tusdcat tests/usdc/timesamples-array-dedup-002.usdc
./build/tusdcat tests/usdc/timesamples-array-dedup-001.usdc
./build/tusdcat tests/usdc/timesamples-array-double-001.usdc
echo "All USDC timesamples tests passed."
- name: tests
run: cd build && ctest --output-on-failure
build-arm64-clang:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v2
- name: prep
run: |
lscpu
cat /proc/cpuinfo
# Install recent Clang from LLVM apt repository
- name: install clang-21
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main"
sudo apt-get update
sudo apt-get install -y clang-21
- name: configure
run: CXX=clang++-21 CC=clang-21 ./scripts/bootstrap-cmake-linux.sh
- name: make
run: cd build && make
- name: Upload ARM64 tusdcat binary
uses: actions/upload-artifact@v4
with:
name: tusdcat-linux-arm64-clang
path: build/tusdcat
retention-days: 7
# Dedicated USDC tests for files that have shown issues on ARM64
- name: test usdc timesamples files
run: |
echo "Testing USDC timesamples files with tusdcat..."
./build/tusdcat tests/usdc/timesamples-array-vec2f-001.usdc
./build/tusdcat tests/usdc/timesamples-array-float-001.usdc
./build/tusdcat tests/usdc/timesamples-array-int-001.usdc
./build/tusdcat tests/usdc/timesamples-array-dedup-002.usdc
./build/tusdcat tests/usdc/timesamples-array-dedup-001.usdc
./build/tusdcat tests/usdc/timesamples-array-double-001.usdc
echo "All USDC timesamples tests passed."
- name: tests
run: cd build && ctest --output-on-failure
# Test with OpenUSD binary (ARM64)
- name: Install TBB dependency (ARM64)
run: |
sudo apt-get update
sudo apt-get install -y libtbb12
- name: Download OpenUSD binary (ARM64)
run: |
gh release download v25.11-lte \
--repo lighttransport/openusd-bin \
--pattern 'openusd-*-minsizerel-linux-arm64.tar.gz'
env:
GH_TOKEN: ${{ github.token }}
- name: Extract and setup OpenUSD (ARM64)
run: |
tar -xzf openusd-*-minsizerel-linux-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 "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!"