diff --git a/.github/actions/maven-cache/action.yml b/.github/actions/maven-cache/action.yml index e43b386fdd2..e284453ab90 100644 --- a/.github/actions/maven-cache/action.yml +++ b/.github/actions/maven-cache/action.yml @@ -31,18 +31,22 @@ runs: # Enable cross-os archive use the cache on both Linux and Windows enableCrossOsArchive: true - - shell: powershell - name: Link the cached Maven repository to the OS-dependent location - if: inputs.create-cache-if-it-doesnt-exist == 'false' && runner.os == 'Windows' - # The cache restore in the next step uses the relative path which was valid on Linux and that is part of the archive it downloads. - # You'll see that path when you enable debugging for the GitHub workflow on Windows. - # On Windows, the .m2 folder is in different location, so move all the contents to the right folder here. - # Also, not using the C: drive will speed up the build, see https://github.com/actions/runner-images/issues/8755 - run: | - mkdir -p ..\..\..\.m2 - mkdir -p D:\.m2\repository - cmd /c mklink /d $HOME\.m2\repository D:\.m2\repository - cmd /c "rmdir /s /q $PWD\..\..\..\.m2\repository & mklink /d $PWD\..\..\..\.m2\repository D:\.m2\repository" +# There have been recent changes on the build images about C/D drives, see https://github.com/actions/runner-images/issues/12386 +# As a temporary measure, disabling this optimization +# This should be revisited to speed up the builds in a future issue +# +# - shell: powershell +# name: Link the cached Maven repository to the OS-dependent location +# if: inputs.create-cache-if-it-doesnt-exist == 'false' && runner.os == 'Windows' +# # The cache restore in the next step uses the relative path which was valid on Linux and that is part of the archive it downloads. +# # You'll see that path when you enable debugging for the GitHub workflow on Windows. +# # On Windows, the .m2 folder is in different location, so move all the contents to the right folder here. +# # Also, not using the C: drive will speed up the build, see https://github.com/actions/runner-images/issues/8755 +# run: | +# mkdir -p ..\..\..\.m2 +# mkdir -p D:\.m2\repository +# cmd /c mklink /d $HOME\.m2\repository D:\.m2\repository +# cmd /c "rmdir /s /q $PWD\..\..\..\.m2\repository & mklink /d $PWD\..\..\..\.m2\repository D:\.m2\repository" - id: restore-maven-repository name: Maven cache