|  | 
| 4 | 4 |   branches: | 
| 5 | 5 |     include: | 
| 6 | 6 |       - master | 
|  | 7 | +      - azure* | 
| 7 | 8 | 
 | 
| 8 | 9 | # Enable PR triggers that target the master branch | 
| 9 | 10 | pr: | 
|  | 
| 13 | 14 |       - master | 
| 14 | 15 | 
 | 
| 15 | 16 | jobs: | 
| 16 |  | -  - job: ghcide_stack_86 | 
| 17 |  | -    timeoutInMinutes: 60 | 
| 18 |  | -    pool: | 
| 19 |  | -      vmImage: 'ubuntu-latest' | 
| 20 |  | -    steps: | 
| 21 |  | -      - checkout: self | 
| 22 |  | -      - task: CacheBeta@0 | 
| 23 |  | -        inputs: | 
| 24 |  | -          key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack.yaml | $(Build.SourcesDirectory)/ghcide.cabal | 
| 25 |  | -          path: .azure-cache | 
| 26 |  | -          cacheHitVar: CACHE_RESTORED | 
| 27 |  | -        displayName: "Cache stack artifacts" | 
| 28 |  | -      - bash: | | 
| 29 |  | -          mkdir -p ~/.stack | 
| 30 |  | -          tar xzf .azure-cache/stack-root.tar.gz -C $HOME | 
| 31 |  | -        displayName: "Unpack cache" | 
| 32 |  | -        condition: eq(variables.CACHE_RESTORED, 'true') | 
| 33 |  | -      - bash: | | 
| 34 |  | -          ./fmt.sh | 
| 35 |  | -        displayName: "HLint via ./fmt.sh" | 
| 36 |  | -      - bash: | | 
| 37 |  | -          sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev | 
| 38 |  | -          if ! which stack >/dev/null 2>&1; then | 
| 39 |  | -              curl -sSL https://get.haskellstack.org/ | sh | 
| 40 |  | -          fi | 
| 41 |  | -        displayName: 'Install Stack' | 
| 42 |  | -      - bash: stack setup | 
| 43 |  | -        displayName: 'stack setup' | 
| 44 |  | -      - bash: stack build --only-dependencies | 
| 45 |  | -        displayName: 'stack build --only-dependencies' | 
| 46 |  | -      - bash: stack test --ghc-options=-Werror || stack test --ghc-options=-Werror || stack test --ghc-options=-Werror | 
| 47 |  | -        # ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606. | 
| 48 |  | -        displayName: 'stack test --ghc-options=-Werror' | 
| 49 |  | -      - bash: | | 
| 50 |  | -          mkdir -p .azure-cache | 
| 51 |  | -          tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack | 
| 52 |  | -        displayName: "Pack cache" | 
| 53 |  | -      - bash: | | 
| 54 |  | -          set -euo pipefail | 
| 55 |  | -          MESSAGE=$(git log --pretty=format:%s -n1) | 
| 56 |  | -          curl -XPOST \ | 
| 57 |  | -               -i \ | 
| 58 |  | -               -H 'Content-type: application/json' \ | 
| 59 |  | -               --data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \ | 
| 60 |  | -               $(Slack.URL) | 
| 61 |  | -        condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master')) | 
| 62 |  | -  - job: ghcide_stack_84 | 
| 63 |  | -    timeoutInMinutes: 60 | 
| 64 |  | -    pool: | 
| 65 |  | -      vmImage: 'ubuntu-latest' | 
| 66 |  | -    steps: | 
| 67 |  | -      - checkout: self | 
| 68 |  | -      - task: CacheBeta@0 | 
| 69 |  | -        inputs: | 
| 70 |  | -          key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack84.yaml | $(Build.SourcesDirectory)/ghcide.cabal | 
| 71 |  | -          path: .azure-cache | 
| 72 |  | -          cacheHitVar: CACHE_RESTORED | 
| 73 |  | -        displayName: "Cache stack artifacts" | 
| 74 |  | -      - bash: | | 
| 75 |  | -          mkdir -p ~/.stack | 
| 76 |  | -          tar xzf .azure-cache/stack-root.tar.gz -C $HOME | 
| 77 |  | -        displayName: "Unpack cache" | 
| 78 |  | -        condition: eq(variables.CACHE_RESTORED, 'true') | 
| 79 |  | -      - bash: | | 
| 80 |  | -          ./fmt.sh | 
| 81 |  | -        displayName: "HLint via ./fmt.sh" | 
| 82 |  | -      - bash: | | 
| 83 |  | -          sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev | 
| 84 |  | -          if ! which stack >/dev/null 2>&1; then | 
| 85 |  | -              curl -sSL https://get.haskellstack.org/ | sh | 
| 86 |  | -          fi | 
| 87 |  | -        displayName: 'Install Stack' | 
| 88 |  | -      - bash: stack setup --stack-yaml=stack84.yaml | 
| 89 |  | -        displayName: 'stack setup --stack-yaml=stack84.yaml' | 
| 90 |  | -      - bash: stack build --only-dependencies --stack-yaml=stack84.yaml | 
| 91 |  | -        displayName: 'stack build --only-dependencies --stack-yaml=stack84.yaml' | 
| 92 |  | -      - bash: stack test --stack-yaml=stack84.yaml --ghc-options=-Werror || stack test --stack-yaml=stack84.yaml  --ghc-options=-Werror || stack test --stack-yaml=stack84.yaml  --ghc-options=-Werror | 
| 93 |  | -        # ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606. | 
| 94 |  | -        displayName: 'stack test --stack-yaml=stack84.yaml --ghc-options=-Werror' | 
| 95 |  | -      - bash: | | 
| 96 |  | -          mkdir -p .azure-cache | 
| 97 |  | -          tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack | 
| 98 |  | -        displayName: "Pack cache" | 
| 99 |  | -      - bash: | | 
| 100 |  | -          set -euo pipefail | 
| 101 |  | -          MESSAGE=$(git log --pretty=format:%s -n1) | 
| 102 |  | -          curl -XPOST \ | 
| 103 |  | -               -i \ | 
| 104 |  | -               -H 'Content-type: application/json' \ | 
| 105 |  | -               --data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \ | 
| 106 |  | -               $(Slack.URL) | 
| 107 |  | -        condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master')) | 
| 108 |  | -  - job: ghcide_stack_88 | 
| 109 |  | -    timeoutInMinutes: 60 | 
| 110 |  | -    pool: | 
| 111 |  | -      vmImage: 'ubuntu-latest' | 
| 112 |  | -    steps: | 
| 113 |  | -      - checkout: self | 
| 114 |  | -      - task: CacheBeta@0 | 
| 115 |  | -        inputs: | 
| 116 |  | -          key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack88.yaml | $(Build.SourcesDirectory)/ghcide.cabal | 
| 117 |  | -          path: .azure-cache | 
| 118 |  | -          cacheHitVar: CACHE_RESTORED | 
| 119 |  | -        displayName: "Cache stack artifacts" | 
| 120 |  | -      - bash: | | 
| 121 |  | -          mkdir -p ~/.stack | 
| 122 |  | -          tar xzf .azure-cache/stack-root.tar.gz -C $HOME | 
| 123 |  | -        displayName: "Unpack cache" | 
| 124 |  | -        condition: eq(variables.CACHE_RESTORED, 'true') | 
| 125 |  | -      - bash: | | 
| 126 |  | -          ./fmt.sh | 
| 127 |  | -        displayName: "HLint via ./fmt.sh" | 
| 128 |  | -      - bash: | | 
| 129 |  | -          sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev | 
| 130 |  | -          if ! which stack >/dev/null 2>&1; then | 
| 131 |  | -              curl -sSL https://get.haskellstack.org/ | sh | 
| 132 |  | -          fi | 
| 133 |  | -        displayName: 'Install Stack' | 
| 134 |  | -      - bash: stack setup --stack-yaml=stack88.yaml | 
| 135 |  | -        displayName: 'stack setup --stack-yaml=stack88.yaml' | 
| 136 |  | -      - bash: stack build --only-dependencies --stack-yaml=stack88.yaml | 
| 137 |  | -        displayName: 'stack build --only-dependencies --stack-yaml=stack88.yaml' | 
| 138 |  | -      - bash: stack test --stack-yaml=stack88.yaml --ghc-options=-Werror || stack test --stack-yaml=stack88.yaml  --ghc-options=-Werror || stack test --stack-yaml=stack88.yaml  --ghc-options=-Werror | 
| 139 |  | -        # ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606. | 
| 140 |  | -        displayName: 'stack test --stack-yaml=stack88.yaml --ghc-options=-Werror' | 
| 141 |  | -      - bash: | | 
| 142 |  | -          mkdir -p .azure-cache | 
| 143 |  | -          tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack | 
| 144 |  | -        displayName: "Pack cache" | 
| 145 |  | -      - bash: | | 
| 146 |  | -          set -euo pipefail | 
| 147 |  | -          MESSAGE=$(git log --pretty=format:%s -n1) | 
| 148 |  | -          curl -XPOST \ | 
| 149 |  | -               -i \ | 
| 150 |  | -               -H 'Content-type: application/json' \ | 
| 151 |  | -               --data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \ | 
| 152 |  | -               $(Slack.URL) | 
| 153 |  | -        condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master')) | 
| 154 |  | -  - job: ghcide_stack_ghc_lib_88 | 
| 155 |  | -    timeoutInMinutes: 60 | 
| 156 |  | -    pool: | 
| 157 |  | -      vmImage: 'ubuntu-latest' | 
| 158 |  | -    steps: | 
| 159 |  | -      - checkout: self | 
| 160 |  | -      - task: CacheBeta@0 | 
| 161 |  | -        inputs: | 
| 162 |  | -          key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack-ghc-lib.yaml | $(Build.SourcesDirectory)/ghcide.cabal | 
| 163 |  | -          path: .azure-cache | 
| 164 |  | -          cacheHitVar: CACHE_RESTORED | 
| 165 |  | -        displayName: "Cache stack artifacts" | 
| 166 |  | -      - bash: | | 
| 167 |  | -          mkdir -p ~/.stack | 
| 168 |  | -          tar xzf .azure-cache/stack-root.tar.gz -C $HOME | 
| 169 |  | -        displayName: "Unpack cache" | 
| 170 |  | -        condition: eq(variables.CACHE_RESTORED, 'true') | 
| 171 |  | -      - bash: | | 
| 172 |  | -          ./fmt.sh | 
| 173 |  | -        displayName: "HLint via ./fmt.sh" | 
| 174 |  | -      - bash: | | 
| 175 |  | -          sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev | 
| 176 |  | -          if ! which stack >/dev/null 2>&1; then | 
| 177 |  | -              curl -sSL https://get.haskellstack.org/ | sh | 
| 178 |  | -          fi | 
| 179 |  | -        displayName: 'Install Stack' | 
| 180 |  | -      - bash: stack setup --stack-yaml=stack-ghc-lib.yaml | 
| 181 |  | -        displayName: 'stack setup --stack-yaml=stack-ghc-lib.yaml' | 
| 182 |  | -      - bash: stack build --only-dependencies --stack-yaml=stack-ghc-lib.yaml | 
| 183 |  | -        displayName: 'stack build --only-dependencies --stack-yaml=stack-ghc-lib.yaml' | 
| 184 |  | -      - bash: stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror || stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror || stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror | 
| 185 |  | -        # ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606. | 
| 186 |  | -        displayName: 'stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror' | 
| 187 |  | -      - bash: | | 
| 188 |  | -          mkdir -p .azure-cache | 
| 189 |  | -          tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack | 
| 190 |  | -        displayName: "Pack cache" | 
| 191 |  | -      - bash: | | 
| 192 |  | -          set -euo pipefail | 
| 193 |  | -          MESSAGE=$(git log --pretty=format:%s -n1) | 
| 194 |  | -          curl -XPOST \ | 
| 195 |  | -               -i \ | 
| 196 |  | -               -H 'Content-type: application/json' \ | 
| 197 |  | -               --data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \ | 
| 198 |  | -               $(Slack.URL) | 
| 199 |  | -        condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master')) | 
|  | 17 | +  - template: ./.azure/linux-stack.yml | 
|  | 18 | +  - template: ./.azure/windows-stack.yml | 
0 commit comments