Skip to content

Commit d168bdf

Browse files
committed
Fixes
1 parent f213d44 commit d168bdf

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,27 @@ jobs:
5757
environments: build
5858
- name: Set version
5959
run: pixi run -e build set-version
60-
- name: Install cargo-auditable (macOS)
61-
if: ${{ contains(matrix.os, 'macos') }}
60+
- name: Install cargo-auditable
61+
shell: bash
6262
run: |
63-
cargo install cargo-auditable@0.7.4 --locked
64-
printf '#!/bin/sh\nexec cargo auditable "$@"\n' > /usr/local/bin/cargo-auditable-wrapper
65-
chmod +x /usr/local/bin/cargo-auditable-wrapper
66-
- name: Install cargo-auditable (Windows)
67-
if: ${{ contains(matrix.os, 'windows') }}
68-
run: |
69-
cargo install cargo-auditable@0.7.4 --locked
70-
Set-Content -Path "C:\Windows\System32\cargo-auditable-wrapper.cmd" -Value "@cargo auditable %*"
63+
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+
else
68+
cargo install cargo-auditable@0.7.4 --locked
69+
echo "CARGO=$(which cargo-auditable)" >> "$GITHUB_ENV"
70+
fi
7171
- name: Build wheel
7272
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
73-
env:
74-
# cargo-auditable is a cargo subcommand wrapper, not a rustc shim.
75-
# Set CARGO to a thin wrapper that prepends "auditable" to every invocation.
76-
CARGO: cargo-auditable-wrapper
7773
with:
7874
command: build
7975
args: --out dist --release -i python3.10
8076
manylinux: auto
8177
sccache: false
8278
before-script-linux: |
8379
cargo install cargo-auditable@0.7.4 --locked
84-
printf '#!/bin/sh\nexec cargo auditable "$@"\n' > /usr/local/bin/cargo-auditable-wrapper
85-
chmod +x /usr/local/bin/cargo-auditable-wrapper
80+
cp ~/.cargo/bin/cargo-auditable /usr/local/bin/cargo-auditable
8681
- name: Check package
8782
run: pixi run -e build check-wheel
8883
- name: Upload package

0 commit comments

Comments
 (0)