@@ -60,13 +60,26 @@ jobs:
6060 - name : Install cargo-auditable
6161 shell : bash
6262 run : |
63+ # cargo-auditable must be invoked as "cargo auditable <cmd>" (subcommand form), not as a
64+ # direct CARGO replacement — the latter does not support "cargo rustc --profile".
65+ # A thin wrapper script bridges the gap by forwarding all args through the subcommand.
6366 if [[ "$RUNNER_OS" == "Linux" ]]; then
64- # before-script-linux installs cargo-auditable inside the manylinux container.
65- # Set CARGO on the host here so maturin-action passes it into the container.
66- echo "CARGO=/usr/local/bin/cargo-auditable" >> "$GITHUB_ENV"
67+ # before-script-linux handles installation inside the manylinux container.
68+ # Set CARGO on the host so maturin-action passes it into the container.
69+ echo "CARGO=/usr/local/bin/cargo-auditable-wrapper" >> "$GITHUB_ENV"
70+ elif [[ "$RUNNER_OS" == "Windows" ]]; then
71+ REAL_CARGO="$(cygpath -w "$(which cargo)")"
72+ cargo install cargo-auditable@0.7.4 --locked
73+ WRAPPER="C:/cargo-auditable-wrapper.cmd"
74+ printf '@"%s" auditable %%*\n' "$REAL_CARGO" > "$WRAPPER"
75+ echo "CARGO=$(cygpath -w "$WRAPPER")" >> "$GITHUB_ENV"
6776 else
6877 cargo install cargo-auditable@0.7.4 --locked
69- echo "CARGO=$(which cargo-auditable)" >> "$GITHUB_ENV"
78+ REAL_CARGO="$(which cargo)"
79+ WRAPPER="/usr/local/bin/cargo-auditable-wrapper"
80+ printf '#!/bin/sh\nREAL_CARGO="%s"\nexec "$REAL_CARGO" auditable "$@"\n' "$REAL_CARGO" > "$WRAPPER"
81+ chmod +x "$WRAPPER"
82+ echo "CARGO=$WRAPPER" >> "$GITHUB_ENV"
7083 fi
7184 - name : Build wheel
7285 uses : PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
7790 sccache : false
7891 before-script-linux : |
7992 cargo install cargo-auditable@0.7.4 --locked
80- cp ~/.cargo/bin/cargo-auditable /usr/local/bin/cargo-auditable
93+ REAL_CARGO="$(which cargo)"
94+ printf '#!/bin/sh\nREAL_CARGO="%s"\nexec "$REAL_CARGO" auditable "$@"\n' "$REAL_CARGO" > /usr/local/bin/cargo-auditable-wrapper
95+ chmod +x /usr/local/bin/cargo-auditable-wrapper
8196 - name : Check package
8297 run : pixi run -e build check-wheel
8398 - name : Upload package
0 commit comments