diff --git a/.azure/ci-macos-job.yml b/.azure/ci-macos-job.yml index 733fd342..9ae45c73 100644 --- a/.azure/ci-macos-job.yml +++ b/.azure/ci-macos-job.yml @@ -15,8 +15,9 @@ jobs: Py310: python.version: '3.10' - - variables: {'PYTHONUNBUFFERED': '1'} + variables: + PYTHONUNBUFFERED: '1' + CCACHE_DIR: $(Pipeline.Workspace)/ccache steps: - checkout: self @@ -26,6 +27,19 @@ jobs: inputs: versionSpec: '$(python.version)' + - script: | + brew install ccache + echo "##vso[task.prependpath]/usr/local/opt/ccache/libexec" + displayName: 'Install brew package requirements & setup ccache' + + - task: Cache@2 + inputs: + key: 'ccache | "$(Agent.OS)" | "$(python.version)" | "$(Build.BuildNumber)"' + path: $(CCACHE_DIR) + restoreKeys: | + ccache | "$(Agent.OS)" | "$(python.version)" + displayName: ccache + - script: | python -m pip install -U setuptools wheel python -m pip install -r requirements.txt