Skip to content

Commit 0b83653

Browse files
committed
feat: set juliaup depot env to a location in the runner tool cache
1 parent b5de786 commit 0b83653

5 files changed

Lines changed: 168 additions & 75 deletions

File tree

ci/test.jl

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,32 @@ function get_expected_platform()
3030
return platform
3131
end
3232

33+
function get_expected_depot_root()
34+
depot = get(ENV, "JULIAUP_DEPOT_PATH", "")
35+
if isempty(depot)
36+
return joinpath(homedir(), ".julia")
37+
end
38+
return depot
39+
end
40+
3341
@static if Sys.isapple()
3442
function get_expected_paths(; EXPECTED_VERSION)
3543
expected_exename = get_expected_exename()
3644
expected_platform = get_expected_platform()
3745
expected_version_vn = VersionNumber(EXPECTED_VERSION)
3846
expected_version_majmin_str = "$(expected_version_vn.major).$(expected_version_vn.minor)"
39-
47+
depot_root = get_expected_depot_root()
48+
4049
expected_path1 = joinpath(
41-
homedir(),
42-
".julia",
50+
depot_root,
4351
"juliaup",
4452
"julia-$(EXPECTED_VERSION)+0.$(expected_platform)",
4553
"bin",
4654
expected_exename,
4755
)
4856
# expected_path2 is possible after https://github.com/JuliaLang/juliaup/pull/1320
4957
expected_path2 = joinpath(
50-
homedir(),
51-
".julia",
58+
depot_root,
5259
"juliaup",
5360
"julia-$(EXPECTED_VERSION)+0.$(expected_platform)",
5461
"Julia-$(expected_version_majmin_str).app",
@@ -66,10 +73,10 @@ else
6673
function get_expected_path(; EXPECTED_VERSION)
6774
expected_exename = get_expected_exename()
6875
expected_platform = get_expected_platform()
76+
depot_root = get_expected_depot_root()
6977

7078
expected_path = joinpath(
71-
homedir(),
72-
".julia",
79+
depot_root,
7380
"juliaup",
7481
"julia-$(EXPECTED_VERSION)+0.$(expected_platform)",
7582
"bin",

0 commit comments

Comments
 (0)