File tree Expand file tree Collapse file tree 4 files changed +18
-14
lines changed
server/autotest_server/testers/haskell Expand file tree Collapse file tree 4 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ All notable changes to this project will be documented here.
55- Fixed Haskell test results to only include the function name (#687 )
66- Improved robustness of tester installation scripts and Docker configuration (#688 )
77- Moved tidyverse installation steps from server Dockerfile into R tester requirements.system (#688 )
8+ - Fixed Haskell tester installation using ghcup to install stack system-wide (#688 )
89
910## [ v2.9.0]
1011- Install stack with GHCup (#626 )
Original file line number Diff line number Diff line change 77from ..tester import Tester , Test , TestError
88from ..specs import TestSpecs
99
10- home = os .getenv ("HOME" )
11- os .environ ["PATH" ] = f"{ home } /.cabal/bin:{ home } /.ghcup/bin:" + os .environ ["PATH" ]
12-
1310
1411class HaskellTest (Test ):
1512 def __init__ (
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euxo pipefail
33
4- apt-get -y update
5-
4+ # Install a system-wide ghc, which can be used as a default version in the Haskell tester.
5+ # This should be synchronized with the LTS version and dependencies in setup.py
66if ! dpkg -l ghc cabal-install & > /dev/null; then
7+ apt-get -y update
78 DEBIAN_FRONTEND=noninteractive apt-get install -y -o ' Dpkg::Options::=--force-confdef' -o ' Dpkg::Options::=--force-confold' ghc cabal-install
89fi
910
10- if [ ! -x " $HOME /.ghcup/bin/ghcup" ] && [ ! -x " /usr/local/bin/stack" ]; then
11- BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 curl --proto ' =https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
12- $HOME /.ghcup/bin/ghcup install stack recommended
13- if [ " $( id -u) " -eq 0 ]; then
14- cp $HOME /.ghcup/bin/stack /usr/local/bin/
15- fi
11+ if [ ! -x " /usr/local/bin/stack" ]; then
12+ # We use ghcup to install stack rather than relying on system packages. This enables newer versions of Stack to be installed.
13+ # Install ghcup dependencies: https://www.haskell.org/ghcup/install/#linux-ubuntu
14+ apt-get -y update
15+ DEBIAN_FRONTEND=noninteractive apt-get install -y -o ' Dpkg::Options::=--force-confdef' -o ' Dpkg::Options::=--force-confold' \
16+ build-essential \
17+ curl \
18+ libffi-dev \
19+ libffi8ubuntu1 \
20+ libgmp-dev \
21+ libgmp10 \
22+ libncurses-dev
23+ curl --proto ' =https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
24+ $HOME /.ghcup/bin/ghcup install stack recommended --isolate /usr/local/bin
1625fi
Original file line number Diff line number Diff line change 55HASKELL_TEST_DEPS = ["tasty-discover" , "tasty-quickcheck" , "tasty-hunit" ]
66STACK_RESOLVER = "lts-21.21"
77
8- home = os .getenv ("HOME" )
9- os .environ ["PATH" ] = f"{ home } /.cabal/bin:{ home } /.ghcup/bin:" + os .environ ["PATH" ]
10-
118
129def create_environment (_settings , _env_dir , default_env_dir ):
1310 env_data = _settings .get ("env_data" , {})
You can’t perform that action at this time.
0 commit comments