Skip to content

Commit

Permalink
add workaround for tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Mar 6, 2024
1 parent 586bc03 commit 09bdd87
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-against-released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
distribution: 'zulu'

- name: Build Tracer
shell: bash
run: |
./scripts/install-tracer-library.sh
cd ./scripts && ./install-tracer-library.sh && cd ..
- name: Set up JDK 11 for Build
uses: actions/setup-java@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-against-snapshot-1440.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
distribution: 'zulu'

- name: Build Tracer
shell: bash
run: |
./scripts/install-tracer-library.sh
cd ./scripts && ./install-tracer-library.sh && cd ..
- name: Print Versions
run: mvn -version && ant -version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-against-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
distribution: 'zulu'

- name: Build Tracer
shell: bash
run: |
./scripts/install-tracer-library.sh
cd ./scripts && ./install-tracer-library.sh && cd ..
- name: Set up JDK 17 for Build
uses: actions/setup-java@v3
Expand Down
56 changes: 31 additions & 25 deletions scripts/install-tracer-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,40 @@
#
# Purpose: Build and install the org-graalvm-visualvm-modules-tracer plugin as it is not available in Maven.
set -e
echo "Installing required tracer VisualVM dependencies"
TEMP_DIR=`mktemp -d`
echo "Temp dir = ${TEMP_DIR}"

trap "rm -rf $TEMP_DIR 2>&1 > /dev/null" 0 1 2 3
# temp workaround
DIR=`pwd`

cd $TEMP_DIR
echo "Cloning VisualVM..."
git clone https://github.com/oracle/visualvm.git
cd visualvm
git checkout 2.1.7

curl -Lo /tmp/nb140_platform_20230511.zip https://github.com/oracle/visualvm/releases/download/2.1.7/nb140_platform_20230511.zip
cd visualvm
unzip /tmp/nb140_platform_20230511.zip

echo "Building VisualVM..."
ant build-zip

cd ../plugins
ant build

MODULE_NAME=org-graalvm-visualvm-modules-tracer

TRACER=`find . -name ${MODULE_NAME}.jar | sed 1q`
FULL_PATH=`pwd`/${TRACER}
#echo "Installing required tracer VisualVM dependencies"
#TEMP_DIR=`mktemp -d`
#echo "Temp dir = ${TEMP_DIR}"
#
#trap "rm -rf $TEMP_DIR 2>&1 > /dev/null" 0 1 2 3
#
#cd $TEMP_DIR
#echo "Cloning VisualVM..."
#git clone https://github.com/oracle/visualvm.git
#cd visualvm
#git checkout 2.1.7
#
#curl -Lo /tmp/nb140_platform_20230511.zip https://github.com/oracle/visualvm/releases/download/2.1.7/nb140_platform_20230511.zip
#cd visualvm
#unzip /tmp/nb140_platform_20230511.zip
#
#echo "Building VisualVM..."
#ant build-zip
#
#cd ../plugins
#ant build
#
#MODULE_NAME=org-graalvm-visualvm-modules-tracer
#
#TRACER=`find . -name ${MODULE_NAME}.jar | sed 1q`
#FULL_PATH=`pwd`/${TRACER}
#
#echo "Installing ${FULL_PATH}"

echo "Installing ${FULL_PATH}"
FULL_PATH=$DIR/org-graalvm-visualvm-modules-tracer-2.1.jar

set -x
mvn install:install-file -Dfile=${FULL_PATH} -DgroupId=org.graalvm.visualvm.modules -DartifactId=org-graalvm-visualvm-modules-tracer -Dversion=2.1 -Dpackaging=jar
Expand Down
Binary file not shown.

0 comments on commit 09bdd87

Please sign in to comment.