-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (45 loc) · 1.3 KB
/
cmake.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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