Skip to content

Commit f20f535

Browse files
camille-004claude
andcommitted
ci: separate benchmark tests into dedicated job
- Exclude benchmarks from the regular test job with -m "not benchmark" to prevent GPU OOM from large tensor allocations competing with parallel test jobs - Add a dedicated benchmark job (Python 3.10 only, continue-on-error) mirroring the GitLab CI pattern - Add git safe.directory config to the test job to fix dorny/test-reporter failing with git exit code 128 in Docker containers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cf3c138 commit f20f535

1 file changed

Lines changed: 55 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ jobs:
158158
- name: Checkout repository
159159
uses: actions/checkout@v6
160160

161+
- name: Mark workspace as safe directory
162+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
163+
161164
- name: Download wheel
162165
uses: actions/download-artifact@v7
163166
with:
@@ -168,7 +171,7 @@ jobs:
168171
run: pip install dist/*.whl
169172

170173
- name: Run tests
171-
run: pytest --durations=10 --junitxml=test-results.xml .
174+
run: pytest --durations=10 --junitxml=test-results.xml -m "not benchmark" .
172175

173176
- name: Upload test results
174177
if: ${{ !cancelled() }}
@@ -185,3 +188,54 @@ jobs:
185188
name: Test Results (Python ${{ matrix.python-version }})
186189
path: test-results.xml
187190
reporter: java-junit
191+
192+
benchmark:
193+
name: Benchmark
194+
needs: [images, build]
195+
runs-on: [self-hosted, gpu]
196+
timeout-minutes: 60
197+
continue-on-error: true
198+
permissions:
199+
contents: read
200+
packages: read
201+
checks: write
202+
container:
203+
image: ${{ needs.images.outputs.test_py310 }}
204+
credentials:
205+
username: ${{ github.actor }}
206+
password: ${{ secrets.GITHUB_TOKEN }}
207+
options: --gpus all
208+
steps:
209+
- name: Checkout repository
210+
uses: actions/checkout@v6
211+
212+
- name: Mark workspace as safe directory
213+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
214+
215+
- name: Download wheel
216+
uses: actions/download-artifact@v7
217+
with:
218+
name: wheel-py3.10-linux-x86_64
219+
path: dist/
220+
221+
- name: Install wheel
222+
run: pip install dist/*.whl
223+
224+
- name: Run benchmarks
225+
run: pytest --durations=10 --junitxml=benchmark-results.xml -m "benchmark" .
226+
227+
- name: Upload benchmark results
228+
if: ${{ !cancelled() }}
229+
uses: actions/upload-artifact@v6
230+
with:
231+
name: benchmark-results
232+
path: benchmark-results.xml
233+
retention-days: 7
234+
235+
- name: Report benchmark results
236+
if: ${{ !cancelled() }}
237+
uses: dorny/test-reporter@v3
238+
with:
239+
name: Benchmark Results
240+
path: benchmark-results.xml
241+
reporter: java-junit

0 commit comments

Comments
 (0)