From d08d269b0999f07088a688e94e64f5e4ba856add Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 4 Jul 2023 18:48:25 +0800 Subject: [PATCH] Always build PGO using `RUSTFLAGS` (#739) --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b2091640..2e112fbeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -454,9 +454,10 @@ jobs: --release --out pgo-wheel --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }} - -- -Cprofile-generate=${{ github.workspace }}/profdata rust-toolchain: stable docker-options: -e CI + env: + RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata" - name: detect rust host run: echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV" @@ -482,9 +483,10 @@ jobs: --release --out dist --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }} - -- -Cprofile-use=${{ github.workspace }}/merged.profdata rust-toolchain: stable docker-options: -e CI + env: + RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata" - run: ${{ matrix.ls || 'ls -lh' }} dist/