Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Enable windows ci #808

Merged
merged 6 commits into from
Sep 15, 2020
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: 1 addition & 1 deletion .azure/linux-bench.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jobs:
- job: ghcide_bench_linux
timeoutInMinutes: 60
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-latest'
strategy:
Expand Down
32 changes: 13 additions & 19 deletions .azure/windows-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ jobs:
- checkout: self
- task: Cache@2
inputs:
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/$(STACK_YAML) | $(Build.SourcesDirectory)/ghcide.cabal
path: .azure-cache
cacheHitVar: CACHE_RESTORED
displayName: "Cache stack artifacts"
- bash: |
mkdir -p $STACK_ROOT
tar -vxzf .azure-cache/stack-root.tar.gz -C /c
mkdir -p .stack-work
tar -vxzf .azure-cache/stack-work.tar.gz
displayName: "Unpack cache"
condition: eq(variables.CACHE_RESTORED, 'true')
key: stack-root-cache | $(Agent.OS) | $(Build.SourcesDirectory)/$(STACK_YAML) | $(Build.SourcesDirectory)/ghcide.cabal
path: $(STACK_ROOT)
cacheHitVar: STACK_ROOT_CACHE_RESTORED
displayName: "Cache stack root"
- task: Cache@2
inputs:
key: stack-work-cache | $(Agent.OS) | $(Build.SourcesDirectory)/$(STACK_YAML) | $(Build.SourcesDirectory)/ghcide.cabal
path: .stack-work
cacheHitVar: STACK_WORK_CACHE_RESTORED
displayName: "Cache stack work"
- bash: |
./fmt.sh
displayName: "HLint via ./fmt.sh"
Expand All @@ -47,19 +46,14 @@ jobs:
stack install happy --stack-yaml $STACK_YAML
stack install alex --stack-yaml $STACK_YAML
stack install cabal-install --stack-yaml $STACK_YAML
# GHC 8.10 keeps crashing with various kinds of access violations and other
# errors so we retry 3 times.
# GHC 8.10.1 fails with ghc segfaults, using -fexternal-interpreter seems to make it working
# There are other transient errors like timeouts downloading from stackage so we retry 3 times
if [ "$STACK_YAML" = "stack8101.yaml" ]; then
stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter" || stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter" || stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter"
else
stack build --only-dependencies --stack-yaml $STACK_YAML
stack build --only-dependencies --stack-yaml $STACK_YAML || stack build --only-dependencies --stack-yaml $STACK_YAML || stack build --only-dependencies --stack-yaml $STACK_YAML
fi
displayName: 'stack build --only-dependencies'
- bash: |
mkdir -p .azure-cache
tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT)
tar -vczf .azure-cache/stack-work.tar.gz .stack-work
displayName: "Pack cache"
- bash: |
if [ "$STACK_YAML" = "stack8101.yaml" ]; then
stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ pr:

jobs:
- template: ./.azure/linux-stack.yml
# - template: ./.azure/windows-stack.yml
- template: ./.azure/windows-stack.yml
- template: ./.azure/linux-bench.yml