Skip to content

Commit b765656

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

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,22 @@ 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#L51
139+
# https://github.com/scikit-build/scikit-build-core/blob/3943920fa267dc83f9295279bea1c774c0916f13/src/scikit_build_core/program_search.py#L70
140+
for TOOL in ninja-build ninja samu; do
141+
while which ${TOOL}; do
142+
if [ "$RUNNER_OS" == "Windows" ]; then
143+
rm -f "$(which ${TOOL})"
144+
else
145+
sudo rm -f $(which -a ${TOOL})
146+
fi
147+
done
148+
done
135149
136150
- name: Install SDist
137151
run: pip install --no-binary=ninja $(ls sdist/*.tar.gz)[test]

0 commit comments

Comments
 (0)