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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['1.6', '1'] # Test against LTS and current minor release
version: ['1.10', '1'] # Test against LTS and current minor release
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x64]
include:
# Also test against 32-bit Linux on LTS.
- version: '1.6'
- version: '1.10'
os: ubuntu-latest
arch: x86
# Test against Apple M-series
- version: '1'
os: macos-14
arch: aarch64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
Pkg.add(PackageSpec(name="JuliaFormatter", version="2"))
using JuliaFormatter
format("src/MOI_wrapper", verbose=true)
format("test", verbose=true)
Expand Down
10 changes: 7 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name = "Cbc"
uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
repo = "https://github.com/jump-dev/Cbc.jl.git"
version = "1.2.0"
version = "1.3.0"

[deps]
Cbc_jll = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
Cbc_jll = "=2.10.5, =200.1000.501, =200.1000.800"
Cbc_jll = "=200.1000.1200"
LinearAlgebra = "1"
MathOptInterface = "1.7"
julia = "1.6"
OpenBLAS32_jll = "0.3.10"
julia = "1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
32 changes: 20 additions & 12 deletions src/Cbc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
module Cbc

import Cbc_jll: libcbcsolver
import LinearAlgebra
import MathOptInterface as MOI
import OpenBLAS32_jll
import SparseArrays

function __init__()
config = LinearAlgebra.BLAS.lbt_get_config()
if !any(lib -> lib.interface == :lp64, config.loaded_libs)
LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path)
end
version_str = unsafe_string(Cbc_getVersion())
version = if version_str == "devel"
# Support un-released versions of Cbc. These may differ in C API
Expand All @@ -19,18 +25,20 @@ function __init__()
VersionNumber(version_str)
end
if !(v"2.10.0" <= version < v"2.11")
error("""
You have installed version $version of Cbc, which is not supported by
Cbc.jl We require Cbc version 2.10. After installing Cbc 2.10, run:

import Pkg
Pkg.rm("Cbc")
Pkg.add("Cbc")

If you have a newer version of Cbc installed, changes may need to be made
to the Julia code. Please open an issue at
https://github.com/jump-dev/Cbc.jl.
""")
error(
"""
You have installed version $version of Cbc, which is not supported by
Cbc.jl We require Cbc version 2.10. After installing Cbc 2.10, run:

import Pkg
Pkg.rm("Cbc")
Pkg.add("Cbc")

If you have a newer version of Cbc installed, changes may need to be
made to the Julia code. Please open an issue at
https://github.com/jump-dev/Cbc.jl.
""",
)
end
return
end
Expand Down
Loading