version: 2.1 jobs: build: docker: - image: cimg/base:current resource_class: large working_directory: /home/circleci/fenics steps: - run: name: Install build dependencies command: | sudo apt-get update sudo apt-get -y upgrade sudo apt-get install git-lfs cmake doxygen graphviz sudo apt-get install libboost-chrono-dev libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-math-dev libboost-mpi-dev libboost-program-options-dev libboost-serialization-dev libboost-thread-dev libboost-timer-dev sudo apt-get install gfortran libeigen3-dev libhdf5-mpi-dev libsuitesparse-dev libscotch-dev libxml2-dev mpi-default-dev python3-mpi4py sudo apt-get install petsc-dev slepc-dev python3-petsc4py python3-slepc4py python3-petsc4py-real python3-slepc4py-real - run: name: Clone DOLFIN command: git lfs clone https://bitbucket.org/"${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}".git . - checkout - run: name: Install/update python dependencies command: | sudo apt-get install python3-pip python3-pybind11 python3-flake8 python3-sphinx python3-sphinx-rtd-theme sudo apt-get install python3-pytest python3-pytest-xdist python3-decorator python3-matplotlib python3-scipy - run: name: Install FEniCS dependencies command: | DEP_BRANCH_NAME="master" UFL_DEP_BRANCH_NAME="main" # ufl_legacy is UFL 2022 pip3 install --user git+https://github.com/FEniCS/fiat.git@"${DEP_BRANCH_NAME}" pip3 install --user git+https://github.com/FEniCS/ufl-legacy.git@"${UFL_DEP_BRANCH_NAME}" pip3 install --user git+https://bitbucket.org/fenics-project/dijitso.git@"${DEP_BRANCH_NAME}" pip3 install --user git+https://bitbucket.org/fenics-project/ffc.git@"${DEP_BRANCH_NAME}" - run: name: Flake8 checks on pybind11 Python code command: python3 -m flake8 --append-config=python/setup.cfg python/dolfin - run: name: Build DOLFIN C++ documentation command: cd doc && doxygen - run: name: Configure DOLFIN (C++) command: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOLFIN_ENABLE_TRILINOS=OFF ../ - run: name: Build DOLFIN and install (C++) command: cd build && make -j4 && sudo make -j4 install - run: name: Build and run C++ unit tests (serial) command: cd build && make -j4 unittests && ctest -R unittests - run: name: Build and run C++ regressions tests (serial) command: cd build && make -j4 demos && ctest -j4 -R demo -R serial - run: name: Run C++ regression tests (MPI) command: cd build && make -j4 demos && ctest -R demo -R mpi -E demo_contact-vi-snes_mpi - run: name: Build Python interface command: | cd python pip3 -v install . --user - run: name: Run Python unit tests (serial) command: python3 -m pytest -n 4 python/test/unit/ - run: name: Run Python unit tests (MPI) command: mpirun -n 3 python3 -m pytest python/test/unit/ - run: name: Generate Python demo (regression) programs command: python3 python/demo/generate-demo-files.py - run: name: Run Python regression tests (serial) command: python3 -m pytest -v -n 4 python/demo/test.py - run: name: Run Python regression tests (MPI) command: python3 -m pytest -v python/demo/test.py --mpiexec=mpiexec --num-proc=3 -k "not contact-vi-snes" workflows: version: 2.1 build: jobs: - build