-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[GR-52456] Add nightly workflow for Spring. #8510
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a69f489
Use symlink to set up `$GRAALVM_HOME`.
fniephaus c425360
Add ability to start Quarkus gate on demand.
fniephaus 19b3c6b
Share steps to build GraalVM JDK.
fniephaus f758a7b
Add nightly workflow for Spring.
fniephaus 5b893ab
"Checkout oracle/graal" cannot be shared.
fniephaus 879fa33
Add required shell property.
fniephaus ec4b2c2
Only Micronaut can use `NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL` …
fniephaus ef304b8
Fix java version in micronaut gate.
fniephaus a2f8f22
Ensure `$GRAALVM_HOME` is set correctly in Quarkus gate.
fniephaus 0c8384d
Dereference symbolic links when persisting GraalVM.
fniephaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build GraalVM JDK | ||
description: 'Build GraalVM JDK and set up environment for testing' | ||
|
||
inputs: | ||
java-version: | ||
description: 'Java version to use' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up environment variables | ||
shell: bash | ||
run: | | ||
echo "GRAALVM_HOME=${{ github.workspace }}/graalvm" >> ${GITHUB_ENV} | ||
echo "LABSJDK_HOME=${{ github.workspace }}/labsjdk" >> ${GITHUB_ENV} | ||
echo "MX_GIT_CACHE=refcache" >> ${GITHUB_ENV} | ||
echo "MX_PATH=${{ github.workspace }}/mx" >> ${GITHUB_ENV} | ||
echo "MX_PYTHON=python3.8" >> ${GITHUB_ENV} | ||
echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV} | ||
# Workaround testsuite locale issue | ||
echo "LANG=en_US.UTF-8" >> ${GITHUB_ENV} | ||
- name: Checkout graalvm/mx | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: graalvm/mx | ||
fetch-depth: 1 | ||
ref: ${{ env.MX_VERSION }} | ||
path: ${{ env.MX_PATH }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
- name: Update mx cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.mx | ||
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} | ||
restore-keys: ${{ runner.os }}-mx- | ||
- name: Fetch LabsJDK | ||
shell: bash | ||
run: | | ||
mkdir jdk-dl | ||
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME} | ||
- name: Build GraalVM JDK | ||
shell: bash | ||
run: | | ||
cd substratevm | ||
${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native=native-image --components="Native Image" build | ||
ln -s $(${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME} | ||
${GRAALVM_HOME}/bin/native-image --version | ||
- name: Set up JAVA_HOME | ||
if: ${{ inputs.java-version }} != '' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'oracle' | ||
java-version: '${{ inputs.java-version }}' | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# | ||
# Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# The Universal Permissive License (UPL), Version 1.0 | ||
# | ||
# Subject to the condition set forth below, permission is hereby granted to any | ||
# person obtaining a copy of this software, associated documentation and/or | ||
# data (collectively the "Software"), free of charge and under any and all | ||
# copyright rights in the Software, and any and all patent rights owned or | ||
# freely licensable by each licensor hereunder covering either (i) the | ||
# unmodified Software as contributed to or provided by such licensor, or (ii) | ||
# the Larger Works (as defined below), to deal in both | ||
# | ||
# (a) the Software, and | ||
# | ||
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if | ||
# one is included with the Software each a "Larger Work" to which the Software | ||
# is contributed by such licensors), | ||
# | ||
# without restriction, including without limitation the rights to copy, create | ||
# derivative works of, display, perform, and distribute the Software and make, | ||
# use, sell, offer for sale, import, export, have made, and have sold the | ||
# Software and the Larger Work(s), and to sublicense the foregoing rights on | ||
# either these or other terms. | ||
# | ||
# This license is subject to the following condition: | ||
# | ||
# The above copyright notice and either this complete permission notice or at a | ||
# minimum a reference to the UPL must be included in all copies or substantial | ||
# portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
name: Nightly Spring Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/spring.yml' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/spring.yml' | ||
schedule: | ||
- cron: '0 4 * * *' | ||
workflow_dispatch: | ||
|
||
env: | ||
SPRING_PETCLINIC_PATH: ${{ github.workspace }}/spring-petclinic | ||
SPRING_JAVA_VERSION: 21 | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
build-graalvm-and-spring: | ||
name: Native Tests | ||
runs-on: ubuntu-20.04 | ||
if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') | ||
steps: | ||
- name: Checkout oracle/graal | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Build GraalVM JDK | ||
uses: ./.github/actions/build-graalvm | ||
with: | ||
java-version: ${{ env.SPRING_JAVA_VERSION }} | ||
- name: Checkout spring-projects/spring-petclinic | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: spring-projects/spring-petclinic | ||
fetch-depth: 1 | ||
path: ${{ env.SPRING_PETCLINIC_PATH }} | ||
- name: Run nativeTest in spring-petclinic | ||
run: | | ||
cd ${{ env.SPRING_PETCLINIC_PATH }} | ||
./gradlew nativeTest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI @sdeleuze |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shared action no longer builds libgraal. It's actually not used when running a Native Image build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's interesting. When did that change? Last time I checked libgraal was being used by GraalVM CE see graalvm#288 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing changed, what I meant is that the compilation stage in Native Image uses jargraal anyway (it adds additional AOT-specific phases etc that would otherwise require recompilation of libgraal). Yes, libgraal would probably improve performance a bit when compiling jargraal, but building it probably takes more time in CI than it saves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so if I get this right:
It's still being used (if present) by the native-image generator (the java process which runs on GraalVM) but it's just used to run that process and is not being used to AOT compile the native image.
Since GraalVM with libgraal is being tested extensively in other places there is no reason for testing it in this context as well.