Skip to content

Commit

Permalink
adapt ci
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed Aug 29, 2024
1 parent 93646cc commit cdc9c3c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [master]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion src/PlotUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export optimize_ticks, optimize_datetime_ticks

include("ticks.jl")

const _default_colorscheme = ColorSchemes.colorscheme(:seaborn_colorblind)
const _default_colorscheme = ColorSchemes.colorschemes[:seaborn_colorblind]

if VERSION v"1.8.0"
@compile_workload begin
Expand Down
39 changes: 29 additions & 10 deletions test/downstream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Pkg, PlotUtils, Test
LibGit2 = Pkg.GitTools.LibGit2
TOML = Pkg.TOML

failsafe_clone_checkout(path, url) = begin
failsafe_clone_checkout(path, url; version = :stable) = begin
local repo
for i 1:6
try
Expand All @@ -27,10 +27,13 @@ failsafe_clone_checkout(path, url) = begin
end
@assert isfile(versions)

stable = maximum(VersionNumber.(keys(TOML.parse(read(versions, String)))))
tag = LibGit2.GitObject(repo, "v$stable")
hash = string(LibGit2.target(tag))
LibGit2.checkout!(repo, hash)
if version === :stable
stable = maximum(VersionNumber.(keys(TOML.parse(read(versions, String)))))
vrs = "v$stable"
tag = LibGit2.GitObject(repo, vrs)
hash = string(LibGit2.target(tag))
LibGit2.checkout!(repo, hash)
end
nothing
end

Expand All @@ -50,11 +53,27 @@ end
develop_stable_Plots() = begin
tmpd = mktempdir()
Plots_jl = joinpath(tmpd, "Plots.jl")

failsafe_clone_checkout(Plots_jl, "https://github.com/JuliaPlots/Plots.jl")
fake_supported_version!(Plots_jl)

Pkg.develop(path = Plots_jl)
PlotThemes_jl = joinpath(tmpd, "PlotThemes.jl")
PlotsBase_jl = joinpath(Plots_jl, "PlotsBase")
RecipesPipeline_jl = joinpath(Plots_jl, "RecipesPipeline")

failsafe_clone_checkout(
Plots_jl,
"https://github.com/JuliaPlots/Plots.jl",
version = :default,
)
fake_supported_version!(RecipesPipeline_jl)
fake_supported_version!(PlotsBase_jl)

failsafe_clone_checkout(PlotThemes_jl, "https://github.com/JuliaPlots/PlotThemes.jl")
fake_supported_version!(PlotThemes_jl)

Pkg.develop([
PackageSpec(path = Plots_jl),
PackageSpec(path = RecipesPipeline_jl),
PackageSpec(path = PlotsBase_jl),
PackageSpec(path = PlotThemes_jl),
])
Pkg.status(["PlotUtils", "Plots"])
nothing
end
Expand Down

0 comments on commit cdc9c3c

Please sign in to comment.