setup-ocaml icon indicating copy to clipboard operation
setup-ocaml copied to clipboard

Builds fail on windows when using Dune cache

Open jchavarri opened this issue 2 years ago • 1 comments

Lately, windows builds have started to fail, e.g. https://github.com/ml-in-barcelona/jsoo-react/runs/5558049842

The error happens in the Use OCaml 4.xx step, and it looks as follows:

Retrieve the dune cache
  Received 0 of 439039425 (0.0%), 0.0 MBs/sec
  Received 12582912 of 439039425 (2.9%), 3.1 MBs/sec
  Received 176160768 of 439039425 (40.1%), 34.0 MBs/sec
  Received 352321536 of 439039425 (80.2%), 56.6 MBs/sec
  Received 439039425 of 439039425 (100.0%), 51.1 MBs/sec
  Cache Size: ~419 MB (439039425 B)
  C:\Windows\System32\tar.exe -z -xf D:/a/_temp/b550f38d-15e1-477d-bd4b-2d4fbfb25707/cache.tgz -P -C D:/a/jsoo-react/jsoo-react
  C:/Users/runneradmin/Local Settings/Cache/dune/: Can't create '\\\\?\\C:\\Users\\runneradmin\\Local Settings\\Cache\\dune'
  C:/Users/runneradmin/Local Settings/Cache/dune/db/: Can't create '\\\\?\\C:\\Users\\runneradmin\\Local Settings\\Cache\\dune\\db'
....
tar.exe: Error exit delayed from previous errors.
##[error]Tar failed with error: The process 'C:\Windows\System32\tar.exe' failed with exit code 1
Post job cleanup.
...

Once dune-cache: ${{ matrix.os != 'windows-latest' }} they start passing again.

It is strange because Windows build have been working for months already, fwiw the first failures started happening around ~20 days ago. In some ci reports I can see this warning:

windows-latest workflows now use windows-2022. For more details, see https://github.com/actions/virtual-environments/issues/4856

Could this be related to the Win 2022 change mentioned in that issue?

jchavarri avatar Mar 15 '22 17:03 jchavarri

Related issue: https://github.com/actions/toolkit/issues/506

smorimoto avatar Mar 24 '22 04:03 smorimoto

This may have been fixed now by some upstream fixes.

smorimoto avatar Jun 27 '23 10:06 smorimoto