From 583ea02d8344c664563ddeeeb862b7389a5d0ff4 Mon Sep 17 00:00:00 2001 From: Zeta <53486764+Apprentice-Alchemist@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:20:10 +0100 Subject: [PATCH] Downgrade setup-ocaml to 3.1.5. (#11906) * Downgrade setup-ocaml to 3.1.5. * Set $PSNativeCommandUseErrorActionPreference = $true in the install OCaml libraries step. This ensures that the step fails if any opam commands fail. --- .github/workflows/main.yml | 5 ++++- extra/github-actions/install-ocaml-libs-windows.yml | 3 +++ extra/github-actions/install-ocaml-windows.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 254a6ff4f84..5896452e267 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: run: neko -version 2>&1 - name: Setup ocaml - uses: ocaml/setup-ocaml@v3 + uses: ocaml/setup-ocaml@v3.1.5 with: ocaml-compiler: 4 opam-local-packages: | @@ -65,6 +65,9 @@ jobs: 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 diff --git a/extra/github-actions/install-ocaml-libs-windows.yml b/extra/github-actions/install-ocaml-libs-windows.yml index fc6c8b9ea8a..d3b2799f081 100644 --- a/extra/github-actions/install-ocaml-libs-windows.yml +++ b/extra/github-actions/install-ocaml-libs-windows.yml @@ -2,6 +2,9 @@ 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 diff --git a/extra/github-actions/install-ocaml-windows.yml b/extra/github-actions/install-ocaml-windows.yml index bff0357ff0e..feb08efad3f 100644 --- a/extra/github-actions/install-ocaml-windows.yml +++ b/extra/github-actions/install-ocaml-windows.yml @@ -1,5 +1,5 @@ - name: Setup ocaml - uses: ocaml/setup-ocaml@v3 + uses: ocaml/setup-ocaml@v3.1.5 with: ocaml-compiler: 4 opam-local-packages: |