Skip to content

Commit 67e47e9

Browse files
committed
Add documentation about platform tiers
1 parent bbbc232 commit 67e47e9

File tree

3 files changed

+71
-10
lines changed

3 files changed

+71
-10
lines changed

docs/site/01-docs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ Below are the options you can set on contexts for GraalPy.
2222
{% gfm_docs ../user/Embedding-Permissions.md %}
2323
{% gfm_docs ../user/Tooling.md %}
2424
{% gfm_docs ../user/Troubleshooting.md %}
25+
{% gfm_docs ../user/Test-Tiers.md %}
2526

2627
{% copy_assets ../user/assets %}

docs/user/README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# Getting Started with GraalPy on the JVM
22

33
You can use GraalPy with GraalVM JDK, Oracle JDK, or OpenJDK.
4-
You can easily add GraalPy to your Java application using Maven or Gradle build tools as shown below.
5-
Other build systems (Ant, Make, CMake, and so on) can also be used with a bit more manual work.
4+
To add GraalPy to your Java application, use Maven or Gradle as shown below.
5+
For other build systems (like Ant, Make, CMake, etc.), manual configuration may be required.
6+
7+
### Platform support
8+
9+
GraalPy is mostly written in Java and Python, but the Python package ecosystem is rich in native packages that need platform specific support via native libraries that expose platform-specific APIs.
10+
Our main operating system is Oracle Linux, the CPU architectures we focus on are AMD64 and ARM, and the main JDK we test is Oracle GraalVM.
11+
Windows and macOS with GraalVM JDK are less well tested, and outside of those combinations we target only basic test coverage.
12+
See [below](Test-Tiers.md) for a detailed breakdown.
613

714
## Maven
815

@@ -76,7 +83,7 @@ In order to distribute the resulting application for other systems, follow these
7683
└── resources
7784
```
7885

79-
2. Open your project configuration file, _app/build.gradle_, and modify it as follows.
86+
2. Open your project configuration file, _app/build.gradle_, and modify it as follows.
8087
- Include the GraalPy support and the [GraalVM Polyglot API](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) in the `dependencies` section:
8188
```bash
8289
implementation("org.graalvm.polyglot:polyglot:24.2.0")
@@ -114,29 +121,29 @@ In order to distribute the resulting application for other systems, follow these
114121
id "org.graalvm.python" version "24.2.0"
115122
```
116123
117-
- configure the GraalPy Gradle plugin:
124+
- configure the GraalPy Gradle plugin:
118125
```bash
119-
graalPy {
126+
graalPy {
120127
packages = ["termcolor==2.2"]
121128
}
122129
```
123-
130+
124131
5.2. In _settings.gradle_, add the following `pluginManagement` configuration.
125132
```bash
126133
pluginManagement {
127134
repositories {
128-
gradlePluginPortal()
135+
gradlePluginPortal()
129136
}
130137
}
131138
```
132139
133140
5.3. Update the file named _App.java_ as follows:
134141
```java
135142
package interop;
136-
143+
137144
import org.graalvm.polyglot.*;
138145
import org.graalvm.python.embedding.GraalPyResources;
139-
146+
140147
class App {
141148
...
142149
public static void main(String[] args) {
@@ -150,7 +157,7 @@ In order to distribute the resulting application for other systems, follow these
150157
}
151158
}
152159
```
153-
160+
154161
See also [Embedding Build Tools](Embedding-Build-Tools.md) for more information about the GraalPy Gradle Plugin.
155162
156163
## Ant, CMake, Makefile or Other Build Systems Without Direct Support for Maven Dependencies

docs/user/Test-Tiers.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Detailed Test Tier Breakdown
2+
3+
GraalPy test tiers are similar to [CPython Platform Support Tiers](https://peps.python.org/pep-0011/), but do not constitute or imply any commitment to support.
4+
5+
Generally, running pure Python code on GraalPy without JIT is compatible with any recent JDK.
6+
However, support for native extensions, platform-specific APIs, and just-in-time compilation is more limited.
7+
8+
Platform testing is organized into Tiers, each with specific goals.
9+
Tiers are identified by a "target tuple": `[CPU architecture]-[Operating System]-[libc]-[JDK]-[Java version]`.
10+
JDK names correspond to those used by [SDKMAN!](https://sdkman.io/).
11+
The term "graal" is used to refer to testing on both Oracle GraalVM and GraalVM Community Edition, including GraalVM Native Image.
12+
The following tables list tested platforms by tier.
13+
Platforms not listed are untested.
14+
15+
**Tier 1**
16+
17+
- CI failures block releases.
18+
- Changes which would break the main or release branches are not allowed to be merged; any breakage should be fixed or reverted immediately.
19+
- All core developers are responsible to keep main, and thus these platforms, working.
20+
- Platform-specific Python APIs and Python C extensions are fully tested.
21+
22+
| Platform | Notes |
23+
|----------------------------------|----------------------------|
24+
| amd64-linux-glibc-graal-latest | Oracle Linux 8 or similar. |
25+
| aarch64-linux-glibc-graal-latest | Oracle Linux 8 or similar. |
26+
27+
**Tier 2**
28+
29+
- CI failures block releases.
30+
- Changes which would break the main or release branches are not allowed to be merged; any breakage should be fixed or tests marked as skipped.
31+
- Circa 10% of tests running on Tier 1 platforms may be skipped on Tier 2 platforms.
32+
- Platform-specific Python APIs are fully tested; Python C extensions may have more issues than on Tier 1 platforms.
33+
34+
| Platform | Notes |
35+
|-----------------------------------|-------------------------|
36+
| aarch64-macos-darwin-graal-latest | macOS on M-series CPUs. |
37+
38+
**Tier 3**
39+
40+
- CI failures block releases.
41+
- Changes which would break the main or release branches are not allowed to be merged; any breakage should be fixed or tests marked as skipped.
42+
- Circa 25% of tests running on Tier 1 platforms may be skipped on Tier 3.
43+
- Tests for platform-specific Python APIs and Python C extension are run, but not prioritized.
44+
45+
| Platform | Notes |
46+
|---------------------------------|----------------------------------------------|
47+
| amd64-macos-darwin-graal-latest | macOS on Intel CPUs running BigSur or newer. |
48+
| amd64-windows-msvc-graal-latest | Windows 11, Windows Server 2025, or newer. |
49+
| amd64-linux-glibc-oracle-21 | JDK 21 is tested without JIT compilation. |
50+
| aarch64-linux-glibc-oracle-21 | JDK 21 is tested without JIT compilation. |
51+
| aarch64-macos-darwin-oracle-21 | JDK 21 is tested without JIT compilation. |
52+
| amd64-macos-darwin-oracle-21 | JDK 21 is tested without JIT compilation. |
53+
| amd64-windows-msvc-oracle-21 | JDK 21 is tested without JIT compilation. |

0 commit comments

Comments
 (0)