Closed cderv closed 3 months ago
More detailed information about this issue as more tests show that this is not linked to a change of temporary directory.
In fact, on github-hosted Windows runner, the default will always be on two drives and does not depend on TEMP
env var
RUNNER_TEMP
will be in D:
hostedtoolcache
will be in C:
This means that currently, this action requires a tar
that can handle Windows paths on two drives
https://github.com/julia-actions/setup-julia/blob/a1561e938c17e7aaf8236334d6d533e774c71dcd/dist/index.js#L271
More detailed answer in #206 and #207
I would sum up this issue this way.
tar.exe
that handles Windows paths with Drive later is required. tar
on PATHtar
is on PATH (it happens other actions can modify $GITHUB_PATH
and mess this up) tar.exe
that works first on PATH before running setup-julia
Big thanks to @cderv for making a fork that implements fixes from PR #206 , which have not been merged yet. I ran into this issue when running package tests that depend on R via RCall.jl. For my fellow inexperienced GitHub Actions folks, I have a matrix of OS configs that includes os: [ubuntu-latest, windows-latest, macOS-latest]
. Instead of a single setup line with - uses:julia-actions/setup-julia@v2
, I replaced it with this which worked wonderfully:
- name: Setup Julia (Default)
uses: julia-actions/setup-julia@v2
if: matrix.os != 'windows-latest'
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- name: Setup Julia (Windows w/ TAR Fix)
uses: cderv/setup-julia@fix-tar
if: matrix.os == 'windows-latest'
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
Of course, if and when the PR is merged none of this will be necessary, but for now I hope this is helpful.
Describe the bug
Recent change introduced the use of
tar
on WindowsCurrently, it is calling
tar
through PowerShell using the program name only, thus relying on PATH resolution.It happens that
/usr/bin/tar
is used (probably from Git Bash) and not the Windows internal$env:WINDIR/System32/tar.exe
. This is known to happen on github action (at least encountered in the past)I encountered this because by modifying temp folder to be
{{ runner.temp }}
on Windows, it leads to havingtar
dealing with Windows path name with network drive letter. Only Windows's tar can handle that.This is the issue I encountered using
setup-julia
action/usr/bin/tar
is the own throwing the error{{ runner.temp }}
which is onD:
and it tries to untar onC:
.To Reproduce
I can create a simple example reproducing the
Can't connect error
but this is not the main issue I would like to report here. I believe any action using 1.9.5 is calling the/usr/bin/tar
instead of Window's tar.exeIf you would like a workflow file anyway, I can provide.
Expected behavior
Windows' own tar is used when using
tar
on Windows, which allows to correctly handle Windows paths.This change ensures it is, and it solves issue I encountered
(I modified in Fork in
dist
by convenience for testing.Screenshots/Build logs
With current 1.9.5
With a fork using Windows' tar
Additional context
Nothing more I can think of.
Happy to provide anything more needed. Please do tell me.
Thanks