Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit f2c727b

Browse files
authored
Merge pull request #1737 from jneira/stack-linux
Use preinstalled ghcs in stack linux builds
2 parents e61670f + 4fdd911 commit f2c727b

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

.azure/linux-stack.bashrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export PATH=$HOME/.local/bin:$PATH
1+
export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH

.azure/linux-stack.yml

+24-16
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ jobs:
55
vmImage: ubuntu-16.04
66
strategy:
77
matrix:
8-
stack-def:
8+
default:
99
YAML_FILE: stack.yaml
10-
stack-8.8.3:
11-
YAML_FILE: stack-8.8.3.yaml
12-
stack-8.8.2:
13-
YAML_FILE: stack-8.8.2.yaml
14-
stack-8.6.5:
15-
YAML_FILE: stack-8.6.5.yaml
16-
stack-8.6.4:
17-
YAML_FILE: stack-8.6.4.yaml
18-
stack-8.4.4:
19-
YAML_FILE: stack-8.4.4.yaml
20-
stack-8.4.3:
21-
YAML_FILE: stack-8.4.3.yaml
22-
stack-8.4.2:
23-
YAML_FILE: stack-8.4.2.yaml
10+
GHC_VERSION: "8.8.3"
11+
ghc-8.8.3:
12+
GHC_VERSION: "8.8.3"
13+
ghc-8.8.2:
14+
GHC_VERSION: "8.8.2"
15+
ghc-8.6.5:
16+
GHC_VERSION: "8.6.5"
17+
ghc-8.6.4:
18+
GHC_VERSION: "8.6.4"
19+
ghc-8.4.4:
20+
GHC_VERSION: "8.4.4"
21+
ghc-8.4.3:
22+
GHC_VERSION: "8.4.3"
23+
ghc-8.4.2:
24+
GHC_VERSION: "8.4.2"
2425
variables:
2526
STACK_ROOT: /home/vsts/.stack
2627
CABAL_VERSION: "3.0"
28+
YAML_FILE: stack-$(GHC_VERSION).yaml
2729
steps:
2830
- task: Cache@2
2931
inputs:
30-
key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)'
32+
key: '"stack-v1" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)'
3133
path: .azure-cache
3234
cacheHitVar: CACHE_RESTORED
3335
displayName: "Download cache"
@@ -45,6 +47,9 @@ jobs:
4547
mkdir -p ~/.local/bin
4648
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | \
4749
tar vxz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
50+
stack update
51+
echo "system-ghc: true" >> $STACK_ROOT/config.yaml
52+
echo "install-ghc: false" >> $STACK_ROOT/config.yaml
4853
displayName: Install stack
4954
- bash: |
5055
source .azure/linux-stack.bashrc
@@ -85,6 +90,7 @@ jobs:
8590
displayName: "Install Runtime Test-Dependencies: z3"
8691
- bash: |
8792
source .azure/linux-stack.bashrc
93+
export PATH=/opt/ghc/8.6.5/bin:$PATH
8894
stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2
8995
displayName: "Install Runtime Test-Dependencies: liquidhaskell"
9096
- bash: |
@@ -100,6 +106,8 @@ jobs:
100106
displayName: "Run Test: unit-test"
101107
- bash: |
102108
source .azure/linux-stack.bashrc
109+
# we need the ghc versions used by wrapper-test suite
110+
export PATH=$PATH:/opt/ghc/8.8.1/bin:/opt/ghc/8.6.5/bin
103111
stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE)
104112
displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test"
105113
- bash: |

0 commit comments

Comments
 (0)