Skip to content

DM-42695: Only upload weekly tag to PyPi when code changed #174

DM-42695: Only upload weekly tag to PyPi when code changed

DM-42695: Only upload weekly tag to PyPi when code changed #174

Workflow file for this run

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