diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0034c11..0c6e2a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ name: CI env: JULIA_NUM_THREADS: 2 +concurrency: + # group by workflow and ref; the last slightly strange component ensures that for pull + # requests, we limit to 1 concurrent job, but for the master branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }} + # Cancel intermediate builds, but only if it is a pull request build. + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} on: pull_request: branches: diff --git a/Project.toml b/Project.toml index 50a0965..076ef7e 100644 --- a/Project.toml +++ b/Project.toml @@ -26,10 +26,3 @@ JuMP = "1" LEMONGraphs = "0.1.0" MathOptInterface = "1" julia = "1.10" - -[extras] -Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[targets] -test = ["Test", "Cbc"] diff --git a/test/Project.toml b/test/Project.toml index da4b9f3..9c9878a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,6 +1,6 @@ [deps] -Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" +HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" Hungarian = "e91730f6-4275-51fb-a7a0-7064cfbd3b39" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/test/REQUIRE b/test/REQUIRE deleted file mode 100644 index b67d6e8..0000000 --- a/test/REQUIRE +++ /dev/null @@ -1 +0,0 @@ -Cbc 0.4 diff --git a/test/runtests.jl b/test/runtests.jl index cd0df89..98a6982 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,7 @@ using Graphs using GraphsMatching using Test -using Cbc +using HiGHS using JuMP using LinearAlgebra: I @@ -21,7 +21,7 @@ end w = transpose(w) * w match_sol = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) match_red = maximum_weight_matching_reduction(g, w) @@ -44,7 +44,7 @@ end ] match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) @test match.mate[1] == 3 @@ -57,7 +57,7 @@ end w[1, 3] = 1 match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) @test match.weight ≈ 1 @@ -75,7 +75,7 @@ end match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) @test match.weight ≈ 3 @@ -91,7 +91,7 @@ end add_edge!(g, 3, 4) match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, ) @test match.weight ≈ 2 @test match.mate[1] == 2 @@ -107,7 +107,7 @@ end match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) @test match.weight ≈ 2 @@ -124,7 +124,7 @@ end match = maximum_weight_matching( g, - optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + HiGHS.Optimizer, w, ) @test match.weight ≈ 5 @@ -147,7 +147,7 @@ end g, w, algorithm = LPAlgorithm(), - optimizer = optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + optimizer = HiGHS.Optimizer, ) @test match.weight ≈ 21 @test match.mate[1] == 3 @@ -165,7 +165,7 @@ end g, w, algorithm = LPAlgorithm(), - optimizer = optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + optimizer = HiGHS.Optimizer, ) @test match.weight ≈ 11.5 @test match.mate[1] == 4 @@ -185,7 +185,7 @@ end g, w, algorithm = LPAlgorithm(), - optimizer = optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + optimizer = HiGHS.Optimizer, cutoff = 0, ) @test match.weight ≈ 11.5 @@ -206,7 +206,7 @@ end g, w, algorithm = LPAlgorithm(), - optimizer = optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0), + optimizer = HiGHS.Optimizer, cutoff = 0, ) @test match.weight ≈ 12