Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for RegistryCI AutoMerge #362

Merged
merged 1 commit into from
Oct 25, 2020
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
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