Merge pull request #70 from lsst/tickets/DM-45939 #169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cmake | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Need to clone everything to determine version from git. | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Update Python packages | |
run: pip install --upgrade setuptools | |
- name: Install Python prereqs | |
run: | | |
pip install \ | |
numpy \ | |
pybind11[global] \ | |
pytest \ | |
pyyaml \ | |
hpgeom | |
- name: CMake configure | |
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 | |
- 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 |