JDBetteridge/pip install #66
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: Install and test libsupermesh | |
on: | |
# Push to master or PR | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
name: "Build libsupermesh with Ubuntu spatialindex" | |
# The type of runner that the job will run on | |
runs-on: [self-hosted, Linux] | |
# The docker container to use. | |
container: | |
image: firedrakeproject/firedrake-env:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: openmpi | |
- name: Install spatialindex | |
shell: bash | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libspatialindex-dev | |
- name: CMake | |
run: | | |
cd build | |
cmake .. \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DMPI_C_COMPILER=mpicc \ | |
-DMPI_CXX_COMPILER=mpicxx \ | |
-DMPI_Fortran_COMPILER=mpif90 \ | |
-DCMAKE_C_COMPILER=mpicc \ | |
-DCMAKE_CXX_COMPILER=mpicxx \ | |
-DCMAKE_Fortran_COMPILER=mpif90 | |
- name: Build | |
run: | | |
cd build | |
make | |
- name: Test | |
run: | | |
cd build | |
make test | |
build_rtree: | |
name: "Build libsupermesh with Rtree spatialindex" | |
# The type of runner that the job will run on | |
runs-on: self-hosted | |
# The docker container to use. | |
container: | |
image: firedrakeproject/firedrake-env:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Rtree | |
shell: bash | |
run: | | |
cd .. | |
python -m venv test | |
source test/bin/activate | |
pip install "rtree>=1.2" | |
- name: CMake | |
shell: bash | |
run: | | |
source ../test/bin/activate | |
cd build | |
unset pythonLocation | |
unset Python_ROOT_DIR | |
unset Python2_ROOT_DIR | |
unset Python3_ROOT_DIR | |
cmake .. \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DMPI_C_COMPILER=$MPICH_DIR/mpicc \ | |
-DMPI_CXX_COMPILER=$MPICH_DIR/mpicxx \ | |
-DMPI_Fortran_COMPILER=$MPICH_DIR/mpif90 \ | |
-DCMAKE_C_COMPILER=$MPICH_DIR/mpicc \ | |
-DCMAKE_CXX_COMPILER=$MPICH_DIR/mpicxx \ | |
-DCMAKE_Fortran_COMPILER=$MPICH_DIR/mpif90 \ | |
-DMPIEXEC_EXECUTABLE=$MPICH_DIR/mpiexec | |
- name: Build | |
run: | | |
cd build | |
make | |
- name: Test | |
run: | | |
cd build | |
make test | |
# NOTE: The pip-installed version of libsupermesh does not include any tests, so only check | |
# that it builds. | |
build_pip: | |
name: "Build libsupermesh with pip" | |
# The type of runner that the job will run on | |
runs-on: self-hosted | |
# The docker container to use. | |
container: | |
image: firedrakeproject/firedrake-env:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install libsupermesh | |
shell: bash | |
env: | |
MPI_HOME: $MPICH_DIR | |
run: | | |
python -m venv ../test_env | |
source ../test_env/bin/activate | |
pip install . |