Debian Codegraph @

.circleci/config.yml

raw
1 version: 2.1
2 jobs:
3 build:
4 docker:
5 - image: cimg/base:current
6 resource_class: large
7 working_directory: /home/circleci/fenics
8 steps:
9 - run:
10 name: Install build dependencies
11 command: |
12 sudo apt-get update
13 sudo apt-get -y upgrade
14 sudo apt-get install git-lfs cmake doxygen graphviz
15 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
16 sudo apt-get install gfortran libeigen3-dev libhdf5-mpi-dev libsuitesparse-dev libscotch-dev libxml2-dev mpi-default-dev python3-mpi4py
17 sudo apt-get install petsc-dev slepc-dev python3-petsc4py python3-slepc4py python3-petsc4py-real python3-slepc4py-real
18 - run:
19 name: Clone DOLFIN
20 command: git lfs clone https://bitbucket.org/"${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}".git .
21 - checkout
22 - run:
23 name: Install/update python dependencies
24 command: |
25 sudo apt-get install python3-pip python3-pybind11 python3-flake8 python3-sphinx python3-sphinx-rtd-theme
26 sudo apt-get install python3-pytest python3-pytest-xdist python3-decorator python3-matplotlib python3-scipy
27 - run:
28 name: Install FEniCS dependencies
29 command: |
30 DEP_BRANCH_NAME="master"
31 UFL_DEP_BRANCH_NAME="main" # ufl_legacy is UFL 2022
32 pip3 install --user git+https://github.com/FEniCS/fiat.git@"${DEP_BRANCH_NAME}"
33 pip3 install --user git+https://github.com/FEniCS/ufl-legacy.git@"${UFL_DEP_BRANCH_NAME}"
34 pip3 install --user git+https://bitbucket.org/fenics-project/dijitso.git@"${DEP_BRANCH_NAME}"
35 pip3 install --user git+https://bitbucket.org/fenics-project/ffc.git@"${DEP_BRANCH_NAME}"
36 - run:
37 name: Flake8 checks on pybind11 Python code
38 command: python3 -m flake8 --append-config=python/setup.cfg python/dolfin
39 - run:
40 name: Build DOLFIN C++ documentation
41 command: cd doc && doxygen
42 - run:
43 name: Configure DOLFIN (C++)
44 command: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOLFIN_ENABLE_TRILINOS=OFF ../
45 - run:
46 name: Build DOLFIN and install (C++)
47 command: cd build && make -j4 && sudo make -j4 install
48 - run:
49 name: Build and run C++ unit tests (serial)
50 command: cd build && make -j4 unittests && ctest -R unittests
51 - run:
52 name: Build and run C++ regressions tests (serial)
53 command: cd build && make -j4 demos && ctest -j4 -R demo -R serial
54 - run:
55 name: Run C++ regression tests (MPI)
56 command: cd build && make -j4 demos && ctest -R demo -R mpi -E demo_contact-vi-snes_mpi
57 - run:
58 name: Build Python interface
59 command: |
60 cd python
61 pip3 -v install . --user
62 - run:
63 name: Run Python unit tests (serial)
64 command: python3 -m pytest -n 4 python/test/unit/
65 - run:
66 name: Run Python unit tests (MPI)
67 command: mpirun -n 3 python3 -m pytest python/test/unit/
68 - run:
69 name: Generate Python demo (regression) programs
70 command: python3 python/demo/generate-demo-files.py
71 - run:
72 name: Run Python regression tests (serial)
73 command: python3 -m pytest -v -n 4 python/demo/test.py
74 - run:
75 name: Run Python regression tests (MPI)
76 command: python3 -m pytest -v python/demo/test.py --mpiexec=mpiexec --num-proc=3 -k "not contact-vi-snes"
77 workflows:
78 version: 2.1
79 build:
80 jobs:
81 - build