@@ -15,17 +15,25 @@ concurrency:
1515 group : ${{ github.workflow }}-${{ github.ref }}
1616 cancel-in-progress : true
1717
18+ permissions :
19+ contents : read
20+ packages : read
21+
1822jobs :
1923 images :
2024 name : Define Base Images
2125 runs-on : ubuntu-latest
2226 outputs :
23- lint : ghcr.io/nvidia/cutile-python/lint:2026-03-02-d33a8a50c68d
24- docs : ghcr.io/nvidia/cutile-python/docs:2026-03-02-2ab6fb9d9368
25- build_py310 : ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2026-03-02-c7f3f36001fd
26- build_py311 : ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2026-03-02-92c972404358
27- build_py312 : ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2026-03-02-299d123ad082
28- build_py313 : ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2026-03-02-8eea98e968b5
27+ lint : ghcr.io/nvidia/cutile-python/lint:2026-03-18-3ee906b0ced0
28+ docs : ghcr.io/nvidia/cutile-python/docs:2026-03-18-67c908a4176e
29+ build_py310 : ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2026-03-18-a2fdea5320fe
30+ build_py311 : ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2026-03-18-8573f3996301
31+ build_py312 : ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2026-03-18-63835ff03f5d
32+ build_py313 : ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2026-03-18-9cadab6c475e
33+ test_py310 : ghcr.io/nvidia/cutile-python/test_py_3.10_x86_64:2026-03-25-d688c40b1f28
34+ test_py311 : ghcr.io/nvidia/cutile-python/test_py_3.11_x86_64:2026-03-25-ee977c750e6a
35+ test_py312 : ghcr.io/nvidia/cutile-python/test_py_3.12_x86_64:2026-03-25-4a28b7ac9c10
36+ test_py313 : ghcr.io/nvidia/cutile-python/test_py_3.13_x86_64:2026-03-25-daa77b7df120
2937 steps :
3038 - run : echo "Defining image tags"
3139
6775 uses : actions/checkout@v6
6876
6977 - name : Download wheel
70- uses : actions/download-artifact@v4
78+ uses : actions/download-artifact@v7
7179 with :
7280 name : wheel-py3.12-linux-x86_64
7381 path : dist/
7987 run : make -C docs html
8088
8189 - name : Upload docs artifact
82- uses : actions/upload-artifact@v4
90+ uses : actions/upload-artifact@v6
8391 with :
8492 name : docs-html
8593 path : docs/build/html
9199 runs-on : ubuntu-latest
92100 timeout-minutes : 30
93101 strategy :
102+ fail-fast : false
94103 matrix :
95104 include :
96105 - python-version : " 3.10"
@@ -111,9 +120,124 @@ jobs:
111120 run : python setup.py bdist_wheel
112121
113122 - name : Upload wheel artifact
114- uses : actions/upload-artifact@v4
123+ uses : actions/upload-artifact@v6
115124 with :
116125 name : wheel-py${{ matrix.python-version }}-linux-x86_64
117126 path : dist/*.whl
118127 if-no-files-found : error
119128 retention-days : 7
129+
130+ test :
131+ name : Test (Python ${{ matrix.python-version }})
132+ needs : [images, build]
133+ runs-on : [self-hosted, gpu]
134+ timeout-minutes : 60
135+ permissions :
136+ contents : read
137+ packages : read
138+ checks : write
139+ strategy :
140+ fail-fast : false
141+ matrix :
142+ include :
143+ - python-version : " 3.10"
144+ image_key : test_py310
145+ - python-version : " 3.11"
146+ image_key : test_py311
147+ - python-version : " 3.12"
148+ image_key : test_py312
149+ - python-version : " 3.13"
150+ image_key : test_py313
151+ container :
152+ image : ${{ needs.images.outputs[matrix.image_key] }}
153+ credentials :
154+ username : ${{ github.actor }}
155+ password : ${{ secrets.GITHUB_TOKEN }}
156+ options : --gpus all
157+ steps :
158+ - name : Checkout repository
159+ uses : actions/checkout@v6
160+
161+ - name : Mark workspace as safe directory
162+ run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
163+
164+ - name : Download wheel
165+ uses : actions/download-artifact@v7
166+ with :
167+ name : wheel-py${{ matrix.python-version }}-linux-x86_64
168+ path : dist/
169+
170+ - name : Install wheel
171+ run : pip install dist/*.whl
172+
173+ - name : Run tests
174+ run : pytest --durations=10 --junitxml=test-results.xml -m "not benchmark" .
175+
176+ - name : Upload test results
177+ if : ${{ !cancelled() }}
178+ uses : actions/upload-artifact@v6
179+ with :
180+ name : test-results-py${{ matrix.python-version }}
181+ path : test-results.xml
182+ retention-days : 7
183+
184+ - name : Report test results
185+ if : ${{ !cancelled() }}
186+ uses : dorny/test-reporter@v3
187+ with :
188+ name : Test Results (Python ${{ matrix.python-version }})
189+ path : test-results.xml
190+ reporter : java-junit
191+ fail-on-error : false
192+
193+ benchmark :
194+ name : Benchmark
195+ needs : [images, build, test]
196+ runs-on : [self-hosted, gpu]
197+ timeout-minutes : 60
198+ continue-on-error : true
199+ permissions :
200+ contents : read
201+ packages : read
202+ checks : write
203+ container :
204+ image : ${{ needs.images.outputs.test_py310 }}
205+ credentials :
206+ username : ${{ github.actor }}
207+ password : ${{ secrets.GITHUB_TOKEN }}
208+ options : --gpus all
209+ steps :
210+ - name : Checkout repository
211+ uses : actions/checkout@v6
212+
213+ - name : Mark workspace as safe directory
214+ run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
215+
216+ - name : Download wheel
217+ uses : actions/download-artifact@v7
218+ with :
219+ name : wheel-py3.10-linux-x86_64
220+ path : dist/
221+
222+ - name : Install wheel
223+ run : pip install dist/*.whl
224+
225+ - name : Run benchmarks
226+ run : pytest --durations=10 --junitxml=benchmark-results.xml -m "benchmark" .
227+
228+ - name : Upload benchmark results
229+ if : ${{ !cancelled() }}
230+ uses : actions/upload-artifact@v6
231+ with :
232+ name : benchmark-results
233+ path : benchmark-results.xml
234+ retention-days : 7
235+
236+ - name : Report benchmark results
237+ if : ${{ !cancelled() }}
238+ uses : dorny/test-reporter@v3
239+ with :
240+ name : Benchmark Results
241+ path : benchmark-results.xml
242+ reporter : java-junit
243+ fail-on-error : false
0 commit comments