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

Add a retry mechanism for publishing mmtk-core to crates.io #618

Merged
merged 3 commits into from
Aug 8, 2022
Merged
Changes from 1 commit
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
14 changes: 13 additions & 1 deletion .github/workflows/cargo-publish.yml
Original file line number Diff line number Diff line change
@@ -22,6 +22,18 @@ jobs:
- name: Publish sub crates
run: |
cargo publish --manifest-path=macros/Cargo.toml
# Publish MMTk core.
# As mmtk-core depends on the crate we just publish above, in practice there could be
# a delay before we can find the exact version for the dependent crate on crates.io.
# The script will retry publish for 5 times with 60 seconds between the retries.
- name: Public mmtk-core
run: |
cargo publish
n=0
until [ "$n" -ge 5 ]
do
qinsoon marked this conversation as resolved.
Show resolved Hide resolved
echo "Attempt #"$n
cargo publish && break
n=$((n+1))
echo "Wait for Retry #"$n
sleep 60
done