Skip to content

Add packaging of MeshPy to testing #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/build_wheel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build_wheel
description: Build the MeshPy wheel
inputs:
source-command:
description: Command to source the virtual environment
required: false
default: ""
runs:
using: composite
steps:
- name: Build MeshPy wheel
shell: bash
run: |
cd ${GITHUB_WORKSPACE}
${{ inputs.source-command }}
pip install build
python -m build
# Check if we got exactly one wheel file
shopt -s nullglob
files=(dist/*.whl)
if [ ${#files[@]} -ne 1 ]; then
echo "Expected exactly one .whl file in dist/, found ${#files[@]}"
exit 1
fi
5 changes: 4 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel
uses: ./.github/actions/build_wheel
if: matrix.python-version == '3.12'
- name: Run the test suite
uses: ./.github/actions/run_tests
with:
# Test coverage and editable install with Python 3.10, otherwise we use a
# non-editable installation and turn of coverage, because the coverage
# only works in editable mode.
install-command: >-
${{ matrix.python-version == '3.10' && '-e .[dev]' || '.[dev]'}}
${{ matrix.python-version == '3.10' && '-e .[dev]' || '"$(ls dist/*.whl | head -n 1)[dev]"'}}
# The single space in the empty string is required, otherwise GitHub
# evaluates the if clause wrong.
additional-pytest-flags: >-
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include src/meshpy/geometric_search/cython_lib.pyx