Skip to content

Commit 6b3d392

Browse files
committed
fix CI
Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent 9482993 commit 6b3d392

File tree

3 files changed

+32
-67
lines changed

3 files changed

+32
-67
lines changed

.github/workflows/build.yml

+22-26
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,26 @@ jobs:
2828
strategy:
2929
matrix:
3030
usdVersion:
31-
- 21.05
31+
- 24.05
3232
include:
33-
- usdVersion: 21.05
34-
usdVersionUrl: 21-05
35-
pythonVersion: 3.6
36-
USE_PYTHON_3: ON
33+
- usdVersion: 24.05
34+
usdVersionUrl: '24.05/[email protected]+release.2864f3d0'
35+
pythonVersion: '3.10'
3736
buildType: Release
3837
buildTests: 'ON'
39-
runs-on: ubuntu-18.04
40-
name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries
38+
runs-on: ubuntu-22.04
39+
name: 'Ubuntu 22.04 NVIDIA Pre-built Binaries
4140
<USD Version=${{ matrix.usdVersion }},
4241
Python Version=${{ matrix.pythonVersion }},
4342
Build type:${{ matrix.buildType }},
4443
Enable tests=${{ matrix.build-tests }}>'
4544
steps:
4645
- name: Install dependencies (Linux)
4746
run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev
48-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v4
4948
- name: Download and extract pre-built USD binaries
5049
run: |
51-
curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }}
50+
curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/downloads/usd/usd_binaries/${{ matrix.usdVersionUrl }}.zip
5251
mkdir -p /tmp/usd-${{ matrix.usdVersion }}
5352
7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }}
5453
- name: Create build directories
@@ -59,8 +58,7 @@ jobs:
5958
run: |
6059
cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
6160
-DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
62-
-DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
63-
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \
61+
-DBoost_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
6462
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \
6563
-DBUILD_TESTING=${{ matrix.buildTests }} \
6664
-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \
@@ -84,29 +82,28 @@ jobs:
8482
strategy:
8583
matrix:
8684
usdVersion:
87-
- 21.05
85+
- 24.05
8886
include:
89-
- usdVersion: 21.05
90-
usdVersionUrl: 21-05
91-
pythonVersion: 3.6
92-
USE_PYTHON_3: ON
87+
- usdVersion: 24.05
88+
usdVersionUrl: '24.05/[email protected]+release.2864f3d0'
89+
pythonVersion: '3.10'
9390
buildType: Release
9491
buildTests: ON
95-
runs-on: windows-2016
96-
name: 'Windows 2016 NVIDIA Pre-built Binaries
92+
runs-on: windows-2019
93+
name: 'Windows 2019 NVIDIA Pre-built Binaries
9794
<USD Version=${{ matrix.usdVersion }},
9895
Python Version=${{ matrix.pythonVersion }},
9996
Build type:${{ matrix.buildType }},
10097
Enable tests=${{ matrix.build-tests }}>'
10198
steps:
102-
- uses: actions/checkout@v2
99+
- uses: actions/checkout@v4
103100
- name: Set up Python ${{ matrix.pythonVersion }}
104101
uses: actions/setup-python@v2
105102
with:
106103
python-version: ${{ matrix.pythonVersion }}
107104
- name: Download and extract pre-built USD binaries
108105
run: |
109-
Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
106+
Invoke-WebRequest https://developer.nvidia.com/downloads/usd/usd_binaries/${{ matrix.usdVersionUrl }}.zip -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
110107
mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }}
111108
7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y
112109
- name: Create build directories
@@ -117,12 +114,11 @@ jobs:
117114
run: |
118115
cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
119116
-DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
120-
-DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
121-
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} `
117+
-DBoost_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
122118
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} `
123119
-DBUILD_TESTING=${{ matrix.buildTests }} `
124120
-DCMAKE_INSTALL_PREFIX="../_install" `
125-
-G "Visual Studio 15 2017 Win64" `
121+
-G "Visual Studio 16 2019" `
126122
../usd
127123
working-directory: "_build"
128124
- name: Build
@@ -148,12 +144,12 @@ jobs:
148144

149145
# Run automated code formatting checks.
150146
code-formatting-check:
151-
runs-on: ubuntu-18.04
147+
runs-on: ubuntu-24.04
152148
steps:
153149
- name: Install dependencies (Linux)
154150
run: |
155-
sudo apt-get install clang-format-10
156-
- uses: actions/checkout@v2
151+
sudo apt-get install clang-format-16
152+
- uses: actions/checkout@v4
157153
- name: Run clang-format on source code
158154
run: |
159155
find . \

usd/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ endif()
7777
# Export targets and install package files.
7878
# This must come after source tree recursion as exporting targets
7979
# requires the targets to be defined in the first place!
80-
include(Export)
80+
81+
# include(Export) # TODO

usd/cmake/Packages.cmake

+8-40
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,16 @@
44

55
# Boost & python.
66
if (ENABLE_PYTHON_SUPPORT)
7-
# Find python libraries.
8-
if (USE_PYTHON_3)
9-
find_package(PythonInterp 3.0 REQUIRED)
10-
find_package(PythonLibs 3.0 REQUIRED)
11-
else()
12-
find_package(PythonInterp 2.7 REQUIRED)
13-
find_package(PythonLibs 2.7 REQUIRED)
14-
endif()
15-
16-
# Pick up boost version variables.
17-
find_package(Boost REQUIRED)
18-
19-
# We can use Boost_VERSION_STRING in CMake 3.14+.
20-
set(boost_version_string "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
21-
22-
# Boost provided cmake files in 1.70 and above causes inconsistent failures.
23-
if (${boost_version_string} VERSION_GREATER_EQUAL "1.70")
24-
option(Boost_NO_BOOST_CMAKE "Disable boost-provided cmake config" ON)
25-
if (Boost_NO_BOOST_CMAKE)
26-
message(STATUS "Disabling boost-provided cmake config")
27-
endif()
28-
endif()
29-
30-
if (${boost_version_string} VERSION_GREATER_EQUAL "1.67")
31-
# In boost-1.67 and greater, the boost python component includes the
32-
# python major and minor version as part of its name.
33-
set(PYTHON_VERSION_DOTLESS "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
34-
find_package(Boost
35-
COMPONENTS
36-
python${PYTHON_VERSION_DOTLESS}
37-
REQUIRED
38-
)
39-
set(Boost_PYTHON_LIBRARY "${Boost_PYTHON${PYTHON_VERSION_DOTLESS}_LIBRARY}")
40-
else()
41-
find_package(Boost
42-
COMPONENTS
43-
python
44-
REQUIRED
45-
)
46-
endif()
7+
find_package (Python3 COMPONENTS Interpreter Development Development.Module)
8+
find_package (Boost CONFIG COMPONENTS python REQUIRED)
479
endif()
4810

4911
# USD & TBB
12+
set(Python3_LIBRARY ${Python3_LIBRARIES})
13+
set(Python3_INCLUDE_DIR ${Python3_INCLUDE_DIRS})
14+
15+
list (APPEND CMAKE_PREFIX_PATH ${USD_ROOT}/lib/cmake)
16+
list (APPEND CMAKE_PREFIX_PATH ${USD_ROOT}/lib64/cmake)
17+
5018
include(${USD_ROOT}/pxrConfig.cmake)
5119
find_package(TBB REQUIRED)

0 commit comments

Comments
 (0)