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

[ci] add jdks to test matrix #1131

Merged
merged 47 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d8b4e69
try to use a strategy in test snippet to include more jdk versions du…
marscher Apr 29, 2023
b7b3b8e
try a mixture of jdk and python versions
marscher Apr 29, 2023
c86d99a
try tool installer
marscher Apr 29, 2023
2b68c2a
try JavaToolInstaller
marscher Apr 29, 2023
62093dc
use JavaToolInstaller in jdk.yml
marscher Apr 29, 2023
0ac018b
steps
marscher Apr 29, 2023
c9025ab
use another variable expansion technique
marscher Apr 29, 2023
8384638
add missing version
marscher Apr 29, 2023
e5480b0
fix type
marscher Apr 29, 2023
b711ae1
generate sane displayName
marscher Apr 29, 2023
1277937
revert
marscher Apr 29, 2023
f692203
missing vars.
marscher Apr 29, 2023
283b39f
added new jni versions ranged from 9 to 21 (from openjdk)
marscher Apr 29, 2023
e0e0ca9
Merge branch 'master' into ci_jdk_matrix
marscher Dec 14, 2023
21166ba
wip
marscher Aug 19, 2024
d075ef7
Merge branch 'master' into ci_jdk_matrix
marscher Aug 19, 2024
3ad084a
remove py 3.7
marscher Aug 19, 2024
3e7a75b
add win-py312-jdk-17 to matrix
marscher Aug 19, 2024
89f905d
use macos-12 image
marscher Aug 19, 2024
986c61c
test old py and j for osx
marscher Aug 19, 2024
e23f1de
try to fix debug job (how to trigger it?)
marscher Aug 19, 2024
6722c6d
test sqlite only for jvm versions > 8
marscher Aug 20, 2024
3a7f44e
shut up mypy
marscher Aug 20, 2024
dc75df2
f
marscher Aug 20, 2024
43d4005
imports
marscher Aug 20, 2024
1e18114
update AUTHORS.rst
marscher Aug 20, 2024
d7352b4
imports
marscher Aug 20, 2024
335809d
imports (locally in WinJVMFinder)
marscher Aug 20, 2024
f9e2b78
[ci] name jobs with python and jdk suffix
marscher Aug 20, 2024
56e17ee
[ci] fail if jdk could not be set
marscher Aug 20, 2024
674312c
minor
marscher Aug 20, 2024
ce75eea
replace impl test for windows jvmfinder
marscher Aug 20, 2024
155abab
modernize jvmfinder a bit
marscher Aug 20, 2024
27557f3
[ci] condition does not work... another shot
marscher Aug 20, 2024
529c5df
try to switch to PublishCodeCoverageResults version 2
marscher Aug 20, 2024
640c65f
proper display name
marscher Aug 20, 2024
5b3d65b
minor
marscher Aug 20, 2024
20f8227
minor2
marscher Aug 20, 2024
146509d
removed obsolete tests (nobody is going to fix or rewrite)
marscher Aug 20, 2024
2bbdd38
added java version fixture
marscher Aug 20, 2024
b3a4802
skip
marscher Aug 21, 2024
d171b50
refactor
marscher Aug 22, 2024
5f474f0
fix version check
marscher Aug 22, 2024
29838e8
cleanup
marscher Aug 22, 2024
0e18bce
minor
marscher Aug 22, 2024
80769f6
minor2
marscher Aug 22, 2024
69bbe2e
fix mypy
marscher Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .azure/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,49 @@ jobs:
dependsOn: Deps
strategy:
matrix:
linux-3.7:
imageName: "ubuntu-latest"
python.version: '3.7'
linux-3.8:
imageName: "ubuntu-latest"
python.version: '3.8'
jdk.version: '8'
linux-3.9:
imageName: "ubuntu-latest"
python.version: '3.9'
jdk.version: '11'
linux-3.10:
imageName: "ubuntu-latest"
python.version: '3.10'
jdk.version: '17'
linux-3.11:
imageName: "ubuntu-latest"
python.version: '3.11'
jdk.version: '17'
linux-3.12:
imageName: "ubuntu-latest"
python.version: '3.12'
windows-3.8:
imageName: "windows-2019"
python.version: '3.8'
jdk.version: '8'

