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

test changing the windows temp dir

Open IanButterworth opened this issue 2 years ago • 3 comments

Adds test for #205

Should fail on windows on master

IanButterworth avatar Jan 15 '24 23:01 IanButterworth

@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

IanButterworth avatar Jan 15 '24 23:01 IanButterworth

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.

cderv avatar Jan 16 '24 09:01 cderv

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 tar found on PATH for untar from D: (RUNNER_TEMP) to C:\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

  • juliaDownloadPath will be in D: as it is based on RUNNER_TEMP by default through tc.downloadTool() https://github.com/julia-actions/setup-julia/blob/a1561e938c17e7aaf8236334d6d533e774c71dcd/dist/index.js#L234-L236

  • dest will be a folder in the hostedtoolcache folder on C: 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.

cderv avatar Jan 16 '24 11:01 cderv