Compare commits

...

3 Commits

Author SHA1 Message Date
Sascha Mann
18a454f022 Deprecate @master 2023-03-15 23:07:14 +01:00
Fredrik Ekre
72ddd0fcdc Export the JULIA_PKG_SERVER_REGISTRY_PREFERENCE variable for subsequent steps. (#33) 2023-03-13 18:32:34 +01:00
Fredrik Ekre
7c59a056df Revert shortcut for missing deps/build.jl file. (#32) 2023-03-13 13:09:48 +01:00
2 changed files with 18 additions and 2 deletions

View File

@@ -33,3 +33,13 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-runtest@v1
``` ```
### Registry flavor preference
This actions defines (and exports for subsequent steps of the workflow) the
environmental variable `JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager` unless it
is already set. If you want another registry flavor (i.e. `conservative`) this
should be defined in the `env:` section of the relevant workflow or step. See
[Registry flavors](https://pkgdocs.julialang.org/dev/registries/#Registry-flavors)
for more information.

View File

@@ -17,12 +17,18 @@ inputs:
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
- name: 'DEPRECATION WARNING: julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!'
run: |
echo "::warning title=DEPRECATION WARNING::julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!"
echo "# :warning: DEPRECATION WARNING :warning: julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!" >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Set and export registry flavor preference
run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV}
shell: bash
- run: | - run: |
isfile("deps/build.jl") || exit()
import Pkg import Pkg
VERSION >= v"1.5-" && Pkg.Registry.add("General") VERSION >= v"1.5-" && Pkg.Registry.add("General")
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build() VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()
shell: julia --color=yes --project=${{ inputs.project }} {0} shell: julia --color=yes --project=${{ inputs.project }} {0}
env: 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 }}" JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"