-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Now building also jcstress-tests-all-20240222.jar 20220908.jar #1020
Changes from all commits
7033de7
b0d5086
50e9428
9dd1e00
aad5aa6
22694ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#!/bin/bash | ||
|
||
################################################################### | ||
# Script to build jcstress to be reused by jdk testing community # | ||
# currently builds tip and latest released version # | ||
################################################################### | ||
##################################################################### | ||
# Script to build jcstress to be reused by jdk testing community # | ||
# currently builds tip and latest released version # | ||
# It also build two snapshots, which are reused by adoptium testing # | ||
##################################################################### | ||
|
||
# shellcheck disable=SC2035,SC2155 | ||
set -euo pipefail | ||
|
@@ -19,11 +20,34 @@ function hashArtifacts() { | |
function detectJdks() { | ||
jvm_dir="/usr/lib/jvm/" | ||
find ${jvm_dir} -maxdepth 1 | sort | ||
echo "Available jdks 8 in ${jvm_dir}:" | ||
echo " Note, that you need at at least jdk 11 to build 20240222, tip and 0.16. Listing all jdks anyway." | ||
find ${jvm_dir} -maxdepth 1 | sort | grep -e java-1.8.0- -e jdk-1.8.0 -e java-8- -e jdk-8 | ||
echo "Available jdks 11 in ${jvm_dir}:" | ||
find ${jvm_dir} -maxdepth 1 | sort | grep -e java-11- -e jdk-11 | ||
echo "Available jdks 17 in ${jvm_dir}:" | ||
find ${jvm_dir} -maxdepth 1 | sort | grep -e java-17- -e jdk-17 | ||
jdk8=$(readlink -f $(find ${jvm_dir} -maxdepth 1 | sort | grep -e java-1.8.0- -e jdk-1.8.0 -e java-8- -e jdk-8 | head -n 1)) | ||
jdk11=$(readlink -f $(find ${jvm_dir} -maxdepth 1 | sort | grep -e java-11- -e jdk-11 | head -n 1)) | ||
jdk17=$(readlink -f $(find ${jvm_dir} -maxdepth 1 | sort | grep -e java-17- -e jdk-17 | head -n 1)) | ||
} | ||
|
||
function buildJcstress { | ||
local jdk="${1}" | ||
local checkout="${2}" | ||
local target="${3}" | ||
export JAVA_HOME="${jdk}" | ||
mvn clean | ||
git checkout "${checkout}" | ||
mvn clean install $TESTS | ||
mv -v "tests-all/target/${main_name}.jar" "${target}" | ||
mvn clean | ||
git checkout master | ||
unset JAVA_HOME | ||
} | ||
|
||
TESTS= | ||
#TESTS=-DskipTests # comment me out! | ||
REPO_DIR="jcstress" | ||
main_name=$REPO_DIR | ||
main_file=$main_name.jar | ||
|
@@ -36,29 +60,22 @@ detectJdks | |
pushd $REPO_DIR | ||
git checkout master | ||
tip=`git log | head -n 1 | sed "s/.*\s\+//"` || true | ||
tip_shortened=`echo ${tip:0:10}` | ||
tip_shortened=`echo ${tip:0:7}` | ||
latestRelease=`git tag -l | sort -Vr | head -n 1` | ||
rc=$main_name-$latestRelease.jar | ||
|
||
# latest released | ||
git checkout $latestRelease | ||
export JAVA_HOME=$jdk11 | ||
mvn clean install | ||
mv tests-all/target/$main_name.jar $rc | ||
buildJcstress "${jdk11}" "${latestRelease}" "${rc}" | ||
echo "Manually renaming $rc as $main_file to provide latest-stable-recommended file" | ||
ln -fv $rc $main_file | ||
mvn clean | ||
|
||
# tip | ||
git checkout master | ||
export JAVA_HOME=$jdk11 | ||
mvn clean install | ||
mv tests-all/target/$main_file $main_name-$tip_shortened.jar | ||
buildJcstress "${jdk11}" "master" "${main_name}-${tip_shortened}.jar" | ||
echo "Manually renaming $main_name-$tip_shortened.jar as $main_name-tip.jar to provide latest-unstable-recommended file" | ||
ln -fv $main_name-$tip_shortened.jar $main_name-tip.jar | ||
mvn clean | ||
|
||
echo "Resetting repo back to master" | ||
git checkout master | ||
# 20240222 | ||
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. What is the significance of that date? Is that a tag for a major version? 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. As I see it, there is no significance. Unluckily there is also no tag. Double unluckily jcstress tags extremely rarely:( As described here: adoptium/aqa-tests#5261 ; the jcstres in aqavit have heavily unclear binaries to execute:
and
Those are not base don any tag, nor hash. They will be reused in the cstress runner, so the https://github.com/adoptium/TKG/blob/master/scripts/getDependencies.pl#L182 and https://github.com/adoptium/aqa-tests/blob/master/system/jcstress/playlist.xml are in harmony. I think first step will be to let the getDependencies.pl to download 20220908, and use that in playlist.xml. Then to bump them both to 20240222 (as this is quite fresh). There may come som if jdk 8/11/...22 swithc as is done with jtrregs. This is stil to be decided. For now, I wanted to prepare binareis to use. Thanx for bringing it up. If you have any top level hints, dont hesitate to write them to #1016 and adoptium/aqa-tests#5261. 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. @smlambert - I think I need your guidance here :-). Which version(s) of jcstress does the testing group need? I read the other issues but I'm still unsure... 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. as any builder, we need tip and latest release for sure. I heavily recommend to not get stick to latest release, as they are not fluently released, and to verify jcstress failure you have to try something newer, always, even tip from time to time. So A middle path is to pick up something known to be stable on the fly, and starting using that. 20240202 is pretty fresh, and known to be stable, so very good candidate. |
||
buildJcstress "${jdk11}" "c565311051494f4b9f78ec86eac6282f1de977e2" "jcstress-20240222.jar" | ||
|
||
hashArtifacts | ||
popd |
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.
Do we still need this?
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.
We dont. I can drop it if you insists. But I'm 51:49 to keep it. It is good to list individual jDKS in buildroot. Especially in case, that something will nto honour JAVA_HOME, it will ebcome very usefull.
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.
Are we missing Java 21 here as well?
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.
What do you mean miss java 21? The container have jdk8, jdk11, jdk17 and also jdk21 iirc. Jcsress since some 2023 needs at elast jdk11 to build with. I'm checking the hdk versiosn just for case the build goes wrong. I can check the 21 too if you wish.
the upstream is correctlysetting source/version/release javc flags so to build each version by different jdk was just candy on the top. Now all three jcstresses (latest release, tip, and "latest used by us" ) are built by jdk11. If you wish, I have no objections to build tip by soemthign newer. :) ty!
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.
It sounds like you only need to check for the existence of 11+ in that case? It seems over kill to check for each LTS version...