GitHub Actions: Add Julia tests

pull/3/head
Alinson S. Xavier 5 years ago
parent 537e7f5764
commit 683b3c5893

@ -9,9 +9,10 @@ jobs:
run: |
rm -rf ~/.conda/envs/miplearn-test
yes | conda create --name miplearn-test python=3.6
JULIA_DEPOT_PATH=/home/axavier/.julia:/opt/julia-1.3.0/depot julia --project=src/julia -e 'using Pkg; Pkg.instantiate()'
(cd /opt/gurobi900/linux64 && ~/.conda/envs/miplearn-test/bin/python setup.py install)
(cd /opt/cplex-12.8/cplex/python/3.6/x86-64_linux && ~/.conda/envs/miplearn-test/bin/python setup.py install)
~/.conda/envs/miplearn-test/bin/pip install -r src/python/requirements.txt
make install-python install-julia PYTHON=~/.conda/envs/miplearn-test/bin/python
~/.conda/envs/miplearn-test/bin/pytest src/python
make test-julia

@ -1,15 +1,17 @@
PYTHON := python3
PYTEST := pytest
PIP := pip3
PYTEST_ARGS := -W ignore::DeprecationWarning -vv -x --log-level=DEBUG
JULIA := julia --color=yes --project=src/julia
JULIA_SYSIMAGE := $(JULIA) --sysimage build/sysimage.so
PIP := pip3
JULIA := julia
PYTEST_ARGS := -W ignore::DeprecationWarning -vv -x --log-level=DEBUG
JULIA_ARGS := --color=yes --project=src/julia
JULIA_SYSIMAGE_ARGS := $(JULIA_ARGS) --sysimage build/sysimage.so
all: docs test
build/sysimage.so: src/julia/Manifest.toml src/julia/Project.toml
mkdir -p build
$(JULIA) src/julia/sysimage.jl
$(JULIA) $(JULIA_ARGS) src/julia/sysimage.jl
develop:
cd src/python && $(PYTHON) setup.py develop
@ -23,7 +25,7 @@ install-python:
cd src/python && $(PYTHON) setup.py install
install-julia:
$(JULIA) -e "using Pkg; Pkg.instantiate()"
$(JULIA) $(JULIA_ARGS) src/julia/setup.jl `which $(PYTHON)`
uninstall:
$(PIP) uninstall miplearn
@ -37,6 +39,6 @@ test-python-watch:
cd src/python && pytest-watch -- $(PYTEST_ARGS)
test-julia: build/sysimage.so
$(JULIA_SYSIMAGE) src/julia/test/runtests.jl
$(JULIA) $(JULIA_SYSIMAGE_ARGS) src/julia/test/runtests.jl
.PHONY: test test-python test-julia test-watch docs install

@ -0,0 +1,7 @@
ENV["PYTHON"] = ARGS[1]
using Pkg
Pkg.instantiate()
Pkg.build("CPLEX")
Pkg.build("Gurobi")
Pkg.build("PyCall")

@ -1,10 +1,13 @@
docopt
matplotlib
mkdocs
mkdocs-cinder
networkx
numpy
p_tqdm
pandas
pyomo
pytest
python-markdown-math
seaborn
sklearn

@ -10,15 +10,11 @@ setup(
install_requires=[
'docopt',
'matplotlib',
'mkdocs',
'mkdocs-cinder',
'networkx',
'numpy',
'pandas',
'p_tqdm',
'pyomo',
'pytest',
'pytest-watch',
'python-markdown-math',
'seaborn',
'sklearn',

Loading…
Cancel
Save