From 45db7a6349b1db45fefbaf308ccc07c8acf10bf2 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 10 Oct 2022 12:56:43 +0800 Subject: [PATCH] Improve bindist install script Test HLS and cabal better. Test profiling. --- .github/workflows/install-bindist.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/install-bindist.sh b/.github/workflows/install-bindist.sh index cc5b047..31ccd26 100755 --- a/.github/workflows/install-bindist.sh +++ b/.github/workflows/install-bindist.sh @@ -12,15 +12,29 @@ which ghcup | grep foobarbaz ghcup -v --url-source=file:$METADATA_FILE install $TOOL --set $VERSION +cat < main.hs +{- cabal: +build-depends: base +-} + +main = print $ 1 + 1 +EOF + case $TOOL in hls) haskell-language-server-wrapper --version + haskell-language-server-wrapper typecheck main.hs ;; ghc) ghc --version - echo 'main = print $ 1 + 1' > main.hs - ghc main.hs - [[ $(./main) -eq 2 ]] + ghc --info + ghc -prof main.hs + [[ $(./main +RTS -s) -eq 2 ]] + ;; + cabal) + cabal --version + cabal update + [[ $(cabal --verbose=0 run --enable-profiling ./main.hs -- +RTS -s) -eq 2 ]] ;; *) $TOOL --version