Skip to content

Commit ad4ad58

Browse files
committed
Add CI test for build without python
1 parent 54940f0 commit ad4ad58

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

.github/workflows/test-linux.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
usd: ["v24.08", "v25.05"]
25-
python: ["3.10", "3.12"]
25+
python: ["", "3.10", "3.12"]
2626

27-
name: "USD-${{ matrix.usd }}-py${{ matrix.python }}"
27+
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"
2828

2929
steps:
3030
- uses: actions/checkout@v4
3131

3232
- name: Set up Python ${{ matrix.python }}
33+
if: matrix.python != ''
3334
uses: actions/setup-python@v5
3435
with:
3536
python-version: ${{ matrix.python }}
@@ -38,10 +39,14 @@ jobs:
3839
run: |
3940
sudo apt update
4041
sudo apt install -y libgtest-dev ninja-build
41-
python -m pip install -r ${{github.workspace}}/test/requirements.txt
4242
mkdir -p ${{github.workspace}}/build
4343
mkdir -p ${{runner.temp}}/USD
4444
45+
- name: Install test Python deps
46+
if: matrix.python != ''
47+
run: |
48+
python -m pip install -r ${{github.workspace}}/test/requirements.txt
49+
4550
- name: Download USD
4651
working-directory: ${{runner.temp}}/USD
4752
run: |
@@ -57,6 +62,7 @@ jobs:
5762
sed -i '/BOOST_URL/ s|\.zip"|.zip/download"|' src/build_scripts/build_usd.py
5863
5964
- name: Install USD
65+
if: matrix.python != ''
6066
working-directory: ${{runner.temp}}/USD
6167
run: |
6268
python ./src/build_scripts/build_usd.py . \
@@ -69,7 +75,23 @@ jobs:
6975
--no-materialx \
7076
-v
7177
78+
- name: Install USD (without Python)
79+
if: matrix.python == ''
80+
working-directory: ${{runner.temp}}/USD
81+
run: |
82+
python ./src/build_scripts/build_usd.py . \
83+
--no-tests \
84+
--no-examples \
85+
--no-tutorials \
86+
--no-tools \
87+
--no-docs \
88+
--no-imaging \
89+
--no-materialx \
90+
--no-python \
91+
-v
92+
7293
- name: Configure & Build
94+
if: matrix.python != ''
7395
working-directory: ${{github.workspace}}/build
7496
run: |
7597
export PYTHONPATH="${{runner.temp}}/USD/lib/python"
@@ -80,6 +102,18 @@ jobs:
80102
..
81103
cmake --build . --config Release
82104
105+
- name: Configure & Build (without Python)
106+
if: matrix.python == ''
107+
working-directory: ${{github.workspace}}/build
108+
run: |
109+
cmake \
110+
-D "BUILD_DOCS=OFF" \
111+
-D "BUILD_PYTHON_BINDINGS=OFF" \
112+
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
113+
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
114+
..
115+
cmake --build . --config Release
116+
83117
- name: Check for formatting errors
84118
working-directory: ${{github.workspace}}/build
85119
run: |

0 commit comments

Comments
 (0)