mirror of
https://github.com/julia-actions/julia-buildpkg.git
synced 2026-02-12 09:26:54 +08:00
* 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.
29 lines
978 B
YAML
29 lines
978 B
YAML
name: 'Run Pkg.build'
|
|
description: 'Run the build step in a Julia package'
|
|
author: 'David Anthoff'
|
|
|
|
branding:
|
|
icon: 'box'
|
|
color: 'gray-dark'
|
|
|
|
inputs:
|
|
project:
|
|
description: 'Value passed to the --project flag. The default value is the repository root: "@."'
|
|
default: '@.'
|
|
precompile:
|
|
description: 'Whether to allow auto-precompilation (via the `JULIA_PKG_PRECOMPILE_AUTO` env var). Options: yes | no. Default value: no.'
|
|
default: 'no'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- 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 }}"
|