Skip to content

Commit

Permalink
Add python tests to cmake GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzm committed Nov 2, 2021
1 parent 56a04ee commit 29bd2f3
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,32 @@ jobs:
python-version: 3.8

- name: Install Python prereqs
run: pip install pybind11[global]
run: |
pip install \
numpy \
pybind11[global] \
pytest \
pytest-flake8 \
pyyaml
- name: CMake configure
run: cmake -B ${{github.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install \
-B ${{github.workspace}}/build
- name: CMake build
run: cmake --build ${{github.workspace}}/build --parallel `nproc`

- name: CMake test
working-directory: ${{github.workspace}}/build
run: ctest --parallel `nproc`
run: ctest

- name: CMake install
run: cmake --build ${{github.workspace}}/build --target install

- name: Python tests
env:
PYTHONPATH: ${{github.workspace}}/build/install/python
LD_LIBRARY_PATH: ${{github.workspace}}/build/install/lib
run: pytest -r a -v

0 comments on commit 29bd2f3

Please sign in to comment.