8343190: GHA: Try building JTReg several times
Reviewed-by: erikj, ihse
This commit is contained in:
parent
7c800e6bae
commit
4ce19ca110
20
.github/actions/build-jtreg/action.yml
vendored
20
.github/actions/build-jtreg/action.yml
vendored
@ -52,8 +52,24 @@ runs:
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
# Try building JTReg several times, backing off exponentially on failure.
|
||||
# ~500 seconds in total should be enough to capture most of the transient
|
||||
# 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
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
|
Loading…
Reference in New Issue
Block a user