1717 BLASPP_HOME : ' /usr/local/'
1818 LAPACKPP_HOME : ' /usr/local/'
1919 OMP_NUM_THREADS : 1
20+ CCACHE_DIR : $(Pipeline.Workspace)/ccache
2021
2122 strategy :
2223 matrix :
@@ -42,12 +43,44 @@ jobs:
4243 timeoutInMinutes : 90
4344
4445 steps :
46+ - bash : |
47+ sudo apt update
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 and update PATH to use linked versions of gcc, cc, etc
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 : $(CCACHE_DIR)
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+
4579 - script : |
4680 cat /proc/cpuinfo | grep "model name" | sort -u
47- sudo apt update
48- sudo apt install -y ccache gcc gfortran g++ openmpi-bin libopenmpi-dev \
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
@@ -62,16 +95,20 @@ jobs:
6295 sudo chmod a+x /usr/local/bin/cmake-easyinstall
6396 if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then
6497 cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/[email protected] \ 98+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
6599 -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF
66100 python -m pip install --upgrade openpmd-api
67101 fi
68102 if [[ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" || "${WARPX_CI_PYTHON_MAIN:-FALSE}" == "TRUE" ]]; then
69103 cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/blaspp.git \
104+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
70105 -Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
71106 cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/lapackpp.git \
107+ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
72108 -Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
73109 fi
74110 displayName: 'Install dependencies'
111+ # condition: eq(variables.CCACHE_CACHE_RESTORED, 'false') and ...
75112
76113 - script : |
77114 ./run_test.sh
0 commit comments