Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
inputs:
julia-version:
description: "Julia version (downgrade is usually run on the oldest supported version)"
description: "Julia version (downgrade tests the minimum-supported Julia floor; defaults to the LTS alias 'lts', currently 1.10, tracking the LTS as it advances)"
default: "lts"
required: false
type: string
Expand All @@ -14,8 +14,8 @@ on:
required: false
type: string
skip:
description: "Comma-separated list of packages to skip when downgrading compat (passed to julia-actions/julia-downgrade-compat)"
default: "Pkg,TOML"
description: "ADDITIONAL deps to skip when downgrading, beyond the auto-included Julia stdlibs (comma-separated; unioned into the effective skip passed to julia-actions/julia-downgrade-compat)"
default: ""
required: false
type: string
projects:
Expand Down Expand Up @@ -55,9 +55,31 @@ jobs:
with:
version: "${{ inputs.julia-version }}"

- name: "Compute effective downgrade skip list"
run: |
# Effective skip = Julia stdlibs ∪ the caller's `skip` input (extra
# skips). Standard libraries are always in-tree at their pinned
# version, so they must never be downgrade-pinned. Enumerate them
# robustly from Pkg (the dict is keyed by UUID, so take the NAME from
# each value; the value is (name, version) on recent Julia and a
# String on older).
stdlibs="$(julia --startup-file=no -e '
using Pkg
ns = String[]
for v in values(Pkg.Types.stdlibs())
push!(ns, v isa AbstractString ? v : first(v))
end
println(join(sort(unique(ns)), ","))
')"
echo "Julia stdlibs: $stdlibs"
effective="$stdlibs"
[ -n "${{ inputs.skip }}" ] && effective="$effective,${{ inputs.skip }}"
echo "Effective downgrade skip: $effective"
echo "EFFECTIVE_SKIP=$effective" >> "$GITHUB_ENV"

- uses: julia-actions/julia-downgrade-compat@v2
with:
skip: "${{ inputs.skip }}"
skip: "${{ env.EFFECTIVE_SKIP }}"
projects: "${{ inputs.projects }}"
mode: "${{ inputs.mode != '' && inputs.mode || 'deps' }}"

Expand Down
43 changes: 39 additions & 4 deletions .github/workflows/sublibrary-downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
workflow_call:
inputs:
julia-version:
description: "Julia version to run the downgrade tests on"
description: "Julia version to run the downgrade tests on (downgrade tests the minimum-supported Julia floor; defaults to the LTS alias 'lts', currently 1.10, tracking the LTS as it advances)"
default: "lts"
required: false
type: string
skip:
description: "Comma-separated deps to skip when downgrading (passed to julia-downgrade-compat)"
default: "Pkg,TOML"
description: "ADDITIONAL deps to skip when downgrading, beyond the auto-included Julia stdlibs and in-repo lib/* sublibraries (comma-separated; unioned into the effective skip passed to julia-downgrade-compat)"
default: ""
required: false
type: string
projects:
Expand Down Expand Up @@ -93,10 +93,45 @@ jobs:
- name: "Set sublibrary test group"
if: "${{ inputs.group-env-name != '' }}"
run: echo "${{ inputs.group-env-name }}=${{ inputs.group-env-value }}" >> "$GITHUB_ENV"
- name: "Enumerate Julia standard libraries"
run: |
# Standard libraries are always in-tree at their pinned version, so
# they must never be downgrade-pinned. Enumerate them robustly from
# Pkg (the dict is keyed by UUID, so take the NAME from each value;
# the value is (name, version) on recent Julia and a String on older).
names="$(julia --startup-file=no -e '
using Pkg
ns = String[]
for v in values(Pkg.Types.stdlibs())
push!(ns, v isa AbstractString ? v : first(v))
end
println(join(sort(unique(ns)), ","))
')"
echo "Julia stdlibs: $names"
echo "STDLIB_SKIP=$names" >> "$GITHUB_ENV"
- name: "Compute effective downgrade skip list"
run: |
# Effective skip = Julia stdlibs ∪ in-repo lib/* sublibrary NAMES
# ∪ the caller's `skip` input (extra skips).
# In-repo path-[sources] sublibs must not be downgrade-pinned, so add
# every lib/<name> directory name to the skip set.
sublibs=""
for d in lib/*/; do
d="${d%/}"
[ -f "$d/Project.toml" ] || continue
name="$(basename "$d")"
if [ -z "$sublibs" ]; then sublibs="$name"; else sublibs="$sublibs,$name"; fi
done
echo "In-repo sublibraries: $sublibs"
effective="$STDLIB_SKIP"
[ -n "$sublibs" ] && effective="$effective,$sublibs"
[ -n "${{ inputs.skip }}" ] && effective="$effective,${{ inputs.skip }}"
echo "Effective downgrade skip: $effective"
echo "EFFECTIVE_SKIP=$effective" >> "$GITHUB_ENV"
- uses: julia-actions/julia-downgrade-compat@v2
with:
projects: ${{ matrix.project }}
skip: ${{ inputs.skip }}
skip: ${{ env.EFFECTIVE_SKIP }}
julia_version: ${{ inputs.julia-version }}
- uses: julia-actions/julia-buildpkg@v1
with:
Expand Down
Loading