Repository navigation
129 lines (112 loc) · 3.79 KB
/
Copy pathtest-linux.yml
File metadata and controls
129 lines (112 loc) · 3.79 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
name: test-linux
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
# Run tests once a week on Sunday.
schedule:
- cron: "0 6 * * 0"
permissions:
contents: read
jobs:
test-linux:
runs-on: ubuntu-latest
timeout-minutes: 300
strategy:
fail-fast: false
matrix:
usd: ["v25.11", "v26.03"]
python: ["", "3.10", "3.12"]
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python }}
if: matrix.python != ''
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Create Build Environment
run: |
sudo apt update
sudo apt install -y libgtest-dev ninja-build
mkdir -p ${{github.workspace}}/build
mkdir -p ${{runner.temp}}/USD
- name: Install test Python deps
if: matrix.python != ''
run: |
python -m pip install -r ${{github.workspace}}/test/requirements.txt
- name: Download USD
working-directory: ${{runner.temp}}/USD
run: |
git clone https://github.com/PixarAnimationStudios/OpenUSD.git \
--depth 1 --branch ${{ matrix.usd }} ./src
- name: Install USD
if: matrix.python != ''
working-directory: ${{runner.temp}}/USD
run: |
python ./src/build_scripts/build_usd.py . \
--no-tests \
--no-examples \
--no-tutorials \
--no-tools \
--no-docs \
--no-imaging \
--no-materialx \
-v
- name: Install USD (without Python)
if: matrix.python == ''
working-directory: ${{runner.temp}}/USD
run: |
python ./src/build_scripts/build_usd.py . \
--no-tests \
--no-examples \
--no-tutorials \
--no-tools \
--no-docs \
--no-imaging \
--no-materialx \
--no-python \
-v
- name: Configure & Build
if: matrix.python != ''
working-directory: ${{github.workspace}}/build
run: |
export PYTHONPATH="${{runner.temp}}/USD/lib/python"
cmake \
-D "BUILD_DOCS=OFF" \
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
-D "TBB_VERSION_H=${{runner.temp}}/USD/include/tbb/tbb_stddef.h" \
..
cmake --build . --config Release
- name: Configure & Build (without Python)
if: matrix.python == ''
working-directory: ${{github.workspace}}/build
run: |
cmake \
-D "BUILD_DOCS=OFF" \
-D "BUILD_PYTHON_BINDINGS=OFF" \
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
-D "TBB_VERSION_H=${{runner.temp}}/USD/include/tbb/tbb_stddef.h" \
..
cmake --build . --config Release
- name: Check for formatting errors
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --target format
STATUS_OUTPUT=$(git -C .. status --porcelain)
if [ -n "$STATUS_OUTPUT" ]; then
echo "Code formatting errors found:"
git -C .. diff
exit 1
else
echo "No formatting errors found."
fi
- name: Run Test
working-directory: ${{github.workspace}}/build
run: ctest -VV
env:
CTEST_OUTPUT_ON_FAILURE: True
PCP_ENABLE_MINIMAL_CHANGES_FOR_LAYER_OPERATIONS: 0