2222 run : mkdir -p ${{ github.workspace }}/profdata
2323
2424 - name : build initial wheel (instrumented)
25- uses : PyO3/maturin-action@v1
25+ uses : PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
2626 with :
2727 manylinux : auto
2828 args : >
@@ -35,26 +35,25 @@ runs:
3535 env :
3636 RUSTFLAGS : ' -Cprofile-generate=${{ github.workspace }}/profdata'
3737
38- - name : detect rust host
39- run : echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
40- shell : bash
41-
4238 - name : generate pgo data
4339 run : |
40+ export RUST_HOST=$(rustc --print host-tuple)
4441 pip install typing_extensions
4542 pip install pydantic-monty --no-index --no-deps --find-links pgo-wheel --force-reinstall
4643 python exercise.py
47- rustup run ${{ inputs.rust-toolchain } } bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/$RUST_HOST/bin/llvm-profdata >> "$GITHUB_ENV"'
44+ rustup run ${INPUTS_RUST_TOOLCHAIN } bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/$RUST_HOST/bin/llvm-profdata >> "$GITHUB_ENV"'
4845 shell : bash
4946 working-directory : crates/monty-python
47+ env :
48+ INPUTS_RUST_TOOLCHAIN : ${{ inputs.rust-toolchain }}
5049
5150 - name : merge pgo data
5251 # PowerShell handles paths on Windows better, and works well enough on Unix
53- run : ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
52+ run : ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata # zizmor: ignore[template-injection]
5453 shell : pwsh
5554
5655 - name : build pgo-optimized wheel
57- uses : PyO3/maturin-action@v1
56+ uses : PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
5857 with :
5958 manylinux : auto
6059 args : >
0 commit comments