Skip to content

Commit

Permalink
Merge pull request #30 from oscar-system/misc
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz authored Jun 29, 2023
2 parents cb81a20 + ef8cc41 commit b82223c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OscarDevTools"
uuid = "4f01c588-2833-446a-9dbd-6331d80acb41"
authors = ["Benjamin Lorenz <[email protected]>"]
version = "0.2.12"
version = "0.2.13"

[deps]
GitHub = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
Expand Down
21 changes: 12 additions & 9 deletions src/DevUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,25 @@ function oscar_develop(pkgs::Dict{String,Any}; dir=default_dev_dir, branch::Abst
# -> pin currently disabled since pinning oscar should suffice for now
## Pkg.pin.(releases)
end
# then add any explicitly specified branches
# then the currently active project
pkgspecs = Pkg.Types.PackageSpec[]
if !isnothing(active_pkg) && !in(active_pkg, Helpers.non_jl_repo)
# during CI we always need to dev the active checkout
@info " reusing current dir for $active_pkg"
push!(pkgspecs, Pkg.PackageSpec(path="."))
end
# finally add any explicitly specified branches
# (these should be downstream of the active package)
for (pkg, pkgbranch) in filter(pkg -> pkg.second != "release", pkgs)
if pkg === active_pkg
if pkg == active_pkg
continue
else
isnothing(pkgbranch) && (pkgbranch=branch)
devdir = checkout_project(pkg, dir; branch=pkgbranch, fork=fork, merge=merge)
Pkg.develop(Pkg.PackageSpec(path=devdir))
push!(pkgspecs, Pkg.PackageSpec(path=devdir))
end
end
# and finally the currently active project
if !isnothing(active_pkg) && !in(active_pkg, Helpers.non_jl_repo)
# during CI we always need to dev the active checkout
@info " reusing current dir for $active_pkg"
Pkg.develop(Pkg.PackageSpec(path="."))
end
length(pkgspecs) > 0 && Pkg.develop(pkgspecs)
# unpin everything again as this folder might be used for normal development now
# length(releases) > 0 && Pkg.free.(releases)
# -> only oscar for now, see above
Expand Down
9 changes: 4 additions & 5 deletions src/Helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ function pkg_parsebranch(pkg::AbstractString, branch::AbstractString)
end
branch = urlmatch[2]
end
if isnothing(fork)
return (nothing, branch, "$pkg#$branch")
else
return (fork, branch, "$pkg@$fork#$branch")
end
name = pkg
isnothing(fork) || (name *= "@$fork")
branch == "" || (name *= "#$branch")
return (fork, branch, name)
end

end
27 changes: 17 additions & 10 deletions src/OscarCI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,25 @@ function ci_matrix(meta::Dict{String,Any}; pr=0, fork=nothing, active_repo=nothi
totest = get!(pkgmeta, "test", false)
testopts = get!(pkgmeta, "testoptions", [])

# ignore currently active repo
pkg == active_pkg && continue

# add pkgs without 'branches' entry to the global pkg list
# and dont create a separate axis
if !haskey(pkgmeta,"branches")
push!(global_axis_pkgs,pkg)
continue
# don't ignore currently active repo
# it might be needed to do some extra tests together with oscar
# (e.g. for Polymake)
branches = if pkg == active_pkg
if totest == true
[""]
else
continue
end
else
# add pkgs without 'branches' entry to the global pkg list
# and dont create a separate axis
if !haskey(pkgmeta,"branches")
push!(global_axis_pkgs,pkg)
continue
end
pkgmeta["branches"]
end

branches = pkgmeta["branches"]

if !isempty(pr_branch) && "<matching>" in branches
(url, branch, pkg_fork) = find_branch(pkg, pr_branch; fork=fork)
# replace '<matching>' with pr_branch
Expand Down

2 comments on commit b82223c

@benlorenz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/86491

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.13 -m "<description of version>" b82223c9fe3931f3e835ebb23bd5000863235103
git push origin v0.2.13

Please sign in to comment.