Remove dependency to JVMCI for JDK27+ backwards compatiblity for JDKs 21-26 #65
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reflection API Unit Tests (no-GPU) [JDK 21, 22-27] | |
| # Pure-JVM unit tests for the reflection JVMCI layer (tornado-runtime/src/test). These need no GPU, | |
| # so they run on standard GitHub-hosted runners - the first no-GPU CI stage for TornadoVM. The full | |
| # build is still required first so the modular dependencies (tornado-api, tornado.graal, ...) are on | |
| # the module path for the reflection tests; the tests themselves touch no device. | |
| # | |
| # These are surefire tests, compiled and run by Maven rather than launched from a packaged SDK, so | |
| # unlike build-test.yml this workflow cannot reuse one artifact across JDKs. What it does instead is | |
| # the complementary half of the same claim: build-test.yml proves one ARTIFACT runs on every JDK, | |
| # and this proves the jdk22plus profile BUILDS on every JDK. The matrix axis is therefore the host | |
| # JDK, not the profile -- there is only one profile above 21 now. | |
| # | |
| # Each host still gives the reflection layer a different jdk.internal.vm.ci to sit on: | |
| # JDK 21 native platform module, unmodified (the separate, preview-compiled jdk21 SDK) | |
| # JDK 22-26 native module, patched at run time with the frozen graalJars/jvmci-21.0.2.jar | |
| # JDK 27 JVMCI removed from the platform entirely; supplied as the vendored tornado.jvmci | |
| # application module (bin/build_jvmci_module.py) | |
| # A regression specific to one of those shapes would stay green forever if only one JDK ran. | |
| on: | |
| push: | |
| branches: [master, develop, jdk27-jvmci-removal] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| jobs: | |
| reflection-unit-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # The preview-compiled SDK: JDK 21 only, and it needs no co-installed JDK because the | |
| # platform still ships the jvmci shape it targets. | |
| - profile: jdk21 | |
| setup_java_version: '21' | |
| # One profile, every host JDK from the floor up. Each also installs JDK 21 alongside the | |
| # host: build_jvmci_module.py (invoked by pull_graal_jars) needs a JDK 21 runtime image to | |
| # source the frozen jdk.vm.ci.* SPI from, whatever the build JDK is. Listing 21 first and | |
| # the host last matters -- actions/setup-java points JAVA_HOME at the LAST JDK installed, | |
| # and bin/compile checks JAVA_HOME against the profile's floor. | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 22 | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 23 | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 24 | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 25 | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 26 | |
| - profile: jdk22plus | |
| setup_java_version: | | |
| 21 | |
| 27-ea | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.setup_java_version }} | |
| - name: Report the host JDK under test | |
| run: java -version | |
| - name: Point JVMCI_SOURCE_JDK at the co-installed JDK 21 (jdk22plus only) | |
| if: matrix.profile != 'jdk21' | |
| run: echo "JVMCI_SOURCE_JDK=$JAVA_HOME_21_X64" >> "$GITHUB_ENV" | |
| - name: Install native build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ocl-icd-opencl-dev opencl-headers python3-venv | |
| - name: Build TornadoVM (opencl, ${{ matrix.profile }}) | |
| run: | | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install --upgrade pip tqdm psutil | |
| make ${{ matrix.profile }} BACKEND=opencl | |
| - name: Show the SDK's declared JDK contract | |
| run: cat "$(ls -d dist/*/*/)etc/tornado.jdk" | |
| - name: Run reflection unit tests (${{ matrix.profile }}) | |
| run: make test-reflection JDK=${{ matrix.profile }} |