Skip to content

Commit 793aa18

Browse files
committed
fix: bootstrap build on Unix
1 parent 8009f0b commit 793aa18

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,48 @@ jobs:
219219
- name: Test installed SDist
220220
run: .venv/bin/pytest ./tests
221221

222+
bootstrap_build:
223+
name: Bootstrap build
224+
needs: [lint]
225+
runs-on: ubuntu-latest
226+
steps:
227+
- uses: actions/checkout@v4
228+
- uses: actions/setup-python@v5
229+
id: python
230+
with:
231+
python-version: "3.x"
232+
233+
- name: Remove cmake and ninja
234+
run: |
235+
for TOOL in cmake ninja; do
236+
while which -s ${TOOL}; do
237+
sudo rm -f $(which -a ${TOOL})
238+
done
239+
done
240+
241+
- name: Build SDist
242+
run: pipx run --python '${{ steps.python.outputs.python-path }}' build --sdist
243+
244+
- name: Install dependencies
245+
run: |
246+
sudo apt-get update
247+
sudo apt-get install -y --no-install-recommends libssl-dev
248+
249+
- name: Install SDist
250+
env:
251+
CMAKE_ARGS: "-DBUILD_CMAKE_FROM_SOURCE:BOOL=OFF"
252+
run: |
253+
python -m pip install --no-binary='cmake,ninja' dist/*.tar.gz
254+
rm -rf dist
255+
256+
- name: Test installed SDist
257+
run: |
258+
python -m pip install pytest pytest-cov
259+
pytest ./tests
260+
222261
check_dist:
223262
name: Check dist
224-
needs: [build_wheels, build_manylinux2010_wheels, build_sdist, test_sdist]
263+
needs: [build_wheels, build_manylinux2010_wheels, build_sdist, test_sdist, bootstrap_build]
225264
runs-on: ubuntu-latest
226265
steps:
227266
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)