diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4df3e49..61fbca4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml index d1c1aa1..1609b1c 100644 --- a/.github/workflows/format_check.yml +++ b/.github/workflows/format_check.yml @@ -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) diff --git a/Project.toml b/Project.toml index 700b5f3..9b8e7d7 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/Cbc.jl b/src/Cbc.jl index 24ea845..d09b5f6 100644 --- a/src/Cbc.jl +++ b/src/Cbc.jl @@ -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 @@ -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