TilmanNeumann / java-math-library

A Java math library focused on number theory and integer factorization in particular.
GNU General Public License v3.0
30 stars 7 forks source link

Mavenenize project #28

Open axkr opened 3 years ago

axkr commented 3 years ago

Please create a Maven github action to automatically test and build a JAR for every commit:

Define Maven pom.xml

Define Maven folder structure:

Move JUnit dependencies to Maven test scope only

TilmanNeumann commented 3 years ago

Yes, that would be recommendable. But priority is low for me.

TilmanNeumann commented 3 years ago

A side note: For this kind of software, performance bugs are almost as much a bug as compiler errors. And they are harder to detect and need special testing. My performance tests are typically open end (on factor argument size) and terminated by the developer (me) when he has seen enough. This may take a long time, typically hours, sometimes days. So performance tests are not very well-suited to CI tests, I would say. Unless you convince me otherwise ;-)

axkr commented 3 years ago

Don't know your requirements exactly, but there are tools for these cases.

For example:

TilmanNeumann commented 3 years ago

Thanks for pointing out. Don't see though how that approach could handle large test runtimes appropriately.

HannesWell commented 2 years ago

For testing smaller but performance sensitive parts of the code I recommend using the Java Microbenchmarking Harness - JMH:

It is created by the developers of the openJDK them self, so I assume it is very sophisticated and reliable.

It is mainly distributed as Maven project and then quite straight forward to set it up. The following is one guide, but there are plenty others in the internet: https://www.baeldung.com/java-microbenchmark-harness

If you can relay on JMH it could speed up your performance tests significantly. You could even run them in the CI, but then it should be ensured that for each run the same hardware is used to get comparable results.