From 9a8d263c19abc60bbb8168f3e3e4eaff11ef48ce Mon Sep 17 00:00:00 2001 From: odow Date: Thu, 29 Feb 2024 13:23:32 +1300 Subject: [PATCH] Add tests for linux --- .github/workflows/ci.yml | 6 +----- Artifacts.toml | 12 +++++++++++- deps/build.jl | 23 +---------------------- src/Xpress.jl | 2 +- 4 files changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad4893f..a551dac4 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: [macOS-latest] + os: [ubuntu-latest, macOS-latest] arch: [x64] steps: - uses: actions/checkout@v2 @@ -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 diff --git a/Artifacts.toml b/Artifacts.toml index c7780f4b..bf6fe4b4 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -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]] diff --git a/deps/build.jl b/deps/build.jl index ce488c14..ab9d9933 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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. @@ -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" diff --git a/src/Xpress.jl b/src/Xpress.jl index cfac3ce7..d827a3fa 100644 --- a/src/Xpress.jl +++ b/src/Xpress.jl @@ -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",