Skip to content

Commit 7129ac3

Browse files
authored
Reorganize benchmark step (#1211)
Start benchmarking early to get the benchmark results on time, aligning with other tests. Successful benchmarking is now required for the green build.
1 parent 4a54700 commit 7129ac3

File tree

1 file changed

+2
-56
lines changed

1 file changed

+2
-56
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -406,28 +406,12 @@ jobs:
406406
benchmark:
407407
name: Benchmark
408408
needs:
409-
- build-pure-python-dists # transitive, for accessing settings
410-
- build-wheels-for-tested-arches
411409
- pre-setup # transitive, for accessing settings
412410
runs-on: ubuntu-latest
413411
timeout-minutes: 10
414412
steps:
415413
- name: Checkout project
416414
uses: actions/checkout@v4
417-
- name: Retrieve the project source from an sdist inside the GHA artifact
418-
uses: re-actors/checkout-python-sdist@release/v2
419-
with:
420-
source-tarball-name: >-
421-
${{ needs.build-pure-python-dists.outputs.sdist-filename }}
422-
workflow-artifact-name: >-
423-
${{ needs.pre-setup.outputs.dists-artifact-name }}
424-
- name: Download distributions
425-
uses: actions/download-artifact@v4
426-
with:
427-
path: dist
428-
pattern: ${{ needs.pre-setup.outputs.dists-artifact-name }}*
429-
merge-multiple: true
430-
431415
- name: Setup Python 3.13
432416
id: python-install
433417
uses: actions/setup-python@v5
@@ -439,47 +423,8 @@ jobs:
439423
uses: py-actions/py-dependency-install@v4
440424
with:
441425
path: requirements/pytest.txt
442-
- name: Determine pre-compiled compatible wheel
443-
env:
444-
# NOTE: When `pip` is forced to colorize output piped into `jq`,
445-
# NOTE: the latter can't parse it. So we're overriding the color
446-
# NOTE: preference here via https://no-color.org.
447-
# NOTE: Setting `FORCE_COLOR` to any value (including 0, an empty
448-
# NOTE: string, or a "YAML null" `~`) doesn't have any effect and
449-
# NOTE: `pip` (through its verndored copy of `rich`) treats the
450-
# NOTE: presence of the variable as "force-color" regardless.
451-
#
452-
# NOTE: This doesn't actually work either, so we'll resort to unsetting
453-
# NOTE: in the Bash script.
454-
# NOTE: Ref: https://github.com/Textualize/rich/issues/2622
455-
NO_COLOR: 1
456-
id: wheel-file
457-
run: >
458-
echo -n path= | tee -a "${GITHUB_OUTPUT}"
459-
460-
461-
unset FORCE_COLOR
462-
463-
464-
python
465-
-X utf8
466-
-u -I
467-
-m pip install
468-
--find-links=./dist
469-
--no-index
470-
'${{ env.PROJECT_NAME }}'
471-
--force-reinstall
472-
--no-color
473-
--no-deps
474-
--only-binary=:all:
475-
--dry-run
476-
--report=-
477-
--quiet
478-
| jq --raw-output .install[].download_info.url
479-
| tee -a "${GITHUB_OUTPUT}"
480-
shell: bash
481426
- name: Self-install
482-
run: python -Im pip install '${{ steps.wheel-file.outputs.path }}'
427+
run: python -m pip install -e .
483428
- name: Run benchmarks
484429
uses: CodSpeedHQ/action@v3
485430
env:
@@ -499,6 +444,7 @@ jobs:
499444
- lint
500445
- pre-setup # transitive, for accessing settings
501446
- test
447+
- benchmark
502448
steps:
503449
- name: Decide whether the needed jobs succeeded or failed
504450
uses: re-actors/alls-green@release/v1

0 commit comments

Comments
 (0)