1313 WARPX_CI_NUM_MAKE_JOBS : 2
1414 WARPX_CI_CCACHE : ' TRUE'
1515 WARPX_CI_OPENPMD : ' TRUE'
16+ WARPX_CI_TMP : ' /tmp/ci/'
1617 FFTW_HOME : ' /usr/'
1718 BLASPP_HOME : ' /usr/local/'
1819 LAPACKPP_HOME : ' /usr/local/'
@@ -42,12 +43,44 @@ jobs:
4243 timeoutInMinutes : 90
4344
4445 steps :
45- - script : |
46- cat /proc/cpuinfo | grep "model name" | sort -u
46+ - bash : |
4747 sudo apt update
48- sudo apt install -y ccache gcc gfortran g++ openmpi-bin libopenmpi-dev \
48+ sudo apt-get install -y ccache python3 python3-pip
49+ echo "##vso[task.prependpath]/usr/lib/ccache"
50+ ccache --set-config=max_size=10.0G
51+ displayName: Install Pip & Ccache
52+
53+ # set up caches:
54+ # - once stored under a key, they become immutable (even if cache content changes)
55+ # - for a refresh the key has to change, e.g., hash of a tracked file in the key
56+ - task : Cache@2
57+ inputs :
58+ key : ' Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake | run_test.sh'
59+ restoreKeys : |
60+ Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake | run_test.sh
61+ Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake
62+ Ccache | "$(System.JobName)"
63+ Ccache
64+ path : /home/vsts/.ccache
65+ cacheHitVar : CCACHE_CACHE_RESTORED
66+ displayName : Cache Ccache Objects
67+
68+ - task : Cache@2
69+ inputs :
70+ key : ' Python3 | "$(System.JobName)" | run_test.sh'
71+ restoreKeys : |
72+ Python3 | "$(System.JobName)" | run_test.sh
73+ Python3 | "$(System.JobName)"
74+ Python3
75+ path : /home/vsts/.local/lib/python3.8
76+ cacheHitVar : PYTHON38_CACHE_RESTORED
77+ displayName : Cache Python Libraries
78+
79+ - bash : |
80+ cat /proc/cpuinfo | grep "model name" | sort -u
81+ sudo apt install -y gcc gfortran g++ openmpi-bin libopenmpi-dev \
4982 libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \
50- python3 python3-pip python3 -venv python3-setuptools libblas-dev liblapack-dev
83+ python3-venv python3-setuptools libblas-dev liblapack-dev
5184 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
5285 sudo update-alternatives --set python /usr/bin/python3
5386 python -m pip install --upgrade pip
@@ -58,21 +91,26 @@ jobs:
5891 export PATH="$HOME/.local/bin:$PATH"
5992 python -m pip install --upgrade matplotlib mpi4py numpy scipy yt
6093 export CEI_SUDO="sudo"
94+ export CEI_TMP="/tmp/cei/"
6195 sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
6296 sudo chmod a+x /usr/local/bin/cmake-easyinstall
6397 if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then
6498 cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/[email protected] \ 99+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
65100 -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF
66101 python -m pip install --upgrade openpmd-api
67102 fi
68103 if [[ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" || "${WARPX_CI_PYTHON_MAIN:-FALSE}" == "TRUE" ]]; then
69104 cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/blaspp.git \
105+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
70106 -Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
71107 cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/lapackpp.git \
108+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
72109 -Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
73110 fi
74111 displayName: 'Install dependencies'
112+ # condition: eq(variables.CCACHE_CACHE_RESTORED, 'false') and ...
75113
76- - script : |
114+ - bash : |
77115 ./run_test.sh
78116 displayName: 'Build & test'
0 commit comments