Skip to content

Commit

Permalink
Add tests for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 29, 2024
1 parent 9058da0 commit 9a8d263
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
version: ['1.6', '1'] # Test against LTS and current minor release
os: [macOS-latest]
os: [ubuntu-latest, macOS-latest]
arch: [x64]
steps:
- uses: actions/checkout@v2
Expand All @@ -31,10 +31,6 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
env:
SECRET_XPRS_WIN: ${{ secrets.XPRS_WIN_900 }}
SECRET_XPRL_WIN: ${{ secrets.XPRL_WIN_900 }}
SECRET_XPRA_WIN: ${{ secrets.XPAUTH_XPR }}
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
Expand Down
12 changes: 11 additions & 1 deletion Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
[xpresspy]
[[xpresspy]]
git-tree-sha1 = "401f814491e641f375c84ea3bb3051a38bc2fd55"
os = "linux"
lazy = true

[[xpresspy.download]]
url = "https://anaconda.org/fico-xpress/xpress/9.3.0/download/linux-64/xpress-9.3.0-py310ha14b774_0.tar.bz2"
sha256 = "48fed11b039d260f0ed90bfa1e41f23561f76c71796dc926a000d17151b9f801"

[[xpresspy]]
git-tree-sha1 = "75e700f837add542a01f8b00fa20efb25a16c4f7"
os = "macos"
lazy = true

[[xpresspy.download]]
Expand Down
23 changes: 1 addition & 22 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function local_installation()
end
end

if !found && !Sys.isapple()
if !found && !(Sys.isapple() || Sys.islinux())
error("""
Unable to locate Xpress installation.
Please check your enviroment variable XPRESSDIR.
Expand All @@ -63,27 +63,6 @@ function local_installation()
end
end

function ci_installation()
files = if Sys.iswindows()
[
(ENV["SECRET_XPRS_WIN"], "xprs.dll")
(ENV["SECRET_XPRL_WIN"], "xprl.dll")
(ENV["SECRET_XPRA_WIN"], "xpauth.xpr")
]
end
for (url, file) in files
local_filename = joinpath(@__DIR__, file)
my_download(url, local_filename)
end
path = joinpath(@__DIR__, files[1][2])
d = Libdl.dlopen_e(path)
if d != C_NULL
write_depsfile(@__DIR__)
else
error("Could not open xprs.dll")
end
end

if haskey(ENV, "XPRESS_JL_SKIP_LIB_CHECK")
# Skip!
elseif get(ENV, "JULIA_REGISTRYCI_AUTOMERGE", "false") == "true"
Expand Down
2 changes: 1 addition & 1 deletion src/Xpress.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")

if isfile(depsjl_path)
include(depsjl_path)
elseif Sys.isapple()
elseif Sys.isapple() || Sys.islinux()
# Let's use the artifact instead.
const xpressdlpath = joinpath(
LazyArtifacts.artifact"xpresspy",
Expand Down

0 comments on commit 9a8d263

Please sign in to comment.