mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Build system image
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,12 +1,19 @@
|
|||||||
PYTEST_ARGS := -W ignore::DeprecationWarning -vv -x --log-level=DEBUG
|
PYTEST_ARGS := -W ignore::DeprecationWarning -vv -x --log-level=DEBUG
|
||||||
JULIA := julia --color=yes --project=src/julia
|
JULIA := julia --color=yes --project=src/julia --sysimage build/sysimage.so
|
||||||
|
|
||||||
all: docs test
|
all: docs test
|
||||||
|
|
||||||
|
build/sysimage.so: src/julia/Manifest.toml src/julia/Project.toml
|
||||||
|
mkdir -p build
|
||||||
|
julia --color=yes --project=src/julia src/julia/sysimage.jl
|
||||||
|
|
||||||
develop:
|
develop:
|
||||||
cd src/python && python setup.py develop
|
cd src/python && python setup.py develop
|
||||||
$(JULIA) -e "using Pkg; Pkg.instantiate()"
|
$(JULIA) -e "using Pkg; Pkg.instantiate()"
|
||||||
|
|
||||||
|
docs:
|
||||||
|
mkdocs build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cd src/python && python setup.py install
|
cd src/python && python setup.py install
|
||||||
$(JULIA) -e "using Pkg; Pkg.instantiate()"
|
$(JULIA) -e "using Pkg; Pkg.instantiate()"
|
||||||
@@ -14,18 +21,15 @@ install:
|
|||||||
uninstall:
|
uninstall:
|
||||||
pip uninstall miplearn
|
pip uninstall miplearn
|
||||||
|
|
||||||
docs:
|
|
||||||
mkdocs build
|
|
||||||
|
|
||||||
test: test-python test-julia
|
test: test-python test-julia
|
||||||
|
|
||||||
test-python:
|
test-python:
|
||||||
cd src/python && pytest $(PYTEST_ARGS)
|
cd src/python && pytest $(PYTEST_ARGS)
|
||||||
|
|
||||||
test-julia:
|
test-python-watch:
|
||||||
$(JULIA) -e 'using Pkg; Pkg.test("MIPLearn")'
|
|
||||||
|
|
||||||
test-watch:
|
|
||||||
cd src/python && pytest-watch -- $(PYTEST_ARGS)
|
cd src/python && pytest-watch -- $(PYTEST_ARGS)
|
||||||
|
|
||||||
|
test-julia: build/sysimage.so
|
||||||
|
$(JULIA) src/julia/test/runtests.jl
|
||||||
|
|
||||||
.PHONY: test test-python test-julia test-watch docs
|
.PHONY: test test-python test-julia test-watch docs
|
||||||
|
|||||||
@@ -243,6 +243,12 @@ git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
|
|||||||
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
|
|
||||||
|
[[PackageCompiler]]
|
||||||
|
deps = ["Libdl", "Pkg", "UUIDs"]
|
||||||
|
git-tree-sha1 = "98aa9c653e1dc3473bb5050caf8501293db9eee1"
|
||||||
|
uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
|
||||||
|
version = "1.2.1"
|
||||||
|
|
||||||
[[Parsers]]
|
[[Parsers]]
|
||||||
deps = ["Dates", "Test"]
|
deps = ["Dates", "Test"]
|
||||||
git-tree-sha1 = "75d07cb840c300084634b4991761886d0d762724"
|
git-tree-sha1 = "75d07cb840c300084634b4991761886d0d762724"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ CPLEXW = "cfecb002-79c2-11e9-35be-cb59aa640f85"
|
|||||||
Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b"
|
Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b"
|
||||||
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
|
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
|
||||||
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
|
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
|
||||||
|
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
|
||||||
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
|
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
|
||||||
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
|
||||||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
|
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
|
||||||
|
|||||||
22
src/julia/sysimage.jl
Normal file
22
src/julia/sysimage.jl
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using PackageCompiler
|
||||||
|
|
||||||
|
using CPLEX
|
||||||
|
using CPLEXW
|
||||||
|
using Gurobi
|
||||||
|
using JuMP
|
||||||
|
using MathOptInterface
|
||||||
|
using PyCall
|
||||||
|
using TimerOutputs
|
||||||
|
using TinyBnB
|
||||||
|
|
||||||
|
pkg = [:CPLEX
|
||||||
|
:CPLEXW
|
||||||
|
:Gurobi
|
||||||
|
:JuMP
|
||||||
|
:MathOptInterface
|
||||||
|
:PyCall
|
||||||
|
:TimerOutputs
|
||||||
|
:TinyBnB]
|
||||||
|
|
||||||
|
@info "Building system image..."
|
||||||
|
create_sysimage(pkg, sysimage_path="build/sysimage.so")
|
||||||
Reference in New Issue
Block a user