forked from PixarAnimationStudios/OpenUSD
-
Notifications
You must be signed in to change notification settings - Fork 0
195 lines (190 loc) · 7.27 KB
/
buildusd.yml
File metadata and controls
195 lines (190 loc) · 7.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: BuildUSD
on:
push:
branches:
- dev
- release
pull_request:
branches:
- dev
paths:
- '**'
- '!.github/workflows/**'
jobs:
Validation:
runs-on: ubuntu-22.04
timeout-minutes: 30
outputs:
validation-failed: ${{ steps.changed-workflows.outputs.any_changed }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Check workflows directory
id: changed-workflows
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c #v46
with:
files: |
.github/workflows/**
Linux:
needs:
- Validation
if: ${{ (github.event_name == 'pull_request' && needs.Validation.outputs.validation-failed != 'true') || github.event_name == 'push' }}
runs-on: ubuntu-22.04
env:
PYTHON_VERSION: "3.9"
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Restore cached artifacts
id: cache-usd-build-dependency
uses: actions/cache/restore@v4
with:
path: |
USDinst
key: ${{ runner.os }}-BuildUSD-py${{ env.PYTHON_VERSION }}-${{ hashFiles('build_scripts/**/*') }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: false
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y python3-setuptools libglew-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev
pip install --upgrade pip
pip install PySide2 PyOpenGL
- name: Build USD
run: |
# Not using '--tests' to avoid building extra dependencies that are unneeded for headless tests
python3 build_scripts/build_usd.py --no-materialx --build USDgen/build --src USDgen/src USDinst --build-args USD,"-DPXR_HEADLESS_TEST_MODE=ON -DPXR_BUILD_TESTS=ON" -v
- name: Save build artifacts to cache
if: steps.cache-usd-build-dependency.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
USDinst
key: ${{ steps.cache-usd-build-dependency.outputs.cache-primary-key }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: usd-linux
path: USDinst
- name: Test USD
working-directory: ./USDgen/build/OpenUSD
run: |
ctest --output-on-failure -j4 -C Release --exclude-regex "testExecGeomXformable_Perf_Large"
macOS:
needs:
- Validation
if: ${{ (github.event_name == 'pull_request' && needs.Validation.outputs.validation-failed != 'true') || github.event_name == 'push' }}
runs-on: macos-15
env:
PYTHON_VERSION: "3.11"
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Restore cached artifacts
id: cache-usd-build-dependency
uses: actions/cache/restore@v4
with:
path: |
USDinst
key: ${{ runner.os }}-BuildUSD-py${{ env.PYTHON_VERSION }}-${{ hashFiles('build_scripts/**/*') }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: false
- name: Install dependencies
run: |
export PATH=/Applications/CMake.app/Contents/bin:$PATH
sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
# Set SYSTEM_VERSION_COMPAT while installing Python packages to
# accommodate the macOS version numbering change from 10.x to 11
export SYSTEM_VERSION_COMPAT=1
pip install PySide6 PyOpenGL setuptools
export -n SYSTEM_VERSION_COMPAT
- name: Build USD
run: |
# Not using '--tests' to avoid building extra dependencies that are unneeded for headless tests
export PATH=/Applications/CMake.app/Contents/bin:$PATH
python3 build_scripts/build_usd.py --no-materialx --generator Xcode --build USDgen/build --src USDgen/src USDinst --build-args USD,"-DPXR_HEADLESS_TEST_MODE=ON -DPXR_BUILD_TESTS=ON" -v
- name: Save build artifacts to cache
if: steps.cache-usd-build-dependency.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
USDinst
key: ${{ steps.cache-usd-build-dependency.outputs.cache-primary-key }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: usd-macOS
path: USDinst
- name: Test USD
working-directory: ./USDgen/build/OpenUSD
run: |
export PATH=/Applications/CMake.app/Contents/bin:$PATH
ctest --output-on-failure -j4 -C Release --exclude-regex "testExecGeomXformable_Perf_Large"
Windows:
needs:
- Validation
if: ${{ (github.event_name == 'pull_request' && needs.Validation.outputs.validation-failed != 'true') || github.event_name == 'push' }}
runs-on: windows-2022
env:
PYTHON_VERSION: "3.9"
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Restore cached artifacts
id: cache-usd-build-dependency
uses: actions/cache/restore@v4
with:
path: |
USDinst
key: ${{ runner.os }}-BuildUSD-py${{ env.PYTHON_VERSION }}-${{ hashFiles('build_scripts/**/*') }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install PyOpenGL PySide2
- name: Build USD
run: |
# Not using '--tests' to avoid building extra dependencies that are unneeded for headless tests
python build_scripts/build_usd.py --no-materialx --generator "Visual Studio 17 2022" --build USDgen/build --src USDgen/src USDinst --build-args USD,"-DPXR_ENABLE_PRECOMPILED_HEADERS=OFF -DPXR_HEADLESS_TEST_MODE=ON -DPXR_BUILD_TESTS=ON" -v
shell: cmd
- name: Save build artifacts to cache
if: steps.cache-usd-build-dependency.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
USDinst
key: ${{ steps.cache-usd-build-dependency.outputs.cache-primary-key }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: usd-win64
path: USDinst
- name: Test USD
working-directory: ./USDgen/build/OpenUSD
run: |
call set PATH=${{ github.workspace }}\USDinst\bin;${{ github.workspace }}\USDinst\lib;${{ github.workspace }}\USDinst\share\usd\examples\plugin;${{ github.workspace }}\USDinst\plugin\usd;%PATH%
call set PYTHONPATH=${{ github.workspace }}\USDinst\lib\python;%PYTHONPATH%
# Internal ticket USD-8035
ctest --output-on-failure -j4 -C Release --exclude-regex "TfPathUtils|testExecGeomXformable_Perf_Large"
shell: cmd