Skip to content

Commit

Permalink
Re-enable Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo authored and Mikolaj committed Aug 30, 2024
1 parent 1e93e57 commit 7f0ce61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
"8.8.4",
]
exclude:
# Throws fatal "cabal-tests.exe: fd:8: hGetLine: end of file" exception
# even with --io-manager=native
- sys:
{ os: windows-latest, shell: "C:/msys64/usr/bin/bash.exe -e {0}" }
ghc: "9.0.2"
# corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
- sys:
{ os: windows-latest, shell: "C:/msys64/usr/bin/bash.exe -e {0}" }
Expand Down Expand Up @@ -210,7 +215,6 @@ jobs:
run: sh validate.sh $FLAGS -s cli-tests

- name: Validate cli-suite
if: runner.os != 'Windows'
run: sh validate.sh $FLAGS -s cli-suite

- name: Validate solver-benchmarks-tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Test.Cabal.Prelude

main = cabalTest $ do
ghcVer <- isGhcVersion ">= 9.10"
skipUnlessGhcVersion ">= 8.1"
expectBrokenIf (isWindows && ghcVer) 10191 $ withProjectFile "cabal.external.project" $ do
withProjectFile "cabal.external.project" $ do
cabal "v2-build" ["exe"]
withPlan $ do
r <- runPlanExe' "exe" "exe" []
Expand Down
8 changes: 2 additions & 6 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,8 @@ CABAL_TESTSUITE_BDIR="$(pwd)/$BUILDDIR/build/$ARCH/$BASEHC/cabal-testsuite-3"
CABALNEWBUILD="${CABAL} build $JOBS -w $HC --builddir=$BUILDDIR --project-file=$PROJECTFILE"
CABALLISTBIN="${CABAL} list-bin --builddir=$BUILDDIR --project-file=$PROJECTFILE"

# This was needed in some local Windows MSYS2 environments
# but breaks CI for Windows + GHC 9.0.2, thus it is set only on non-CI executions
# of validate.sh
# https://github.com/haskell/cabal/issues/9571
# https://github.com/haskell/cabal/pull/10114
RTSOPTS="$([ $ARCH = "x86_64-windows" ] && [ -z "$CI" ] && [ "$($HC --numeric-version)" != "8.10.7" ] && echo "+RTS --io-manager=native" || echo "")"
# See https://github.com/haskell/cabal/issues/9571 for why we set this for Windows
RTSOPTS="$([ $ARCH = "x86_64-windows" ] && [ "$($HC --numeric-version)" != "9.0.2" ] && [ "$(echo -e "$(ghc --numeric-version)\n9.0.2" | sort -V | head -n1)" = "9.0.2" ] && echo "+RTS --io-manager=native" || echo "")"

# header
#######################################################################
Expand Down

0 comments on commit 7f0ce61

Please sign in to comment.