Skip to content

Commit

Permalink
Run test in powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Mar 12, 2022
1 parent d50c8d5 commit fdaeddb
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,31 @@ 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 .
cabal get bytestring-*.tar.gz
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-*/
Expand Down

0 comments on commit fdaeddb

Please sign in to comment.