Skip to content

Commit 51d8997

Browse files
committed
Add KNITRO@15 to CI
1 parent a914cd9 commit 51d8997

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
run: |
3030
echo "$SECRET_KNITRO_LICENSE" > ~/artelys_lic.txt
3131
- uses: julia-actions/julia-buildpkg@v1
32-
env:
33-
SECRET_KNITRO_URL: ${{ secrets.KNITRO_URL }}
34-
SECRET_KNITRO_LIBIOMP5: ${{ secrets.KNITRO_LIBIOMP5 }}
3532
- uses: julia-actions/julia-runtest@v1
3633
- uses: julia-actions/julia-processcoverage@v1
3734
- uses: codecov/codecov-action@v4

.github/workflows/minlptests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ jobs:
2121
run: |
2222
echo "$SECRET_KNITRO_LICENSE" > ~/artelys_lic.txt
2323
- name: "run_minlptests"
24-
env:
25-
SECRET_KNITRO_URL: ${{ secrets.KNITRO_URL }}
26-
SECRET_KNITRO_LIBIOMP5: ${{ secrets.KNITRO_LIBIOMP5 }}
2724
shell: julia --color=yes {0}
2825
run: |
2926
path = joinpath(ENV["GITHUB_WORKSPACE"], "test", "MINLPTests")

deps/build.jl

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
using Libdl, Base.Sys
1+
# Copyright (c) 2016: Ng Yee Sian, Miles Lubin, other contributors
2+
#
3+
# Use of this source code is governed by an MIT-style license that can be found
4+
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
5+
6+
import Libdl
27

38
const DEPS_FILE = joinpath(dirname(@__FILE__), "deps.jl")
49

@@ -41,15 +46,24 @@ function try_local_installation()
4146
return
4247
end
4348

49+
const WHEELS = Dict(
50+
"x86_64-linux-gnu" => "https://files.pythonhosted.org/packages/76/6e/ffe880b013ad244f0fd91940454e4f2bf16fa01e74c469e1b0fb75eda12a/knitro-15.0.0-py3-none-manylinux1_x86_64.whl",
51+
)
52+
4453
function try_ci_installation()
45-
local_filename = joinpath(@__DIR__, "libknitro.so")
46-
download(ENV["SECRET_KNITRO_URL"], local_filename)
47-
download(ENV["SECRET_KNITRO_LIBIOMP5"], joinpath(@__DIR__, "libiomp5.so"))
48-
write_depsfile("", local_filename)
54+
if Sys.islinux()
55+
cd(@__DIR__)
56+
mkdir("wheel")
57+
cd("wheel")
58+
run(`wget $(WHEELS["x86_64-linux-gnu"])`)
59+
run(`unzip knitro-15.0.0-py3-none-manylinux1_x86_64.whl`)
60+
filename = joinpath(@__DIR__, "wheel", "knitro", "lib", "libknitro.so")
61+
write_depsfile("", filename)
62+
end
4963
return
5064
end
5165

52-
if get(ENV, "SECRET_KNITRO_URL", "") != ""
66+
if get(ENV, "CI", "false") == "true"
5367
try_ci_installation()
5468
else
5569
try_local_installation()

0 commit comments

Comments
 (0)