Skip to content
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

ci: Add retry mechanism for fetching sources in bitbake-build #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/actions/bitbake-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,22 @@ runs:
ulimit -n 4096
source sources/meta-webkit/.github/scripts/setup-environment ${{ inputs.bitbake_source }}
rm -rf tmp
${{ inputs.bitbake_prefix }} bitbake ${{ inputs.bitbake_target }}
MAX_RETRIES=5
export ${{ inputs.bitbake_prefix }}
for i in $(seq 1 $MAX_RETRIES); do
echo "Attempt $i to fetch sources for ${{ inputs.bitbake_target }} ..."
if bitbake ${{ inputs.bitbake_target }} --runall=fetch; then
echo "All sources fetched successfully."
break
fi

if [ $i -lt $MAX_RETRIES ]; then
echo "Retrying fetch process..."
else
echo "Max retries reached. Some sources may still be missing."
fi
done
bitbake ${{ inputs.bitbake_target }}
- name: Clean the tmp dir
if: always()
shell: bash
Expand Down
Loading