diff --git a/.github/workflows/opam-ci.yml b/.github/workflows/opam-ci.yml index f0ebe912d..5867bcf23 100644 --- a/.github/workflows/opam-ci.yml +++ b/.github/workflows/opam-ci.yml @@ -52,7 +52,7 @@ jobs: uses: actions/cache/restore@v4 with: path: ~/.opam - key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('*.opam') }} + key: v0.0.2-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('*.opam') }} - name: Load opam cache when Windows if: runner.os == 'Windows' @@ -60,7 +60,12 @@ jobs: uses: actions/cache/restore@v4 with: path: _opam - key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.2-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + + - name: Pin lambda-term to fix Windows segfault + if: runner.os == 'Windows' + run: | + opam pin add lambda-term git+https://github.com/davesnx/lambda-term.git#fix-windows-console-segfault -y - name: Install dependencies run: opam install . --deps-only @@ -88,12 +93,12 @@ jobs: if: steps.opam-cache.outputs.cache-hit != 'true' && runner.os != 'Windows' with: path: ~/.opam - key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.2-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} - name: Save cache when Windows uses: actions/cache/save@v4 if: steps.opam-cache-windows.outputs.cache-hit != 'true' && runner.os == 'Windows' with: path: _opam - key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.2-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} diff --git a/test/dune b/test/dune index 418b8bf80..136a09783 100644 --- a/test/dune +++ b/test/dune @@ -12,12 +12,17 @@ ./lib/outcometreePrinter.exe ./lib/fdLeak.exe)) -; rtopIntegration is disabled on Windows due to a segfault in lambda-term's -; Windows C stubs when stdout is not a real console handle (ConPTY issue). +; rtopIntegration on Windows requires lambda-term with the ConPTY segfault fix. ; See: https://github.com/ocaml-community/lambda-term/pull/125 -; Re-enable on Windows once lambda-term ships the fix. +; On Windows, only enabled for OCaml >= 5.0 (opam-ci pins the fixed lambda-term). +; esy-ci uses 4.14 so the test is naturally skipped there. (cram (applies_to rtopIntegration) (package rtop) - (enabled_if (= %{os_type} Unix)) + (enabled_if + (or + (= %{os_type} Unix) + (and + (= %{os_type} Win32) + (>= %{ocaml_version} 5.0.0)))) (deps %{bin:ocamlc} %{bin:rtop}))