Skip to content

Commit cf7c329

Browse files
committed
Use eager Pkg server registry instead of git cloning
1 parent 252d468 commit cf7c329

File tree

2 files changed

+6
-84
lines changed

2 files changed

+6
-84
lines changed

action.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,12 @@ inputs:
1717
runs:
1818
using: 'composite'
1919
steps:
20-
# Occasionally, there are rather large delays (> a few hours)
21-
# between the time a package is registered in General and
22-
# propagated to pkg.julialang.org. We can avoid this by manually
23-
# cloning ~/.julia/registries/General/ in Julia 1.5 and later.
24-
# See:
25-
# * https://github.com/JuliaLang/Pkg.jl/issues/2011
26-
# * https://github.com/JuliaRegistries/General/issues/16777
27-
# * https://github.com/JuliaPackaging/PkgServer.jl/issues/60
28-
- run: julia --color=yes "$GITHUB_ACTION_PATH"/add_general_registry.buildpkg.jl
29-
shell: bash
30-
20+
- run: |
21+
VERSION >= v"1.5-" || return
22+
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = get(ENV, "JULIA_PKG_SERVER_REGISTRY_PREFERENCE", "eager")
23+
import Pkg
24+
Pkg.Registry.add("General")
25+
shell: julia {0}
3126
- run: julia --color=yes --project=${{ inputs.project }} -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end'
3227
shell: bash
3328
env:

add_general_registry.buildpkg.jl

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)