Skip to content

Commit b25f0f4

Browse files
committed
fix: remove Ninja from runners for SDist builds
1 parent ad164af commit b25f0f4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,21 @@ jobs:
130130
name: cibw-sdist
131131
path: sdist
132132

133-
- name: Ensure Ninja not present on the system
134-
run: if which ninja; then false; fi
133+
- name: Remove ninja
134+
shell: bash
135+
run: |
136+
# Remove ninja
137+
set -euxo pipefail
138+
# https://github.com/scikit-build/scikit-build-core/blob/3943920fa267dc83f9295279bea1c774c0916f13/src/scikit_build_core/program_search.py#L70
139+
for TOOL in ninja-build ninja samu; do
140+
while which ${TOOL}; do
141+
if [ "$RUNNER_OS" == "Windows" ]; then
142+
rm -f "$(which ${TOOL})"
143+
else
144+
sudo rm -f $(which -a ${TOOL})
145+
fi
146+
done
147+
done
135148
136149
- name: Install SDist
137150
run: pip install --no-binary=ninja $(ls sdist/*.tar.gz)[test]

0 commit comments

Comments
 (0)