From fdaeddb6e82c9cee419d3900d0fd153094992f91 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 12 Mar 2022 14:18:52 +0100 Subject: [PATCH] Run test in powershell --- .github/workflows/ci.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f93e61c..b2d9825d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,9 +42,10 @@ jobs: # https://github.com/haskell/actions/issues/36 # We also use --enable-tests and --enable-benchmarks to avoid # test and bench commands from reconfiguring and thus rebuilding. - - name: Test + - name: Build Test run: | + cabal user-config diff echo $PATH cabal sdist -z -o . @@ -52,15 +53,20 @@ jobs: cd bytestring-*/ bld() { cabal build bytestring:tests --enable-tests --enable-benchmarks; } bld || bld || bld + + - name: Run Test (windows) + run: | + $bin = cabal list-bin bytestring-tests + $env:PATH = '' + & "$bin" + shell: pwsh + if: matrix.os == 'windows-latest' - rm_dir=/mingw64/bin - PATH=:$PATH: - PATH=${PATH//:$rm_dir:/:} - PATH=${PATH#:} - export PATH=${PATH%:} - echo $PATH - + - name: Run Test (non-windows) + run: | $(cabal list-bin bytestring-tests) + if: matrix.os != 'windows-latest' + - name: Bench run: | cd bytestring-*/