-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Matrix testing in CI and add a test for PR/145 #149
Enable Matrix testing in CI and add a test for PR/145 #149
Conversation
jmao-denver
commented
May 12, 2024
•
edited
Loading
edited
- enable matrix testing: Py versions - 3.8 to 3.12, Java version: 8, 11, 17, 21, 22. Note only on ubuntu.
- add a new test case for PR/145 to make up
- fix one issue - missing JAVA_HOME env, that fails the finding of the JVM dyn libs.
@@ -4,7 +4,7 @@ | |||
import jpyutil | |||
|
|||
|
|||
jpyutil.init_jvm(jvm_maxmem='32M', jvm_classpath=['target/test-classes']) | |||
jpyutil.init_jvm(jvm_maxmem='8g', jvm_classpath=['target/test-classes']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was concerned about this, as I thought it would be more than GH CI could handle; it looks like this is only possible now b/c of recent changes where GH doubled the RAM of public projects: https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/
import os | ||
sub_env.update(dict(os.environ)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the importance of this? Picking up JAVA_HOME?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
- run: pip install --upgrade setuptools | ||
|
||
- name: Run Test | ||
run: python setup.py test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to get to a place where we actually run the tests against the wheels; in this workflow, each matrix is going to re-build the wheel (or, whatever the local install is). But, this is a good start, and I won't complain :)
def test_size_greater_than_maxint(self): | ||
jarr = jpy.array("int", 2**30) | ||
mv = memoryview(jarr) | ||
self.assertEqual(mv.nbytes, 2**32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't this go in with another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was part of PR/146 but was moved here.