Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
graalvm_version: '26-ea'
graalvm_version: '25'

jobs:
# This is done as one single separate step to work around rate limits for the API
Expand All @@ -28,7 +28,10 @@ jobs:

- name: Set Maven Bundle URL
id: set_url
run: echo "maven_bundle_url=$(./scripts/maven-bundle-url.sh | tail -n 1)" >> $GITHUB_OUTPUT
run: |
tmp_file="$(mktemp)"
./scripts/maven-bundle-url.sh | tee "$tmp_file"
echo "maven_bundle_url=$(tail -n 1 "$tmp_file")" >> $GITHUB_OUTPUT
shell: bash

pre_commit:
Expand Down Expand Up @@ -184,19 +187,23 @@ jobs:
if: runner.os == 'Windows'
run: echo "C:\Program Files\Git\usr\bin" >> $env:GITHUB_PATH

# We scrape the output of integration tests for paths to interesting log files,
# so that we can then upload them in the following actions/upload-artifact
- name: Run integration tests
id: tests_run
run: |
mvn --batch-mode -s settings.xml -Dgradle.java.home=$GRADLE_JAVA_HOME exec:java@integration-tests -Dintegration.tests.args="${{ matrix.test_name }} ${{ matrix.extra_test_args }} $TEST_FLAGS"
shell: bash

# /var/folders/sw/**/T/jbang*native-image
# ^ not using this path on MacOS, because it causes
- name: Upload JBang native-image log
if: failure()
uses: actions/upload-artifact@v4
with:
name: jbang-native-image-log
path: |
/tmp/jbang*native-image
/var/folders/sw/**/T/jbang*native-image

unit-tests:
needs: [build, maven_bundle_url]
Expand Down
16 changes: 5 additions & 11 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
## Building for a Release

* Verify that the following properties in `pom.xml` match the expected versions for the release:
* `revision`: the version for graalpy-extensions artifacts, e.g., `org.graalvm.python.embedding`
* `project.polyglot.version`: version of the polyglot artifacts to use, e.g., the version of `org.graalvm.polyglot:polyglot` dependency
* The polyglot artifacts of given version must be available in Maven central or some additional
Maven repository that can be configured, for example, using Maven's setting.xml mechanism
* Run Maven with `-P release` to sign the artifacts
* Note: the files that are expected to be deployed include usual: `*.jar`, `*.asc`, `*.pom`,
and in case of `org.graalvm.python.embedding` also `*.sigfile`, which is used for API stability checking

## How to develop against the latest GraalPy, GraalVM SDK, and Truffle:

### Option 1: Use pre-built Maven bundle
Expand All @@ -22,6 +11,11 @@ Maven repository. The `settings.xml` file can be then passed to Maven using `-s
mvn -s ./settings.xml ...
```

Alternatively pass the local repo URL as property:
```
mvn -Dlocal.repo.url=file:///path/to/maven-bundle ...
```

### Option 2: Build and install GraalPy/Truffle from sources

Checkout out and build the [GraalPy](https://github.com/oracle/graalpython)
Expand Down
16 changes: 16 additions & 0 deletions graalpy-archetype-polyglot-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ SOFTWARE.
<name>graalpy-archetype-polyglot-app</name>
<artifactId>graalpy-archetype-polyglot-app</artifactId>
<description>Maven archetype providing a skeleton GraalPy - Java polyglot application.</description>
<url>${project.url.root}</url>
<scm>
<connection>${project.scm.connection}</connection>
<developerConnection>${project.scm.devConnection}</developerConnection>
<url>${project.scm.url}</url>
</scm>
<packaging>maven-archetype</packaging>

<build>
Expand Down Expand Up @@ -87,6 +93,16 @@ SOFTWARE.
<escapeString>\</escapeString>
</configuration>
</plugin>
<!-- Effectively disables the maven-source-plugin inherited from parent pom. -->
<!-- The archetype-packaging extensions already contains maven-source-plugin
and the two of them would fight each other -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<attach>false</attach>
</configuration>
</plugin>
</plugins>

<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<properties>
<graalpy.version>${revision}</graalpy.version>
<graalpy.edition>python-community</graalpy.edition>
<native-maven-plugin.version>0.10.4</native-maven-plugin.version>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -28,7 +27,7 @@
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>${symbol_dollar}{graalpy.edition}</artifactId>
<artifactId>python</artifactId>
<version>${symbol_dollar}{graalpy.version}</version>
<type>pom</type>
</dependency>
Expand Down
6 changes: 6 additions & 0 deletions graalpy-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ SOFTWARE.
<name>graalpy-maven-plugin</name>
<artifactId>graalpy-maven-plugin</artifactId>
<description>Handles python related resources in a maven GraalPy - Java polyglot application.</description>
<url>${project.url.root}</url>
<scm>
<connection>${project.scm.connection}</connection>
<developerConnection>${project.scm.devConnection}</developerConnection>
<url>${project.scm.url}</url>
</scm>
<packaging>maven-plugin</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/check_home_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SOFTWARE.
<dependencies>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/check_packages_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SOFTWARE.
<dependencies>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/check_plugin_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SOFTWARE.
<dependencies>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/merged_vfs_ujson_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/namespaced_venv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/namespaced_venv_user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/prepare_venv_old_ujson_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/prepare_venv_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/prepare_venv_termcolor_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SOFTWARE.
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-community</artifactId>
<artifactId>python</artifactId>
<version>${env.GRAALPY_VERSION}</version>
<type>pom</type>
</dependency>
Expand Down
9 changes: 7 additions & 2 deletions integration-tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
parser.add_argument('--jbang-graalpy-version', help='GraalPy version to use for JBang tests, overrides --graalpy-version')
parser.add_argument('--gradle-java-home', default=os.environ['JAVA_HOME'], help='Java to be used to run Gradle (by default $JAVA_HOME)')
parser.add_argument('--help-unittest', action='store_true', help='Print help of the stdlib unittest CLI and exits')
parser.add_argument('--extra-maven-repos', default='', help='Semicolon separated list of additional Maven repositories. '
'If GraalPy Maven archetype is not available in central, '
'then it must be available in the first extra repository.')
args, remaining_args = parser.parse_known_args()

if args.help_unittest:
Expand All @@ -67,14 +70,16 @@
print("WARNING: JAVA_HOME not in environment.\n")
if args.native_image != 'none':
suffix = '.exe' if sys.platform == 'win32' else ''
if not os.path.exists(os.path.join(os.environ['JAVA_HOME'], 'bin', 'native-image' + suffix)):
print("WARNING: JAVA_HOME is not a GraalVM distribution. Tests using Native Image will fail.\n")
ni_file = os.path.join(os.environ['JAVA_HOME'], 'bin', 'native-image' + suffix)
if not os.path.exists(ni_file):
print(f"WARNING: JAVA_HOME is not a GraalVM distribution. Tests using Native Image will fail. File does not exist: {ni_file}\n")

util.graalvmVersion = args.graalpy_version
util.long_running_test_disabled = args.skip_long_running
util.no_clean = args.no_clean
util.native_image_mode = args.native_image
util.jbang_graalpy_version = args.jbang_graalpy_version if args.jbang_graalpy_version else args.graalpy_version
util.gradle_java_home = args.gradle_java_home
util.extra_maven_repos = args.extra_maven_repos.split(';') if args.extra_maven_repos else []

unittest.main(argv=[sys.argv[0]] + remaining_args, module=None, exit=True)
Loading
Loading