improve ufuzz duty cycle heuristic (#4153)

This commit is contained in:
Alex Lam S.L
2020-09-26 00:56:00 +01:00
committed by GitHub
parent 6e105c5ca6
commit 40f36b9e01
3 changed files with 90 additions and 67 deletions

View File

@@ -6,6 +6,7 @@ on:
env:
BASE_URL: https://api.github.com/repos/${{ github.repository }}
CAUSE: ${{ github.event_name }}
RUN_NUM: ${{ github.run_number }}
TOKEN: ${{ github.token }}
jobs:
ufuzz:
@@ -36,12 +37,8 @@ jobs:
npm config set update-notifier false
npm --version
while !(npm install); do echo "'npm install' failed - retrying..."; done
PERIOD=-5000
if [[ $CAUSE == "schedule" ]]; then
PERIOD=`node test/ufuzz/actions $BASE_URL $TOKEN`
fi
if (( $PERIOD == 0 )); then
echo "too many jobs in queue - skipping..."
node test/ufuzz/job $BASE_URL $TOKEN $RUN_NUM
else
node test/ufuzz/job $PERIOD
node test/ufuzz/job 5000
fi