julia-actions / setup-julia

This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.
MIT License
93 stars 23 forks source link

test changing the windows temp dir #207

Open IanButterworth opened 9 months ago

IanButterworth commented 9 months ago

Adds test for #205

Should fail on windows on master

IanButterworth commented 9 months ago

@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

cderv commented 9 months ago

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 commented 9 months ago

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:

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

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.