Skip to content

Commit

Permalink
Merge pull request #1 from s-u/main
Browse files Browse the repository at this point in the history
Allow curl re-tries since there can be transient failures
  • Loading branch information
kalibera authored Dec 12, 2022
2 parents 757712b + 1e6d89b commit 72e752d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actions/toolchain-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ runs:
run: |
TYPE="${{ inputs.toolchain-type }}"
TDIR=~/x86_64-w64-mingw32.static.posix
# connectivity can be flaky so allow re-tries
RCURL='curl --retry 4 --retry-all-errors -fsSL'
if [ "${{ runner.os }}" = Windows -a $TYPE != "none" -a -r $TDIR/type ] ; then
# FIXME: add toolchain version check, not only type
CTYPE="`cat $TDIR/type`"
Expand All @@ -45,10 +47,10 @@ runs:
else
SUFF="_full"
fi
URL=`curl -s https://api.github.com/repos/kalibera/ucrt3/releases | \
URL=`$RCURL https://api.github.com/repos/kalibera/ucrt3/releases | \
sed -n 's!^ *\"*browser_download_url\"*: \"\(.*/download/'$TAG'/gcc10_ucrt3'$SUFF'_[0-9]\+\.tar.zst\)\"!\1!p'`
echo "Toolchain URL is $URL"
curl -s -L $URL > toolchain.tar.zst
$RCURL -o toolchain.tar.zst $URL
if [ ! -r toolchain.tar.zst ] ; then
echo "::error ::ERROR: failed to download toolchain"
exit 1
Expand Down

0 comments on commit 72e752d

Please sign in to comment.