11name : Install and test libsupermesh
22
33on :
4- # Push to master or PR
54 push :
65 branches :
76 - master
87 pull_request :
98
109jobs :
1110 build :
12- name : " Build libsupermesh with Ubuntu spatialindex"
13- # The type of runner that the job will run on
11+ name : Build libsupermesh with Ubuntu spatialindex
1412 runs-on : [self-hosted, Linux]
15- # The docker container to use.
1613 container :
1714 image : firedrakeproject/firedrake-env:latest
18-
1915 steps :
2016 - uses : actions/checkout@v4
2117
2218 - uses : mpi4py/setup-mpi@v1
2319 with :
2420 mpi : openmpi
2521
26- - name : Install spatialindex
27- shell : bash
22+ - name : Install build dependencies
2823 run : |
2924 sudo apt-get -y update
30- sudo apt-get -y install libspatialindex-dev
25+ sudo apt-get -y install build-essential cmake libspatialindex-dev
3126
32- - name : CMake
27+ - name : Install libsupermesh
3328 run : |
3429 cd build
3530 cmake .. \
@@ -40,90 +35,77 @@ jobs:
4035 -DCMAKE_C_COMPILER=mpicc \
4136 -DCMAKE_CXX_COMPILER=mpicxx \
4237 -DCMAKE_Fortran_COMPILER=mpif90
43-
44- - name : Build
45- run : |
46- cd build
4738 make
4839
49- - name : Test
50- run : |
51- cd build
52- make test
40+ - name : Run tests
41+ run : make -C build test
5342
5443 build_rtree :
55- name : " Build libsupermesh with Rtree spatialindex"
56- # The type of runner that the job will run on
57- runs-on : self-hosted
58- # The docker container to use.
44+ name : Build libsupermesh with Rtree spatialindex
45+ runs-on : [self-hosted, Linux]
5946 container :
6047 image : firedrakeproject/firedrake-env:latest
6148
6249 steps :
63- - uses : actions/checkout@v4
50+ - name : Install build dependencies
51+ run : |
52+ sudo apt-get -y update
53+ sudo apt-get -y install build-essential cmake libopenmpi-dev
6454
6555 - uses : actions/setup-python@v4
6656 with :
6757 python-version : ' 3.11'
6858
59+ - uses : actions/checkout@v4
60+
61+ - name : Create virtual environment
62+ run : python3 -m venv venv-libsupermesh
63+
6964 - name : Install Rtree
70- shell : bash
7165 run : |
72- cd ..
73- python -m venv test
74- source test/bin/activate
75- pip install "rtree>=1.2"
66+ . venv-libsupermesh/bin/activate
67+ pip install 'rtree>=1.2'
7668
77- - name : CMake
78- shell : bash
69+ - name : Install libsupermesh
7970 run : |
80- source ../test/bin/activate
81- cd build
71+ . venv-libsupermesh/bin/activate
8272 unset pythonLocation
8373 unset Python_ROOT_DIR
8474 unset Python2_ROOT_DIR
8575 unset Python3_ROOT_DIR
76+ cd build
8677 cmake .. \
8778 -DBUILD_SHARED_LIBS=ON \
88- -DMPI_C_COMPILER=$MPICH_DIR/mpicc \
89- -DMPI_CXX_COMPILER=$MPICH_DIR/mpicxx \
90- -DMPI_Fortran_COMPILER=$MPICH_DIR/mpif90 \
91- -DCMAKE_C_COMPILER=$MPICH_DIR/mpicc \
92- -DCMAKE_CXX_COMPILER=$MPICH_DIR/mpicxx \
93- -DCMAKE_Fortran_COMPILER=$MPICH_DIR/mpif90 \
94- -DMPIEXEC_EXECUTABLE=$MPICH_DIR/mpiexec
95-
96- - name : Build
97- run : |
98- cd build
79+ -DMPI_C_COMPILER=/usr/bin/mpicc \
80+ -DMPI_CXX_COMPILER=/usr/bin/mpicxx \
81+ -DMPI_Fortran_COMPILER=/usr/bin/mpif90 \
82+ -DCMAKE_C_COMPILER=/usr/bin/mpicc \
83+ -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \
84+ -DCMAKE_Fortran_COMPILER=/usr/bin/mpif90 \
85+ -DMPIEXEC_EXECUTABLE=/usr/bin/mpiexec
9986 make
10087
101- - name : Test
102- run : |
103- cd build
104- make test
88+ - name : Run tests
89+ run : make -C build test
10590
10691 # NOTE: The pip-installed version of libsupermesh does not include any tests, so only check
10792 # that it builds.
10893 build_pip :
109- name : " Build libsupermesh with pip"
110- # The type of runner that the job will run on
111- runs-on : self-hosted
112- # The docker container to use.
94+ name : Build libsupermesh with pip
95+ runs-on : [self-hosted, Linux]
11396 container :
11497 image : firedrakeproject/firedrake-env:latest
115-
11698 steps :
99+ - name : Install build dependencies
100+ run : |
101+ sudo apt-get -y update
102+ sudo apt-get -y install build-essential cmake libopenmpi-dev
103+
117104 - uses : actions/checkout@v4
118105
119106 - uses : actions/setup-python@v4
120107 with :
121108 python-version : ' 3.11'
122109
123110 - name : Install libsupermesh
124- shell : bash
125- run : |
126- python -m venv ../test_env
127- source ../test_env/bin/activate
128- export MPI_HOME=$MPICH_DIR
129- pip install .
111+ run : python3 -m pip install --break-system-packages .
0 commit comments