# -*- mode: yaml -*- pool: vmImage: 'ubuntu-20.04' pr: autoCancel: true drafts: false jobs: - job: variables: BLASPP_HOME: '/usr/local' CEI_SUDO: 'sudo' CEI_TMP: '/tmp/cei' CMAKE_GENERATOR: 'Ninja' FFTW_HOME: '/usr' LAPACKPP_HOME: '/usr/local' OMP_NUM_THREADS: 1 WARPX_CI_CCACHE: 'TRUE' WARPX_CI_NUM_MAKE_JOBS: 2 WARPX_CI_OPENPMD: 'TRUE' WARPX_CI_TMP: '/tmp/ci' strategy: matrix: cartesian1d: WARPX_CI_REGULAR_CARTESIAN_1D: 'TRUE' WARPX_CI_PSATD: 'FALSE' cartesian2d: WARPX_CI_REGULAR_CARTESIAN_2D: 'TRUE' cartesian3d: WARPX_CI_REGULAR_CARTESIAN_3D: 'TRUE' single_precision: WARPX_CI_SINGLE_PRECISION: 'TRUE' rz_or_nompi: WARPX_CI_RZ_OR_NOMPI: 'TRUE' qed: WARPX_CI_QED: 'TRUE' embedded_boundary: WARPX_CI_EB: 'TRUE' # default: 60; maximum: 360 timeoutInMinutes: 180 steps: # set up caches: # - once stored under a key, they become immutable (even if cache content changes) # - for a refresh the key has to change, e.g., hash of a tracked file in the key - task: Cache@2 continueOnError: true inputs: key: 'Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake | run_test.sh' restoreKeys: | Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake | run_test.sh Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake Ccache | "$(System.JobName)" | .azure-pipelines.yml path: /home/vsts/.ccache cacheHitVar: CCACHE_CACHE_RESTORED displayName: Cache Ccache Objects - task: Cache@2 continueOnError: true inputs: key: 'Python3 | "$(System.JobName)" | .azure-pipelines.yml | run_test.sh' restoreKeys: | Python3 | "$(System.JobName)" | .azure-pipelines.yml | run_test.sh Python3 | "$(System.JobName)" | .azure-pipelines.yml path: /home/vsts/.local/lib/python3.8 cacheHitVar: PYTHON38_CACHE_RESTORED displayName: Cache Python Libraries - bash: | set -eu -o pipefail cat /proc/cpuinfo | grep "model name" | sort -u df -h echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries sudo apt update sudo apt install -y ccache curl gcc gfortran git g++ ninja-build \ openmpi-bin libopenmpi-dev \ libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \ python3 python3-pandas python3-pip python3-venv python3-setuptools libblas-dev liblapack-dev ccache --set-config=max_size=10.0G python3 -m pip install --upgrade pip python3 -m pip install --upgrade setuptools python3 -m pip install --upgrade wheel python3 -m pip install --upgrade virtualenv python3 -m pip install --upgrade pipx python3 -m pipx install cmake python3 -m pipx ensurepath export PATH="$HOME/.local/bin:$PATH" sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall sudo chmod a+x /usr/local/bin/cmake-easyinstall if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then cmake-easyinstall --prefix=/usr/local \ git+https://github.com/openPMD/openPMD-api.git@0.14.3 \ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF python3 -m pip install --upgrade openpmd-api fi if [[ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" ]]; then cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/blaspp.git \ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ -DCMAKE_CXX_STANDARD=17 \ -Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/lapackpp.git \ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ -DCMAKE_CXX_STANDARD=17 \ -Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON fi rm -rf ${CEI_TMP} df -h displayName: 'Install dependencies' - bash: | set -eu -o pipefail df -h ./run_test.sh rm -rf ${WARPX_CI_TMP} df -h displayName: 'Build & test'