mirror of
https://github.com/julia-actions/julia-buildpkg.git
synced 2026-02-12 01:16:54 +08:00
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.
This commit is contained in:
20
action.yml
20
action.yml
@@ -17,18 +17,12 @@ inputs:
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
# Occasionally, there are rather large delays (> a few hours)
|
||||
# between the time a package is registered in General and
|
||||
# propagated to pkg.julialang.org. We can avoid this by manually
|
||||
# cloning ~/.julia/registries/General/ in Julia 1.5 and later.
|
||||
# See:
|
||||
# * https://github.com/JuliaLang/Pkg.jl/issues/2011
|
||||
# * https://github.com/JuliaRegistries/General/issues/16777
|
||||
# * https://github.com/JuliaPackaging/PkgServer.jl/issues/60
|
||||
- run: julia --color=yes "$GITHUB_ACTION_PATH"/add_general_registry.buildpkg.jl
|
||||
shell: bash
|
||||
|
||||
- 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'
|
||||
shell: bash
|
||||
- run: |
|
||||
isfile("deps/build.jl") || exit()
|
||||
import Pkg
|
||||
VERSION >= v"1.5-" && Pkg.Registry.add("General")
|
||||
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()
|
||||
shell: julia --color=yes --project=${{ inputs.project }} {0}
|
||||
env:
|
||||
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"
|
||||
JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"
|
||||
|
||||
Reference in New Issue
Block a user