8343379: [BACKOUT] 8343190 GHA: Try building JTReg several times

Reviewed-by: erikj, ihse
This commit is contained in:
Aleksey Shipilev 2024-11-01 07:19:51 +00:00
parent 6f6cfe643b
commit 2a4d9d9b0d

View File

@ -52,24 +52,8 @@ runs:
- name: 'Build JTReg' - name: 'Build JTReg'
run: | run: |
# Try building JTReg several times, backing off exponentially on failure. # Build JTReg and move files to the proper locations
# ~500 seconds in total should be enough to capture most of the transient bash make/build.sh --jdk "$JAVA_HOME_17_X64"
# failures.
for I in `seq 0 8`; do
rm -rf build/images/jtreg
bash make/build.sh --jdk "$JAVA_HOME_17_X64" && break
S=$(( 2 ** $I ))
echo "Failure. Waiting $S seconds before retrying"
sleep $S
done
# Check if build was successful
if [ ! -d build/images/jtreg ]; then
echo "Build failed"
exit 1;
fi
# Move files to the proper locations
mkdir ../installed mkdir ../installed
mv build/images/jtreg/* ../installed mv build/images/jtreg/* ../installed
working-directory: jtreg/src working-directory: jtreg/src