windows-3.9:
imageName: "windows-2019"
python.version: '3.9'
#jpypetest.fast: 'true'
jdk.version: '11'
windows-3.10:
imageName: "windows-2019"
python.version: '3.10'
windows-3.11:
imageName: "windows-2019"
python.version: '3.11'
windows-3.12:
imageName: "windows-2019"
python.version: '3.12'
jdk.version: '17'
mac-3.9:
imageName: "macos-11"
python.version: '3.9'
jpypetest.fast: 'true'
jdk.version: '17'

pool:
vmImage: $(imageName)
Expand Down
15 changes: 6 additions & 9 deletions .azure/scripts/jdk.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
parameters:
- name: version
type: string
default: 8
default: '8'

steps:
- script: |
set v="##vso[task.setvariable variable=JAVA_HOME]%JAVA_HOME_${{parameters.version}}_X64%"
echo %v:"=%
condition: eq(variables['Agent.OS'], 'Windows_NT')

- script: |
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_${{parameters.version}}_X64)"
condition: ne(variables['Agent.OS'], 'Windows_NT')
- task: JavaToolInstaller@0
inputs:
versionSpec: ${{ parameters.version }}
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
9 changes: 4 additions & 5 deletions .azure/scripts/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:

- template: jdk.yml
parameters:
version: 11
version: '$(jdk.version)'

- script: |
python -m pip install --upgrade pytest setuptools
Expand All @@ -25,12 +25,12 @@ steps:

- script: |
python -m pytest -v --junit-xml=build/test/test.xml test/jpypetest --checkjni
displayName: 'Test JDK 11'
displayName: 'Test JDK $(jdk.version)'
condition: eq(variables['jpypetest.fast'], 'false')

- script: |
python -m pytest -v --junit-xml=build/test/test.xml test/jpypetest --checkjni --fast
displayName: 'Test JDK 11 (fast)'
displayName: 'Test JDK $(jdk.version) (fast)'
condition: eq(variables['jpypetest.fast'], 'true')

# presence of jpype/ seems to confuse entry_points so `cd` elsewhere
Expand All @@ -45,5 +45,4 @@ steps:
condition: succeededOrFailed()
inputs:
testResultsFiles: 'build/test/test.xml'
testRunTitle: 'Publish test results for Python $(python.version) with JDK 11'

testRunTitle: 'Publish test results for Python $(python.version) with JDK $(jdk.version)'
5 changes: 3 additions & 2 deletions jpype/_jvmfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
To avoid this exception specify the JAVA_HOME environment variable as a
valid jre or jdk root directory.
"""
pass


class JVMNotSupportedException(ValueError):
Expand All @@ -49,7 +48,6 @@
32 vs 64 bit, or the JVM is older than the version used to compile
JPype.
"""
pass


def getDefaultJVMPath():
Expand All @@ -74,6 +72,9 @@
return finder.get_jvm_path()


get_default_jvm_path = getDefaultJVMPath
Fixed Show fixed Hide fixed


class JVMFinder(object):
"""
JVM library finder base class
Expand Down
5 changes: 5 additions & 0 deletions native/jni_include/jni.h
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,11 @@ JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* reserved);
#define JNI_VERSION_1_6 0x00010006
#define JNI_VERSION_1_7 0x00010007
#define JNI_VERSION_1_8 0x00010008
#define JNI_VERSION_9 0x00090000
#define JNI_VERSION_10 0x000a0000
#define JNI_VERSION_19 0x00130000
#define JNI_VERSION_20 0x00140000
#define JNI_VERSION_21 0x00150000

#define JNI_OK (0) /* no error */
#define JNI_ERR (-1) /* generic error */
Expand Down
Loading