Skip to content
Merged
Show file tree
Hide file tree
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
27 changes: 27 additions & 0 deletions .github/actions/install-msys2-mrbind/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Install MSYS2 for MRBind'
description: 'Download the MeshLib MSYS2 archive from S3 with retry on transient failures and extract to C:\'
runs:
using: 'composite'
steps:
- name: Install MSYS2 for MRBind
shell: pwsh
run: |
# Retry the S3 fetch -- transient 404 / connection blips have been
# observed against vcpkg-export.s3.us-east-1.amazonaws.com.
$url = "https://vcpkg-export.s3.us-east-1.amazonaws.com/msys64_meshlib_mrbind.zip"
$dest = "./msys64_meshlib_mrbind.zip"
$maxAttempts = 5
$delay = 10
for ($i = 1; $i -le $maxAttempts; $i++) {
try {
(New-Object Net.WebClient).DownloadFile($url, $dest)
break
} catch {
if ($i -eq $maxAttempts) { throw }
Write-Host "Download attempt $i failed: $($_.Exception.Message). Retrying in $delay s..."
Start-Sleep -Seconds $delay
$delay *= 2
}
}
[IO.Compression.ZipFile]::ExtractToDirectory($dest, "C:\")
rm $dest
5 changes: 1 addition & 4 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ jobs:

- name: Install MSYS2 for MRBind
if: ${{inputs.mrbind || (inputs.mrbind_c && matrix.build_system == 'CMake') || env.BUILD_C_SHARP == 'true'}}
run: |
(New-Object Net.WebClient).DownloadFile("https://vcpkg-export.s3.us-east-1.amazonaws.com/msys64_meshlib_mrbind.zip", "./msys64_meshlib_mrbind.zip")
[IO.Compression.ZipFile]::ExtractToDirectory("msys64_meshlib_mrbind.zip", "C:\")
rm msys64_meshlib_mrbind.zip
uses: ./.github/actions/install-msys2-mrbind

- name: Install gettext utilities
if: ${{ inputs.upload_artifacts }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pip-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,7 @@ jobs:

- name: Install MSYS2 for MRBind
if: ${{inputs.mrbind || (inputs.mrbind_c && matrix.build_system == 'CMake') || env.BUILD_C_SHARP == 'true'}}
run: |
(New-Object Net.WebClient).DownloadFile("https://vcpkg-export.s3.us-east-1.amazonaws.com/msys64_meshlib_mrbind.zip", "./msys64_meshlib_mrbind.zip")
[IO.Compression.ZipFile]::ExtractToDirectory("msys64_meshlib_mrbind.zip", "C:\")
rm msys64_meshlib_mrbind.zip
uses: ./.github/actions/install-msys2-mrbind

- name: Build MRBind
shell: cmd
Expand Down
Loading