Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Attempt to enable tests for 9.6.3 windows #9425

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,13 @@ jobs:
# Have to disable *-suite validation:
# - the Windows@9.6.1 problem is tracked at https://github.com/haskell/cabal/issues/8858
# - but curently can't run it with GHC 9.6, tracking: https://github.com/haskell/cabal/issues/8883
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
run: sh validate.sh $FLAGS -s lib-suite

- name: Validate cli-tests
run: sh validate.sh $FLAGS -s cli-tests

- name: Validate cli-suite
# Have to disable *-suite validation, see above the comment for lib-suite
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
run: sh validate.sh $FLAGS -s cli-suite

validate-old-ghcs:
Expand Down
11 changes: 11 additions & 0 deletions cabal-testsuite/PackageTests/CCompilerOverride/custom-cc-clang.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo OFF

where /q clang.exe

IF %ERRORLEVEL% EQU 0 (
call clang.exe -DNOERROR6 %*
EXIT /B %ERRORLEVEL%
)

ECHO "Cannot find C compiler"
EXIT /B 1
21 changes: 11 additions & 10 deletions cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.8"
isWin <- isWindows
ghc94 <- isGhcVersion "== 9.4.*"
ghc94 <- isGhcVersion ">= 9.4.1"
env <- getTestEnv
let pwd = testCurrentDir env
customCC = pwd ++ "/custom-cc" ++ if isWin then ".bat" else ""
win_suffix = if ghc94 then "-clang.bat" else ".bat"
customCC =
pwd ++ "/custom-cc" ++ if isWin then win_suffix else ""

expectBrokenIf (isWin && ghc94) 8451 $ do
setup "configure"
[ "--ghc-option=-DNOERROR1"
, "--ghc-option=-optc=-DNOERROR2"
, "--ghc-option=-optP=-DNOERROR3"
, "--with-gcc=" ++ customCC
]
setup "build" ["-v2"]
setup "configure"
[ "--ghc-option=-DNOERROR1"
, "--ghc-option=-optc=-DNOERROR2"
, "--ghc-option=-optP=-DNOERROR3"
, "--with-gcc=" ++ customCC
]
setup "build" ["-v2"]
3 changes: 2 additions & 1 deletion cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Distribution.Simple.Program.Types
import Distribution.System
import Distribution.Verbosity
import Distribution.Version
import System.Directory

import Test.Cabal.Prelude

Expand All @@ -27,7 +28,7 @@ main = setupAndCabalTest . recordMode DoNotRecord $ do
-- Foreign libraries don't work with GHC 7.6 and earlier
skipUnlessGhcVersion ">= 7.8"
win <- isWindows
ghc94 <- isGhcVersion "== 9.4.*"
ghc94 <- isGhcVersion ">= 9.4.1"
expectBrokenIf (win && ghc94) 8451 $
withPackageDb $ do
setup_install []
Expand Down
Loading