-
Notifications
You must be signed in to change notification settings - Fork 5
Debug/graalvm24 agent path #397
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9dfb632
Revert "Change test to community graalvm"
rotilho bac967a
Add GraalVM agent path debug workflow
rotilho bdb2c11
Run agent path debug workflow on branch pushes
rotilho 638b861
Default debug workflow test selector on push
rotilho 5ade746
Debug
rotilho 046557f
Debug
rotilho c0691b2
Debug
rotilho 78ddf55
Debug
rotilho d21dbe1
Debug
rotilho 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,388 @@ | ||
| name: Debug GraalVM Agent Path | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - debug/graalvm24-agent-path | ||
| workflow_dispatch: | ||
| inputs: | ||
| test_selector: | ||
| description: "JUnit test selector for the Gradle smoke test" | ||
| required: false | ||
| default: "cash.atto.node.network.NetworkSerializerTest" | ||
| type: string | ||
| run_full_tests: | ||
| description: "Run the full test suite after the smoke checks" | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| cucumber_filter_name: | ||
| description: "Cucumber scenario name used by the focused initialization comparison" | ||
| required: false | ||
| default: "Missing transaction should be requested when missing" | ||
| type: string | ||
|
|
||
| jobs: | ||
| debug-agent-path: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: gradle/actions/wrapper-validation@v6 | ||
|
|
||
|
|
||
| - name: Setup GraalVM 21 | ||
| uses: graalvm/setup-graalvm@v1 | ||
|
|
||
| with: | ||
| distribution: "graalvm" | ||
| java-version: "21" | ||
| native-image-musl: true | ||
|
|
||
| - name: Inspect and preserve GraalVM 21 agent | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| echo "GraalVM 21 JAVA_HOME=$JAVA_HOME" | ||
| java -version | ||
| native-image --version | ||
|
|
||
| agent21="$JAVA_HOME/lib/libnative-image-agent.so" | ||
| test -f "$agent21" | ||
|
|
||
| ls -l "$agent21" | ||
| file "$agent21" | ||
| ldd "$agent21" || true | ||
| sha256sum "$agent21" | ||
|
|
||
| mkdir -p "$RUNNER_TEMP/graalvm21-agent" | ||
| cp "$agent21" "$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" | ||
| sha256sum "$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" | ||
|
|
||
| - name: Setup GraalVM 24 | ||
| uses: graalvm/setup-graalvm@v1 | ||
|
|
||
| with: | ||
| distribution: "graalvm" | ||
| java-version: "24" | ||
| native-image-musl: true | ||
|
|
||
| - name: Inspect and preserve GraalVM 24 agent | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| echo "GraalVM 24 JAVA_HOME=$JAVA_HOME" | ||
| java -version | ||
| native-image --version | ||
|
|
||
| agent24="$JAVA_HOME/lib/libnative-image-agent.so" | ||
| test -f "$agent24" | ||
|
|
||
| ls -l "$agent24" | ||
| file "$agent24" | ||
| ldd "$agent24" || true | ||
| sha256sum "$agent24" | ||
|
|
||
| mkdir -p "$RUNNER_TEMP/graalvm24-agent" | ||
| cp "$agent24" "$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" | ||
| sha256sum "$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" | ||
|
|
||
| - name: Setup GraalVM 25 | ||
| uses: graalvm/setup-graalvm@v1 | ||
|
|
||
| with: | ||
| distribution: "graalvm" | ||
| java-version: "25" | ||
| native-image-musl: true | ||
| cache: "gradle" | ||
|
|
||
| - uses: gradle/actions/setup-gradle@v6 | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
|
|
||
| - name: Compare copied GraalVM agents | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| echo "GraalVM 25 JAVA_HOME=$JAVA_HOME" | ||
| java -version | ||
| native-image --version | ||
|
|
||
| copied_agent21="$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" | ||
| copied_agent="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" | ||
| agent25="$JAVA_HOME/lib/libnative-image-agent.so" | ||
|
|
||
| test -f "$copied_agent21" | ||
| test -f "$copied_agent" | ||
| test -f "$agent25" | ||
|
|
||
| echo "Copied GraalVM 21 agent:" | ||
| ls -l "$copied_agent21" | ||
| file "$copied_agent21" | ||
| ldd "$copied_agent21" || true | ||
| sha256sum "$copied_agent21" | ||
|
|
||
| echo "Copied GraalVM 24 agent:" | ||
| ls -l "$copied_agent" | ||
| file "$copied_agent" | ||
| ldd "$copied_agent" || true | ||
| sha256sum "$copied_agent" | ||
|
|
||
| echo "GraalVM 25 agent:" | ||
| ls -l "$agent25" | ||
| file "$agent25" | ||
| ldd "$agent25" || true | ||
| sha256sum "$agent25" | ||
|
|
||
| if cmp -s "$copied_agent21" "$agent25"; then | ||
| echo "::warning::Copied GraalVM 21 agent is byte-identical to the GraalVM 25 agent." | ||
| else | ||
| echo "Copied GraalVM 21 agent differs from the GraalVM 25 agent." | ||
| fi | ||
|
|
||
| if cmp -s "$copied_agent" "$agent25"; then | ||
| echo "::warning::Copied GraalVM 24 agent is byte-identical to the GraalVM 25 agent." | ||
| else | ||
| echo "Copied GraalVM 24 agent differs from the GraalVM 25 agent." | ||
| fi | ||
|
|
||
| - name: Smoke-load copied GraalVM 21 agent with Java 25 | ||
| continue-on-error: true | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| copied_agent="$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" | ||
| smoke_output="$RUNNER_TEMP/agent-smoke-21" | ||
| mkdir -p "$smoke_output" | ||
|
|
||
| java \ | ||
| -Xlog:library=debug \ | ||
| -agentpath:"$copied_agent=config-output-dir=$smoke_output,track-reflection-metadata=true" \ | ||
| -Dorg.graalvm.nativeimage.imagecode=agent \ | ||
| -version | ||
|
|
||
| find "$smoke_output" -maxdepth 2 -type f -print -exec ls -l {} \; | ||
|
|
||
| - name: Smoke-load copied GraalVM 24 agent with Java 25 | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| copied_agent="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" | ||
| smoke_output="$RUNNER_TEMP/agent-smoke-24" | ||
| mkdir -p "$smoke_output" | ||
|
|
||
| java \ | ||
| -Xlog:library=debug \ | ||
| -agentpath:"$copied_agent=config-output-dir=$smoke_output,track-reflection-metadata=true" \ | ||
| -Dorg.graalvm.nativeimage.imagecode=agent \ | ||
| -version | ||
|
|
||
| find "$smoke_output" -maxdepth 2 -type f -print -exec ls -l {} \; | ||
|
|
||
| - name: Gradle smoke test without native-image agent | ||
| continue-on-error: true | ||
| env: | ||
| TEST_SELECTOR: ${{ github.event.inputs.test_selector || 'cash.atto.node.network.NetworkSerializerTest' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests "$TEST_SELECTOR" \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Gradle smoke test with copied GraalVM 21 agent | ||
| continue-on-error: true | ||
| env: | ||
| TEST_SELECTOR: ${{ github.event.inputs.test_selector || 'cash.atto.node.network.NetworkSerializerTest' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests "$TEST_SELECTOR" \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Gradle smoke test with copied GraalVM 24 agent | ||
| continue-on-error: true | ||
| env: | ||
| TEST_SELECTOR: ${{ github.event.inputs.test_selector || 'cash.atto.node.network.NetworkSerializerTest' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests "$TEST_SELECTOR" \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Gradle smoke test with copied GraalVM 24 agent and test AOT disabled | ||
| continue-on-error: true | ||
| env: | ||
| TEST_SELECTOR: ${{ github.event.inputs.test_selector || 'cash.atto.node.network.NetworkSerializerTest' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" \ | ||
| -PskipTestAotForNativeAgent=true \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests "$TEST_SELECTOR" \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Gradle smoke test with default GraalVM 25 agent | ||
| continue-on-error: true | ||
| env: | ||
| TEST_SELECTOR: ${{ github.event.inputs.test_selector || 'cash.atto.node.network.NetworkSerializerTest' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -Pagent \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests "$TEST_SELECTOR" \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Focused Cucumber initialization without native-image agent | ||
| continue-on-error: true | ||
| env: | ||
| CUCUMBER_FILTER_NAME: ${{ github.event.inputs.cucumber_filter_name || 'Missing transaction should be requested when missing' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests cash.atto.node.CucumberTest \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast \ | ||
| -Dcucumber.filter.name="$CUCUMBER_FILTER_NAME" | ||
|
|
||
| - name: Focused Cucumber initialization with copied GraalVM 21 agent | ||
| continue-on-error: true | ||
| env: | ||
| CUCUMBER_FILTER_NAME: ${{ github.event.inputs.cucumber_filter_name || 'Missing transaction should be requested when missing' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests cash.atto.node.CucumberTest \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast \ | ||
| -Dcucumber.filter.name="$CUCUMBER_FILTER_NAME" | ||
|
|
||
| - name: Focused Cucumber initialization with copied GraalVM 24 agent | ||
| continue-on-error: true | ||
| env: | ||
| CUCUMBER_FILTER_NAME: ${{ github.event.inputs.cucumber_filter_name || 'Missing transaction should be requested when missing' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests cash.atto.node.CucumberTest \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast \ | ||
| -Dcucumber.filter.name="$CUCUMBER_FILTER_NAME" | ||
|
|
||
| - name: Focused Cucumber initialization with default GraalVM 25 agent | ||
| continue-on-error: true | ||
| env: | ||
| CUCUMBER_FILTER_NAME: ${{ github.event.inputs.cucumber_filter_name || 'Missing transaction should be requested when missing' }} | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -Pagent \ | ||
| cleanTest \ | ||
| test \ | ||
| --tests cash.atto.node.CucumberTest \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast \ | ||
| -Dcucumber.filter.name="$CUCUMBER_FILTER_NAME" | ||
|
|
||
| - name: Full Gradle test suite without native-image agent | ||
| if: ${{ github.event_name == 'push' || github.event.inputs.run_full_tests == 'true' }} | ||
| continue-on-error: true | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| cleanTest \ | ||
| test \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Full Gradle test suite with copied GraalVM 21 agent | ||
| if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_tests == 'true' }} | ||
| continue-on-error: true | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm21-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Full Gradle test suite with copied GraalVM 24 agent | ||
| if: ${{ github.event_name == 'push' || github.event.inputs.run_full_tests == 'true' }} | ||
| continue-on-error: true | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" \ | ||
| cleanTest \ | ||
| test \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - name: Full Gradle test suite with copied GraalVM 24 agent and test AOT disabled | ||
| if: ${{ github.event_name == 'push' || github.event.inputs.run_full_tests == 'true' }} | ||
| continue-on-error: true | ||
| run: | | ||
| set -euxo pipefail | ||
|
|
||
| ./gradlew \ | ||
| -PnativeAgentPath="$RUNNER_TEMP/graalvm24-agent/libnative-image-agent.so" \ | ||
| -PskipTestAotForNativeAgent=true \ | ||
| cleanTest \ | ||
| test \ | ||
| --no-daemon \ | ||
| --info \ | ||
| --fail-fast | ||
|
|
||
| - uses: actions/upload-artifact@v7 | ||
| if: always() | ||
| with: | ||
| name: debug-graalvm-agent-output | ||
| path: | | ||
| build/native/agent-output/test | ||
| ${{ runner.temp }}/agent-smoke-21 | ||
| ${{ runner.temp }}/agent-smoke-24 | ||
| ${{ runner.temp }}/graalvm21-agent/libnative-image-agent.so | ||
| ${{ runner.temp }}/graalvm24-agent/libnative-image-agent.so | ||
|
Comment on lines
+27
to
+388
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.