From 74da8fdf07bb9357525715a5dc945d14221abec8 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 1 Mar 2024 11:07:30 +1300 Subject: [PATCH] Add back Windows tests --- .github/workflows/ci.yml | 2 +- deps/build.jl | 2 +- src/Xpress.jl | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a551dac4..cd1ec815 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: version: ['1.6', '1'] # Test against LTS and current minor release - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] arch: [x64] steps: - uses: actions/checkout@v2 diff --git a/deps/build.jl b/deps/build.jl index 742b290f..3409455f 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -59,7 +59,7 @@ function local_installation() end end - if !found && !(Sys.isapple() || Sys.islinux()) + if !found && !(Sys.isapple() || Sys.islinux() || Sys.iswindows()) error(""" Unable to locate Xpress installation. Please check your enviroment variable XPRESSDIR. diff --git a/src/Xpress.jl b/src/Xpress.jl index cbda3630..2b781114 100644 --- a/src/Xpress.jl +++ b/src/Xpress.jl @@ -30,12 +30,14 @@ elseif Sys.islinux() # Use the artifact instead. ) # Annoyingly, Xpress has the version after extension const libxprs = joinpath(xpressdlpath, "libxprs.so.42") -# elseif Sys.iswindows() # Use the artifact instead. -# const xpressdlpath = joinpath( -# LazyArtifacts.artifact"xpresspy", -# joinpath("Lib", "site-packages", "xpress", "lib"), -# ) -# const libxprs = joinpath(xpressdlpath, "xprs.dll") +elseif Sys.iswindows() # Use the artifact instead. + const xpressdlpath = joinpath( + LazyArtifacts.artifact"xpresspy", + joinpath("Lib", "site-packages", "xpress", "lib"), + ) + # There is a permission issue with the Windows artifact. + chmod(dirname(xpressdlpath), 0o755; recursive = true) + const libxprs = joinpath(xpressdlpath, "xprs.dll") elseif haskey(ENV, "XPRESS_JL_NO_DEPS_ERROR") const xpressdlpath = "" const libxprs = (Sys.iswindows() ? "" : "lib") * "xprs.$(Libdl.dlext)"