diff --git a/.github/workflows/ci.ml b/.github/workflows/ci.ml index c54c7131bbf..4a2db1f3eb0 100644 --- a/.github/workflows/ci.ml +++ b/.github/workflows/ci.ml @@ -339,6 +339,8 @@ let main_build_job ~analyse_job ~cygwin_job ?section runner start_version ~oc ~w ++ build_cache OCaml platform "${{ matrix.ocamlv }}" host ++ run "Build" ["bash -exu .github/scripts/main/main.sh " ^ host] ++ not_on Windows (run "Test (basic)" ["bash -exu .github/scripts/main/test.sh"]) + ++ only_on Windows (run ~cond:(Predicate(true, EndsWith("matrix.host", "-w64-mingw32"))) "Test static binary" ["ldd ./opam.exe | grep -F libstdc++-6.dll ; test $? = 1"]) + ++ only_on Windows (run ~cond:(Predicate(false, EndsWith("matrix.host", "-w64-mingw32"))) "Test static binary" ["ldd ./opam.exe | grep -F libstdc++-6.dll"]) ++ only_on Windows (run "Test (basic - Cygwin)" ~cond:(Predicate(true, EndsWith("matrix.host", "-pc-cygwin"))) ["bash -exu .github/scripts/main/test.sh"]) ++ only_on Windows (run "Test (basic - native Windows)" ~env:[("OPAMROOT", {|D:\a\opam\opam\.opam|})] ~shell:"cmd" ~cond:(Predicate(false, EndsWith("matrix.host", "-pc-cygwin"))) ({|set Path=D:\Cache\ocaml-local\bin;%Path%|} :: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 463a31f34e2..88308c60c24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -204,6 +204,12 @@ jobs: run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }} ${{ matrix.host }} - name: Build run: bash -exu .github/scripts/main/main.sh ${{ matrix.host }} + - name: Test static binary + if: endsWith(matrix.host, '-w64-mingw32') + run: ldd ./opam.exe | grep -F libstdc++-6.dll ; test $? = 1 + - name: Test static binary + if: endsWith(matrix.host, '-w64-mingw32') == false + run: ldd ./opam.exe | grep -F libstdc++-6.dll - name: Test (basic - Cygwin) if: endsWith(matrix.host, '-pc-cygwin') run: bash -exu .github/scripts/main/test.sh