Skip to content

Commit 36b4569

Browse files
authored
Apply suggestions from code review
Co-authored-by: Daniel Elsner <dvelsner@gmail.com>
1 parent a7f208a commit 36b4569

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
run: pixi run -e build set-version
6060
- name: Install cargo-auditable
6161
shell: bash
62+
if: github.event_name == 'release'
6263
run: |
6364
# cargo-auditable must be invoked as "cargo auditable <cmd>", not as a direct CARGO
6465
# replacement — the latter does not support "cargo rustc --profile". A wrapper delegates
@@ -80,12 +81,12 @@ jobs:
8081
command: build
8182
args: --out dist --release -i python3.10
8283
manylinux: auto
83-
sccache: false
84-
docker-options: "-e CARGO=${{ env.CARGO }}"
84+
sccache: github.event_name != 'release'
85+
# NOTE: We also need to set up cargo-auditable inside the docker container
86+
# where the linux build is performed.
87+
docker-options: case(github.event_name == 'release', "-e CARGO=${{ env.CARGO }}", '')
8588
before-script-linux: |
86-
cargo install cargo-auditable@0.7.4 --locked
87-
printf '#!/bin/sh\nexec cargo auditable "$@"\n' > /usr/local/bin/cargo-auditable-wrapper
88-
chmod +x /usr/local/bin/cargo-auditable-wrapper
89+
${{ case(github.event_name == 'release', 'cargo install cargo-auditable@0.7.4 --locked && printf '#!/bin/sh\nexec cargo auditable "$@"\n' > /usr/local/bin/cargo-auditable-wrapper && chmod +x /usr/local/bin/cargo-auditable-wrapper', '') }}
8990
- name: Check package
9091
run: pixi run -e build check-wheel
9192
- name: Upload package

0 commit comments

Comments
 (0)