Skip to content

Commit

Permalink
[CI] retry windows ocaml libs install after 10min (#11935)
Browse files Browse the repository at this point in the history
* [CI] retry windows ocaml libs install after 10min

* Only retry on timeout

* Fix args
  • Loading branch information
kLabz authored Jan 22, 2025
1 parent e0f184c commit 4a05a73
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,21 @@ jobs:
${{ env.CYG_ROOT }}\bin\tar.exe -C ${{ env.CYG_ROOT }} -xvf libmbedtls.tar.xz
- name: Install OCaml libraries
shell: pwsh
run: |
Set-PSDebug -Trace 1
# stop after any command returns an error
$PSNativeCommandUseErrorActionPreference = $true
$ErrorActionPreference = 'Stop'
# see: https://github.com/aantron/luv/issues/162
$env:PATH="${env:CYG_ROOT}\bin;${env:CYG_ROOT}\usr\x86_64-w64-mingw32\bin;${env:PATH}"
opam install haxe --deps-only
opam list
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 10
retry_on: timeout
shell: pwsh
command: |
Set-PSDebug -Trace 1
# stop after any command returns an error
$PSNativeCommandUseErrorActionPreference = $true
$ErrorActionPreference = 'Stop'
# see: https://github.com/aantron/luv/issues/162
$env:PATH="${env:CYG_ROOT}\bin;${env:CYG_ROOT}\usr\x86_64-w64-mingw32\bin;${env:PATH}"
opam install haxe --deps-only
opam list
- name: Set ADD_REVISION=1 for non-release
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
Expand Down
25 changes: 15 additions & 10 deletions extra/github-actions/install-ocaml-libs-windows.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
- name: Install OCaml libraries
shell: pwsh
run: |
Set-PSDebug -Trace 1
# stop after any command returns an error
$PSNativeCommandUseErrorActionPreference = $true
$ErrorActionPreference = 'Stop'
# see: https://github.com/aantron/luv/issues/162
$env:PATH="${env:CYG_ROOT}\bin;${env:CYG_ROOT}\usr\x86_64-w64-mingw32\bin;${env:PATH}"
opam install haxe --deps-only
opam list
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 10
retry_on: timeout
shell: pwsh
command: |
Set-PSDebug -Trace 1
# stop after any command returns an error
$PSNativeCommandUseErrorActionPreference = $true
$ErrorActionPreference = 'Stop'
# see: https://github.com/aantron/luv/issues/162
$env:PATH="${env:CYG_ROOT}\bin;${env:CYG_ROOT}\usr\x86_64-w64-mingw32\bin;${env:PATH}"
opam install haxe --deps-only
opam list

0 comments on commit 4a05a73

Please sign in to comment.