File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -454,9 +454,10 @@ jobs:
454
454
--release
455
455
--out pgo-wheel
456
456
--interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }}
457
- -- -Cprofile-generate=${{ github.workspace }}/profdata
458
457
rust-toolchain : stable
459
458
docker-options : -e CI
459
+ env :
460
+ RUSTFLAGS : " -Cprofile-generate=${{ github.workspace }}/profdata"
460
461
461
462
- name : detect rust host
462
463
run : echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
@@ -468,10 +469,9 @@ jobs:
468
469
pip install -r tests/requirements.txt
469
470
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
470
471
pytest tests/benchmarks
471
- rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
472
472
473
473
- name : merge pgo data
474
- run : ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
474
+ run : rustup run stable llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
475
475
476
476
- name : build pgo-optimized wheel
477
477
uses : PyO3/maturin-action@v1
@@ -482,9 +482,10 @@ jobs:
482
482
--release
483
483
--out dist
484
484
--interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }}
485
- -- -Cprofile-use=${{ github.workspace }}/merged.profdata
486
485
rust-toolchain : stable
487
486
docker-options : -e CI
487
+ env :
488
+ RUSTFLAGS : " -Cprofile-use=${{ github.workspace }}/merged.profdata"
488
489
489
490
- run : ${{ matrix.ls || 'ls -lh' }} dist/
490
491
Original file line number Diff line number Diff line change 62
62
run : pytest tests/benchmarks
63
63
64
64
- name : Prepare merged pgo data
65
- run : rustup run stable bash -c '$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/x86_64-unknown-linux-gnu/bin/ llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata'
65
+ run : rustup run stable llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
66
66
67
67
- name : Compile pydantic-core for benchmarking
68
68
# --no-default-features to avoid using mimalloc
You can’t perform that action at this time.
0 commit comments