5
5
vmImage : ubuntu-16.04
6
6
strategy :
7
7
matrix :
8
+ # Fail with compilation error building haddock-api
9
+ # ghc-8.8.2:
10
+ # GHC_VERSION: "8.8.2"
11
+ ghc-8.8.1 :
12
+ GHC_VERSION : " 8.8.1"
8
13
ghc-8.6.5 :
9
14
GHC_VERSION : " 8.6.5"
10
15
ghc-8.4.4 :
11
16
GHC_VERSION : " 8.4.4"
12
17
variables :
13
18
CABAL_VERSION : " 3.0"
19
+ LIQUID_VERSION : " 0.8.6.2"
14
20
steps :
15
21
- task : Cache@2
16
22
inputs :
17
- key : ' "cabal-store " | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal'
23
+ key : ' "cabal" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal'
18
24
path : .azure-cache
19
25
cacheHitVar : CACHE_RESTORED
20
26
displayName : " Download cache"
@@ -23,26 +29,34 @@ jobs:
23
29
tar -vxzf .azure-cache/cabal-root.tar.gz -C /
24
30
mkdir -p $HOME/.ghc
25
31
tar -vxzf .azure-cache/ghc-root.tar.gz -C /
26
- mkdir -p dist-newtyle
32
+ mkdir -p dist-newstyle
27
33
tar -vxzf .azure-cache/cabal-dist.tar.gz
28
34
displayName: "Unpack cache"
29
35
condition: eq(variables.CACHE_RESTORED, 'true')
30
36
- bash : |
31
37
git submodule sync
32
38
git submodule update --init
33
39
displayName: Sync submodules
40
+ - bash : |
41
+ # To install ghc if they are not yet included in the agent image
42
+ ghc --version || (sudo apt-get update && sudo apt-get install -y ghc-$GHC_VERSION)
43
+ displayName: Install ghc
34
44
- bash : |
35
45
source .azure/linux-cabal.bashrc
36
46
cabal v2-update
37
- cabal v2-build --only-dependencies
47
+ echo "overwrite-policy: always" >> $HOME/.cabal/config
48
+ displayName: Update cabal
49
+ - bash : |
50
+ source .azure/linux-cabal.bashrc
51
+ cabal v2-build --disable-tests --disable-benchmarks --only-dependencies
38
52
displayName: Build dependencies
39
53
- bash : |
40
54
source .azure/linux-cabal.bashrc
41
- cabal v2-build
55
+ cabal v2-build --disable-tests --disable-benchmarks
42
56
displayName: Build `hie`
43
57
- bash : |
44
58
source .azure/linux-cabal.bashrc
45
- cabal v2-install --overwrite-policy=always # `hie` binary required locally for tests
59
+ cabal v2-install # `hie` binary required locally for tests
46
60
displayName: Install `hie`
47
61
- bash : |
48
62
source .azure/linux-cabal.bashrc
54
68
displayName: "Install Runtime Test-Dependencies: z3"
55
69
- bash : |
56
70
source .azure/linux-cabal.bashrc
57
- # to not reinstall hie
58
71
cd $(Agent.TempDirectory)
59
- cabal v2-install liquidhaskell-0.8.6.2 -w /opt/ghc/8.6.5/bin/ghc --overwrite-policy=always
72
+ cabal v2-install liquidhaskell-$LIQUID_VERSION -w /opt/ghc/8.6.5/bin/ghc
60
73
displayName: "Install Runtime Test-Dependencies: liquidhaskell"
61
74
- bash : |
62
75
source .azure/linux-cabal.bashrc
65
78
displayName: "Install Runtime Test-Dependencies: hoogle database"
66
79
- bash : |
67
80
source .azure/linux-cabal.bashrc
68
- # TODO: Investigate why the test suite can't be run in parallel
69
- cabal v2-test -j1
70
- displayName: Run Test
81
+ cabal v2-test :unit-test
82
+ displayName: "Run Test: unit-test"
83
+ - bash : |
84
+ source .azure/linux-cabal.bashrc
85
+ cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test
86
+ displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test"
87
+ - bash : |
88
+ source .azure/linux-cabal.bashrc
89
+ cabal v2-test :func-test
90
+ displayName: "Run Test: func-test"
71
91
- bash : |
72
92
mkdir -p .azure-cache
73
93
tar -vczf .azure-cache/cabal-root.tar.gz $HOME/.cabal
0 commit comments