test changing the windows temp dir
Adds test for #205
Should fail on windows on master
@cderv would you be able to help get this reproducing the issue.
Also see question here https://github.com/julia-actions/setup-julia/pull/206#issuecomment-1892878567
yes, I'll try to diagnose further the issue of why /usr/bin/tar is used in my workflow. Maybe it is not the temp dir at all.
I'll look at #206 also.
So I spent my morning trying to understand deeper what was happening, and it was in fact an unexpected configuration and conflict between two actions:
- https://github.com/r-lib/actions/tree/v2/setup-r will modified the PATH by default to add some tools and it includes a
tar - https://github.com/julia-actions/setup-julia will use any
tarfound on PATH for untar fromD:(RUNNER_TEMP) toC:\hostedtoolcache\windows
So if I tweak/fix the PATH before Julia setup action, I can make it work.
Workflow file if you want to try it yourself
name: test-julia-install
on: [workflow_dispatch]
jobs:
install:
runs-on: windows-latest
name: Test Julia install on windows
steps:
- uses: actions/checkout@v4
- run: $env:PATH -Split ";"
shell: powershell
- run: gcm tar
shell: powershell
- uses: r-lib/actions/setup-r@v2
# uncomment the following line to fix julia setup
# but it will have side effect probably on R setup
# with:
# windows-path-include-rtools: false
- run: $env:PATH -Split ";"
shell: powershell
- run: gcm tar
shell: powershell
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'
However, I believe it is still not ideal for julia-actions/setup-julia to use a tar that could be incompatible with the expected command
https://github.com/julia-actions/setup-julia/blob/a1561e938c17e7aaf8236334d6d533e774c71dcd/dist/index.js#L271
-
juliaDownloadPathwill be inD:as it is based onRUNNER_TEMPby default throughtc.downloadTool()https://github.com/julia-actions/setup-julia/blob/a1561e938c17e7aaf8236334d6d533e774c71dcd/dist/index.js#L234-L236 -
destwill be a folder in thehostedtoolcachefolder onC:https://github.com/julia-actions/setup-julia/blob/a1561e938c17e7aaf8236334d6d533e774c71dcd/dist/index.js#L429-L439
So either ensuring the right tar is used or the same drive is used could be safer.
Sorry for the trouble in the first place.