diff --git a/.github/workflows/esy-ci.yml b/.github/workflows/esy-ci.yml index 2783730b4..124f31998 100644 --- a/.github/workflows/esy-ci.yml +++ b/.github/workflows/esy-ci.yml @@ -36,6 +36,13 @@ jobs: with: node-version: 20 + - name: Set up MinGW (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + choco upgrade mingw -y --no-progress + echo "C:\ProgramData\mingw64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Install esy run: npm install -g esy@0.9.0-beta.1 @@ -44,7 +51,7 @@ jobs: uses: actions/cache/restore@v4 with: path: ~/.esy/source - key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} + key: v0.0.2-esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} - name: Print esy cache id: print_esy_cache @@ -57,8 +64,8 @@ jobs: path: | ${{ steps.print_esy_cache.outputs.ESY_CACHE }} _export - key: esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} - restore-keys: esy-build-${{ matrix.os }}- + key: v0.0.2-esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} + restore-keys: v0.0.2-esy-build-${{ matrix.os }}- - name: Install dependencies run: esy install @@ -94,7 +101,7 @@ jobs: if: steps.global-cache.outputs.cache-hit != 'true' with: path: ~/.esy/source - key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} + key: v0.0.2-esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} - name: Save dependencies cache if: steps.deps-cache.outputs.cache-hit != 'true' @@ -103,7 +110,7 @@ jobs: path: | ${{ steps.print_esy_cache.outputs.ESY_CACHE }} _export - key: esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} + key: v0.0.2-esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} # Cleanup build cache in case dependencies have changed - name: Cleanup diff --git a/.github/workflows/opam-ci.yml b/.github/workflows/opam-ci.yml index e4e8a1e25..f0ebe912d 100644 --- a/.github/workflows/opam-ci.yml +++ b/.github/workflows/opam-ci.yml @@ -32,6 +32,7 @@ jobs: # OCaml >= 4.13 # https://github.com/ocaml/setup-ocaml/issues/822#issuecomment-2215525942 - {ocaml-compiler: '4.14.x', os: windows-latest} + - {ocaml-compiler: 'ocaml-base-compiler.5.4.0', os: windows-latest} runs-on: ${{ matrix.setup.os }} @@ -51,7 +52,7 @@ jobs: uses: actions/cache/restore@v4 with: path: ~/.opam - key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('*.opam') }} + key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('*.opam') }} - name: Load opam cache when Windows if: runner.os == 'Windows' @@ -59,7 +60,7 @@ jobs: uses: actions/cache/restore@v4 with: path: _opam - key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} - name: Install dependencies run: opam install . --deps-only @@ -87,12 +88,12 @@ jobs: if: steps.opam-cache.outputs.cache-hit != 'true' && runner.os != 'Windows' with: path: ~/.opam - key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.1-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: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} + key: v0.0.1-opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }} diff --git a/test/dune b/test/dune index 7c1e528e0..418b8bf80 100644 --- a/test/dune +++ b/test/dune @@ -12,7 +12,12 @@ ./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). +; See: https://github.com/ocaml-community/lambda-term/pull/125 +; Re-enable on Windows once lambda-term ships the fix. (cram (applies_to rtopIntegration) (package rtop) + (enabled_if (= %{os_type} Unix)) (deps %{bin:ocamlc} %{bin:rtop})) diff --git a/test/rtopIntegration.t b/test/rtopIntegration.t index 66f9be4a3..1cac5f452 100644 --- a/test/rtopIntegration.t +++ b/test/rtopIntegration.t @@ -11,8 +11,8 @@ always error. Given the above, we're gonna test that utop integration works by piping code into it and asserting the existence of some output. - $ echo "let f = a => a;" | rtop | grep -o "let f: 'a => 'a = ;" + $ echo "let f = a => a;" | rtop 2>&1 | grep -o "let f: 'a => 'a = ;" let f: 'a => 'a = ; - $ echo "let f = (a) => 1 + \"hi\";" | rtop | grep -o "has type" + $ echo "let f = (a) => 1 + \"hi\";" | rtop 2>&1 | grep -o "has type" has type