Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI #6

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 22 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,26 @@ jobs:
strategy:
matrix:
usdVersion:
- 21.05
- 24.05
include:
- usdVersion: 21.05
usdVersionUrl: 21-05
pythonVersion: 3.6
USE_PYTHON_3: ON
- usdVersion: 24.05
usdVersionUrl: '24.05/[email protected]+release.2864f3d0'
pythonVersion: '3.10'
buildType: Release
buildTests: 'ON'
runs-on: ubuntu-18.04
name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries
runs-on: ubuntu-22.04
name: 'Ubuntu 22.04 NVIDIA Pre-built Binaries
<USD Version=${{ matrix.usdVersion }},
Python Version=${{ matrix.pythonVersion }},
Build type:${{ matrix.buildType }},
Enable tests=${{ matrix.build-tests }}>'
steps:
- name: Install dependencies (Linux)
run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download and extract pre-built USD binaries
run: |
curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }}
curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/downloads/usd/usd_binaries/${{ matrix.usdVersionUrl }}.zip
mkdir -p /tmp/usd-${{ matrix.usdVersion }}
7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }}
- name: Create build directories
Expand All @@ -59,8 +58,7 @@ jobs:
run: |
cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \
-DBoost_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \
-DBUILD_TESTING=${{ matrix.buildTests }} \
-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \
Expand All @@ -84,29 +82,28 @@ jobs:
strategy:
matrix:
usdVersion:
- 21.05
- 24.05
include:
- usdVersion: 21.05
usdVersionUrl: 21-05
pythonVersion: 3.6
USE_PYTHON_3: ON
- usdVersion: 24.05
usdVersionUrl: '24.05/[email protected]+release.2864f3d0'
pythonVersion: '3.10'
buildType: Release
buildTests: ON
runs-on: windows-2016
name: 'Windows 2016 NVIDIA Pre-built Binaries
runs-on: windows-2019
name: 'Windows 2019 NVIDIA Pre-built Binaries
<USD Version=${{ matrix.usdVersion }},
Python Version=${{ matrix.pythonVersion }},
Build type:${{ matrix.buildType }},
Enable tests=${{ matrix.build-tests }}>'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pythonVersion }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pythonVersion }}
- name: Download and extract pre-built USD binaries
run: |
Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
Invoke-WebRequest https://developer.nvidia.com/downloads/usd/usd_binaries/${{ matrix.usdVersionUrl }}.zip -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }}
7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y
- name: Create build directories
Expand All @@ -117,12 +114,11 @@ jobs:
run: |
cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} `
-DBoost_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} `
-DBUILD_TESTING=${{ matrix.buildTests }} `
-DCMAKE_INSTALL_PREFIX="../_install" `
-G "Visual Studio 15 2017 Win64" `
-G "Visual Studio 16 2019" `
../usd
working-directory: "_build"
- name: Build
Expand All @@ -148,12 +144,12 @@ jobs:

# Run automated code formatting checks.
code-formatting-check:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- name: Install dependencies (Linux)
run: |
sudo apt-get install clang-format-10
- uses: actions/checkout@v2
sudo apt-get install clang-format-16
- uses: actions/checkout@v4
- name: Run clang-format on source code
run: |
find . \
Expand Down
3 changes: 2 additions & 1 deletion usd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ endif()
# Export targets and install package files.
# This must come after source tree recursion as exporting targets
# requires the targets to be defined in the first place!
include(Export)

# include(Export) # TODO
48 changes: 8 additions & 40 deletions usd/cmake/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,16 @@

# Boost & python.
if (ENABLE_PYTHON_SUPPORT)
# Find python libraries.
if (USE_PYTHON_3)
find_package(PythonInterp 3.0 REQUIRED)
find_package(PythonLibs 3.0 REQUIRED)
else()
find_package(PythonInterp 2.7 REQUIRED)
find_package(PythonLibs 2.7 REQUIRED)
endif()

# Pick up boost version variables.
find_package(Boost REQUIRED)

# We can use Boost_VERSION_STRING in CMake 3.14+.
set(boost_version_string "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")

# Boost provided cmake files in 1.70 and above causes inconsistent failures.
if (${boost_version_string} VERSION_GREATER_EQUAL "1.70")
option(Boost_NO_BOOST_CMAKE "Disable boost-provided cmake config" ON)
if (Boost_NO_BOOST_CMAKE)
message(STATUS "Disabling boost-provided cmake config")
endif()
endif()

if (${boost_version_string} VERSION_GREATER_EQUAL "1.67")
# In boost-1.67 and greater, the boost python component includes the
# python major and minor version as part of its name.
set(PYTHON_VERSION_DOTLESS "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
find_package(Boost
COMPONENTS
python${PYTHON_VERSION_DOTLESS}
REQUIRED
)
set(Boost_PYTHON_LIBRARY "${Boost_PYTHON${PYTHON_VERSION_DOTLESS}_LIBRARY}")
else()
find_package(Boost
COMPONENTS
python
REQUIRED
)
endif()
find_package (Python3 COMPONENTS Interpreter Development Development.Module)
find_package (Boost CONFIG COMPONENTS python REQUIRED)
endif()

# USD & TBB
set(Python3_LIBRARY ${Python3_LIBRARIES})
set(Python3_INCLUDE_DIR ${Python3_INCLUDE_DIRS})

list (APPEND CMAKE_PREFIX_PATH ${USD_ROOT}/lib/cmake)
list (APPEND CMAKE_PREFIX_PATH ${USD_ROOT}/lib64/cmake)

include(${USD_ROOT}/pxrConfig.cmake)
find_package(TBB REQUIRED)
Loading