Skip to content

Commit

Permalink
Fix qplib source [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromxavier committed Oct 15, 2024
1 parent 60dd9b2 commit 477e0b9
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions scripts/build/sources/qplib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ end
function load_qplib!(index::QUBOLib.LibraryIndex)
@assert Sys.isunix() "Processing QPLIB is only possible on Unix systems"

data_path = mkpath(QUBOLib.cache_data_path(index, "qplib"))
file_path = abspath(QUBOLib.cache_path(index, "qplib"), "qplib.zip")
data_path = mkpath(QUBOLib.cache_data_path(index, "qplib"))
file_path = abspath(QUBOLib.cache_path(index, "qplib"), "qplib.zip")

# Download QPLIB archive
if isfile(file_path)
Expand All @@ -324,14 +324,17 @@ function load_qplib!(index::QUBOLib.LibraryIndex)

@info "[qplib] Extracting archive"

run(```
unzip -qq -o -j
$file_path
'qplib/html/qplib/*'
'qplib/html/sol/*'
'qplib/html/lp/*'
-d $data_path
```)
run(`unzip -qq -o -j $file_path -d $data_path`)

# When getting from original source:
# run(```
# unzip -qq -o -j
# $file_path
# 'qplib/html/qplib/*'
# 'qplib/html/sol/*'
# 'qplib/html/lp/*'
# -d $data_path
# ```)

# Remove non-QUBO instances
@info "[qplib] Removing non-QUBO instances"
Expand Down

0 comments on commit 477e0b9

Please sign in to comment.