Skip to content

Commit

Permalink
Add checks for RegistryCI AutoMerge (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Oct 25, 2020
1 parent 186616e commit 937d46a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Gurobi"
uuid = "2e9cd046-0924-5485-92f1-d5272153d98b"
repo = "https://github.com/jump-dev/Gurobi.jl"
version = "0.9.1"
version = "0.9.2"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
9 changes: 8 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ function _print_GUROBI_HOME_help()
Pkg.add("Gurobi")
Pkg.build("Gurobi")
```
**Note: your path may differ. Check which folder you installed the Gurobi
binary in, and update the path accordingly.**
""")
end

Expand All @@ -85,6 +87,7 @@ function diagnose_gurobi_install()
println("""
Did you download and install one of these versions from gurobi.com?
Installing Gurobi.jl via the Julia package manager is _not_ sufficient!
""")
if haskey(ENV, "GUROBI_HOME")
dir = joinpath(ENV["GUROBI_HOME"], Sys.isunix() ? "lib" : "bin")
Expand Down Expand Up @@ -148,7 +151,11 @@ function diagnose_gurobi_install()
end
end

if !found && !haskey(ENV, "GUROBI_JL_SKIP_LIB_CHECK")
if haskey(ENV, "GUROBI_JL_SKIP_LIB_CHECK")
# Skip!
elseif get(ENV, "JULIA_REGISTRYCI_AUTOMERGE", "false") == "true"
write_depsfile("julia_registryci_automerge")
elseif !found
diagnose_gurobi_install()
error("""
Unable to locate Gurobi installation. If the advice above did not help,
Expand Down
12 changes: 8 additions & 4 deletions src/Gurobi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ include("gen/ctypes.jl")
include("gen/libgrb_common.jl")
include("gen/libgrb_api.jl")

const _GUROBI_VERSION = let
majorP, minorP, technicalP = Ref{Cint}(), Ref{Cint}(), Ref{Cint}()
GRBversion(majorP, minorP, technicalP)
VersionNumber("$(majorP[]).$(minorP[]).$(technicalP[])")
const _GUROBI_VERSION = if libgurobi == "julia_registryci_automerge"
VersionNumber(9, 0, 0)
else
let
majorP, minorP, technicalP = Ref{Cint}(), Ref{Cint}(), Ref{Cint}()
GRBversion(majorP, minorP, technicalP)
VersionNumber("$(majorP[]).$(minorP[]).$(technicalP[])")
end
end

if !(v"9.0.0" <= _GUROBI_VERSION < v"9.1")
Expand Down

2 comments on commit 937d46a

@odow
Copy link
Member Author

@odow odow commented on 937d46a Oct 25, 2020

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/23646

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.9.2 -m "<description of version>" 937d46ab4e16cfdb4d8e7e2bd2d8f2b3d72a5ae6
git push origin v0.9.2

Please sign in to comment.