Skip to content

Commit bd749c0

Browse files
committed
test: add test for cmake build
1 parent 94b5f0b commit bd749c0

3 files changed

Lines changed: 31 additions & 7 deletions

File tree

.github/workflows/tests-with-pydebug.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
PYTHON: "python" # to be updated
3535
PYTHON_TAG: "py3" # to be updated
3636
PYTHON_VERSION: "3" # to be updated
37+
pybind11_VERSION: "stable" # to be updated
3738
PYENV_ROOT: "~/.pyenv" # to be updated
3839
COLUMNS: "128"
3940

@@ -290,10 +291,16 @@ jobs:
290291
github.event_name == 'pull_request' &&
291292
contains(github.event.pull_request.labels.*.name, 'test-with-nightly-pybind11')
292293
run: |
293-
python .github/workflows/set_setup_requires.py
294+
${{ env.PYTHON }} .github/workflows/set_setup_requires.py
294295
echo "::group::pyproject.toml"
295296
cat pyproject.toml
296297
echo "::endgroup::"
298+
echo "pybind11_VERSION=HEAD" | tee -a "${GITHUB_ENV}"
299+
300+
- name: Test buildable without Python frontend
301+
shell: bash
302+
run: |
303+
make cmake-build PYTHON="${{ env.PYTHON }}" && make clean
297304
298305
- name: Install OpTree
299306
run: |

.github/workflows/tests.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
PYTHONUNBUFFERED: "1"
3535
PYTHON: "python" # to be updated
3636
PYTHON_TAG: "py3" # to be updated
37+
pybind11_VERSION: "stable" # to be updated
3738
COLUMNS: "128"
3839

3940
jobs:
@@ -148,10 +149,11 @@ jobs:
148149
github.event_name == 'pull_request' &&
149150
contains(github.event.pull_request.labels.*.name, 'test-with-nightly-pybind11')
150151
run: |
151-
python .github/workflows/set_setup_requires.py
152+
${{ env.PYTHON }} .github/workflows/set_setup_requires.py
152153
echo "::group::pyproject.toml"
153154
cat pyproject.toml
154155
echo "::endgroup::"
156+
echo "pybind11_VERSION=HEAD" | tee -a "${GITHUB_ENV}"
155157
156158
- name: Test installable with C++17
157159
shell: bash
@@ -169,6 +171,21 @@ jobs:
169171
rm -rf venv
170172
)
171173
174+
- name: Test buildable without Python frontend
175+
shell: bash
176+
run: |
177+
ACTIVATION_SCRIPT="venv/bin/activate"
178+
if [[ "${{ runner.os }}" == 'Windows' ]]; then
179+
ACTIVATION_SCRIPT="venv/Scripts/activate"
180+
fi
181+
(
182+
set -x
183+
${{ env.PYTHON }} -m venv venv &&
184+
source "${ACTIVATION_SCRIPT}" &&
185+
make cmake-build && make clean &&
186+
rm -rf venv
187+
)
188+
172189
- name: Install test dependencies
173190
shell: bash
174191
run: |

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,21 @@ addlicense: addlicense-install
233233

234234
.PHONY: docstyle
235235
docstyle: docs-install
236-
make -C docs clean || true
237-
$(PYTHON) -m doc8 docs && make -C docs html SPHINXOPTS="-W"
236+
$(MAKE) -C docs clean || true
237+
$(PYTHON) -m doc8 docs && $(MAKE) -C docs html SPHINXOPTS="-W"
238238

239239
.PHONY: docs
240240
docs: docs-install
241241
$(PYTHON) -m sphinx_autobuild --watch $(PROJECT_PATH) --open-browser docs/source docs/build
242242

243243
.PHONY: spelling
244244
spelling: docs-install
245-
make -C docs clean || true
246-
make -C docs spelling SPHINXOPTS="-W"
245+
$(MAKE) -C docs clean || true
246+
$(MAKE) -C docs spelling SPHINXOPTS="-W"
247247

248248
.PHONY: clean-docs
249249
clean-docs:
250-
make -C docs clean || true
250+
$(MAKE) -C docs clean || true
251251

252252
# Utility Functions
253253

0 commit comments

Comments
 (0)