Skip to content

Commit fcafde1

Browse files
authored
Use eager Pkg server registry instead of git cloning (#31)
* Use eager Pkg server registry instead of git cloning This patch removes the git cloning of General and instead uses the eager registry flavor. In addition, the action exits early if no deps/build.jl file exist. * Use env: key instead.
1 parent 252d468 commit fcafde1

File tree

2 files changed

+7
-86
lines changed

2 files changed

+7
-86
lines changed

action.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +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-
31-
- 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'
32-
shell: bash
20+
- run: |
21+
isfile("deps/build.jl") || exit()
22+
import Pkg
23+
VERSION >= v"1.5-" && Pkg.Registry.add("General")
24+
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()
25+
shell: julia --color=yes --project=${{ inputs.project }} {0}
3326
env:
27+
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"
3428
JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"

add_general_registry.buildpkg.jl

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

0 commit comments

Comments
 (0)