Skip to content
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

Merged
merged 4 commits into from
May 13, 2024

Conversation

jmao-denver
Copy link
Contributor

@jmao-denver jmao-denver commented May 12, 2024

  1. enable matrix testing: Py versions - 3.8 to 3.12, Java version: 8, 11, 17, 21, 22. Note only on ubuntu.
  2. add a new test case for PR/145 to make up
  3. fix one issue - missing JAVA_HOME env, that fails the finding of the JVM dyn libs.

@jmao-denver jmao-denver self-assigned this May 12, 2024
@jmao-denver jmao-denver marked this pull request as ready for review May 13, 2024 01:44
@jmao-denver jmao-denver changed the title Enable CI and add a test for PR/145 Enable Matrix CI and add a test for PR/145 May 13, 2024
@jmao-denver jmao-denver changed the title Enable Matrix CI and add a test for PR/145 Enable Matrix testing in CI and add a test for PR/145 May 13, 2024
@@ -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'])
Copy link
Member

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/

Comment on lines +215 to +216
import os
sub_env.update(dict(os.environ))
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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 :)

Comment on lines +235 to +238
def test_size_greater_than_maxint(self):
jarr = jpy.array("int", 2**30)
mv = memoryview(jarr)
self.assertEqual(mv.nbytes, 2**32)
Copy link
Member

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?

Copy link
Contributor Author

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.

@jmao-denver jmao-denver merged commit f618e82 into jpy-consortium:master May 13, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants