diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4e71c3d --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +SHELL:=/usr/bin/env bash -euo pipefail -c +.DEFAULT_GOAL := help + +CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +### help : Prints usage information +.PHONY: help +help: + @echo "Makefile usage:" + @echo "" + @sed -n 's/^###//p' < $(CURRENT_DIR)/Makefile | sort + +### format : Format code +.PHONY: format +format: + @sbt scalafmt + +### test : Test project +.PHONY: test +test: + @sbt test + +### build : Clean, build and test project +.PHONY: build +build: + @sbt rebuild + +### release : Creates a release +.PHONY: release +deploy: build + @sbt +publishSigned + @sbt sonatypeReleaseAll \ No newline at end of file diff --git a/README.md b/README.md index 3330039..d6e3c57 100644 --- a/README.md +++ b/README.md @@ -32,23 +32,23 @@ This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you a ## How to get Optimus -Optimus is published to Maven Central for Scala 2.12 and 2.13. +Optimus is published to Maven Central for Scala 2.12, 2.13 and 3.1.3! Add the following dependencies to your SBT build file in order to get started: ```scala libraryDependencies ++= Seq( - "com.github.vagmcs" %% "optimus" % "3.4.2", - "com.github.vagmcs" %% "optimus-solver-oj" % "3.4.2", - "com.github.vagmcs" %% "optimus-solver-lp" % "3.4.2" + "com.github.vagmcs" %% "optimus" % "3.4.3", + "com.github.vagmcs" %% "optimus-solver-oj" % "3.4.3", + "com.github.vagmcs" %% "optimus-solver-lp" % "3.4.3" ) ``` Optionally, you can also add the following extra dependencies for proprietary solvers: ```scala -"com.github.vagmcs" %% "optimus-solver-gurobi" % "3.4.2" -"com.github.vagmcs" %% "optimus-solver-mosek" % "3.4.2" +"com.github.vagmcs" %% "optimus-solver-gurobi" % "3.4.3" +"com.github.vagmcs" %% "optimus-solver-mosek" % "3.4.3" ``` For more information see [Building and Linking](docs/building_and_linking.md) diff --git a/docs/building_and_linking.md b/docs/building_and_linking.md index efaea71..3efd261 100644 --- a/docs/building_and_linking.md +++ b/docs/building_and_linking.md @@ -1,6 +1,6 @@ # Building and Linking Optimus -Optimus is builds for Scala 2.12 and 2.13. In order to build Optimus modules (`core`, `solver-oj`, `solver-lp`, `solver-gurobi`, `solver-mosek`) from source you need to have Java 8 or higher and [SBT](http://www.scala-sbt.org/) installed in your system. Optimus build optionally depends on [Gurobi](http://www.gurobi.com/) and [Mosek](https://www.mosek.com/) solvers. In case the dependencies for Gurobi or Mosek are not included, Optimus would build a minimal version having only lp solve and oj solver. +Optimus is builds for Scala 2.12, 2.13 and 3. In order to build Optimus modules (`core`, `solver-oj`, `solver-lp`, `solver-gurobi`, `solver-mosek`) from source you need to have Java 8 or higher and [SBT](http://www.scala-sbt.org/) installed in your system. Optimus build optionally depends on [Gurobi](http://www.gurobi.com/) and [Mosek](https://www.mosek.com/) solvers. In case the dependencies for Gurobi or Mosek are not included, Optimus would build a minimal version having only lp solve and oj solver. ## Instructions to build Optimus from source @@ -103,19 +103,19 @@ $ sbt +publishLocal ## Usage of Optimus through Maven Central -Optimus is published into the Maven Central. In order to link Optimus `core` module (e.g., version 3.4.2) to your [SBT](http://www.scala-sbt.org/) project, add the following dependency: +Optimus is published into the Maven Central. In order to link Optimus `core` module (e.g., version 3.4.3) to your [SBT](http://www.scala-sbt.org/) project, add the following dependency: ```scala -libraryDependencies += "com.github.vagmcs" %% "optimus" % "3.4.2" +libraryDependencies += "com.github.vagmcs" %% "optimus" % "3.4.3" ``` Moreover, you can link your project to each solver module that you additionally require by adding some or all of the following dependencies: ```scala -libraryDependencies += "com.github.vagmcs" %% "optimus-solver-oj" % "3.4.2" -libraryDependencies += "com.github.vagmcs" %% "optimus-solver-lp" % "3.4.2" -libraryDependencies += "com.github.vagmcs" %% "optimus-solver-gurobi" % "3.4.2" -libraryDependencies += "com.github.vagmcs" %% "optimus-solver-mosek" % "3.4.2" +libraryDependencies += "com.github.vagmcs" %% "optimus-solver-oj" % "3.4.3" +libraryDependencies += "com.github.vagmcs" %% "optimus-solver-lp" % "3.4.3" +libraryDependencies += "com.github.vagmcs" %% "optimus-solver-gurobi" % "3.4.3" +libraryDependencies += "com.github.vagmcs" %% "optimus-solver-mosek" % "3.4.3" ``` Likewise in an [Apache Maven](https://maven.apache.org/) pom XML file add: @@ -125,22 +125,22 @@ Likewise in an [Apache Maven](https://maven.apache.org/) pom XML file add: com.github.vagmcs optimus_2.12 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-oj_2.12 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-lp_2.12 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-gurobi_2.12 - 3.4.2 + 3.4.3 ``` @@ -152,22 +152,49 @@ or com.github.vagmcs optimus_2.13 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-oj_2.13 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-lp_2.13 - 3.4.2 + 3.4.3 com.github.vagmcs optimus-solver-gurobi_2.13 - 3.4.2 + 3.4.3 + + +``` + +or + +```xml + + + com.github.vagmcs + optimus_3 + 3.4.3 + + + com.github.vagmcs + optimus-solver-oj_3 + 3.4.3 + + + com.github.vagmcs + optimus-solver-lp_3 + 3.4.3 + + + com.github.vagmcs + optimus-solver-gurobi_3 + 3.4.3 ``` \ No newline at end of file