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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 0 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion test/REQUIRE

This file was deleted.

24 changes: 12 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Graphs
using GraphsMatching
using Test
using Cbc
using HiGHS
using JuMP
using LinearAlgebra: I

Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -75,7 +75,7 @@ end

match = maximum_weight_matching(
g,
optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0),
HiGHS.Optimizer,
w,
)
@test match.weight ≈ 3
Expand All @@ -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
Expand All @@ -107,7 +107,7 @@ end

match = maximum_weight_matching(
g,
optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0),
HiGHS.Optimizer,
w,
)
@test match.weight ≈ 2
Expand All @@ -124,7 +124,7 @@ end

match = maximum_weight_matching(
g,
optimizer_with_attributes(Cbc.Optimizer, "LogLevel" => 0),
HiGHS.Optimizer,
w,
)
@test match.weight ≈ 5
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading