Azure config
This commit is contained in:
parent
c7bb2d22af
commit
772324e8cb
118
.azure/azure-linux-template.yml
Normal file
118
.azure/azure-linux-template.yml
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
jobs:
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
stack-def:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
stack-lts-9:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-lts-9.yaml
|
||||||
|
ARGS: "--resolver lts-9"
|
||||||
|
stack-lts-11:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-11"
|
||||||
|
stack-lts-12:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-12"
|
||||||
|
stack-lts-13:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-13"
|
||||||
|
stack-persistent-2-9:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-persistent-2-9.yaml
|
||||||
|
ARGS: ""
|
||||||
|
stack-persistent-2-10:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-persistent-2-10.yaml
|
||||||
|
ARGS: ""
|
||||||
|
cabal-8.0.2:
|
||||||
|
BUILD: cabal
|
||||||
|
GHCVER: 8.0.2
|
||||||
|
CABALVER: 1.24
|
||||||
|
cabal-8.2.2:
|
||||||
|
BUILD: cabal
|
||||||
|
GHCVER: 8.2.2
|
||||||
|
CABALVER: 2.0
|
||||||
|
cabal-8.4.4:
|
||||||
|
BUILD: cabal
|
||||||
|
GHCVER: 8.4.4
|
||||||
|
CABALVER: 2.2
|
||||||
|
cabal-8.6.5:
|
||||||
|
BUILD: cabal
|
||||||
|
GHCVER: 8.6.5
|
||||||
|
CABALVER: 2.4
|
||||||
|
nightly:
|
||||||
|
BUILD: stack
|
||||||
|
ARGS: "--resolver nightly"
|
||||||
|
pedantic:
|
||||||
|
BUILD: pedantic
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
maxParallel: 6
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||||
|
case "$BUILD" in
|
||||||
|
cabal)
|
||||||
|
sudo add-apt-repository -y ppa:hvr/ghc
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
|
||||||
|
# See note here: https://github.com/haskell-CI/haskell-ci#alex--happy-with-ghc--78
|
||||||
|
if [ "$GHCVER" = "head" ] || [ "${GHCVER%.*}" = "7.8" ] || [ "${GHCVER%.*}" = "7.10" ]; then
|
||||||
|
sudo apt-get install happy-1.19.4 alex-3.1.3
|
||||||
|
export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
|
||||||
|
else
|
||||||
|
sudo apt-get install happy alex
|
||||||
|
fi
|
||||||
|
export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
||||||
|
cabal --version
|
||||||
|
cabal update
|
||||||
|
PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
|
||||||
|
cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
|
stack --install-ghc $ARGS test --bench --only-dependencies
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
set -ex
|
||||||
|
case "$BUILD" in
|
||||||
|
cabal)
|
||||||
|
cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
|
||||||
|
|
||||||
|
ORIGDIR=$(pwd)
|
||||||
|
for dir in $PACKAGES
|
||||||
|
do
|
||||||
|
cd $dir
|
||||||
|
cabal check || [ "$CABALVER" == "1.16" ]
|
||||||
|
cabal sdist
|
||||||
|
PKGVER=$(cabal info . | awk '{print $2;exit}')
|
||||||
|
SRC_TGZ=$PKGVER.tar.gz
|
||||||
|
cd dist
|
||||||
|
tar zxfv "$SRC_TGZ"
|
||||||
|
cd "$PKGVER"
|
||||||
|
cabal configure --enable-tests --ghc-options -O0
|
||||||
|
cabal build
|
||||||
|
if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then
|
||||||
|
cabal test
|
||||||
|
else
|
||||||
|
cabal test --show-details=streaming
|
||||||
|
fi
|
||||||
|
cd $ORIGDIR
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
set +ex
|
||||||
|
env:
|
||||||
|
OS_NAME: ${{ parameters.os }}
|
||||||
|
displayName: 'Installation ${{parameters.os}} & Test'
|
||||||
42
.azure/azure-osx-template.yml
Normal file
42
.azure/azure-osx-template.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
jobs:
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
stack-lts-9:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-lts-9.yaml
|
||||||
|
ARGS: "--resolver lts-9"
|
||||||
|
stack-lts-11:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-11"
|
||||||
|
stack-lts-12:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-12"
|
||||||
|
stack-lts-13:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-13"
|
||||||
|
stack-persistent-2-9:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-persistent-2-9.yaml
|
||||||
|
ARGS: ""
|
||||||
|
stack-persistent-2-10:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-persistent-2-10.yaml
|
||||||
|
ARGS: ""
|
||||||
|
maxParallel: 3
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
curl -skL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
|
||||||
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
|
stack --install-ghc $ARGS test --bench --only-dependencies
|
||||||
|
stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
|
||||||
|
env:
|
||||||
|
OS_NAME: ${{ parameters.os }}
|
||||||
|
displayName: 'Installation ${{parameters.os}} & Test'
|
||||||
30
.azure/azure-pipelines.yml
Normal file
30
.azure/azure-pipelines.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# This is the complex Azure configuration, which is intended for use
|
||||||
|
# on open source libraries which need compatibility across multiple GHC
|
||||||
|
# versions, must work with cabal-install, and should be
|
||||||
|
# cross-platform. For more information and other options, see:
|
||||||
|
#
|
||||||
|
# https://docs.haskellstack.org/en/stable/azure_ci/
|
||||||
|
#
|
||||||
|
# Copy these contents into the root directory of your Github project in a file
|
||||||
|
# named azure-pipelines.yml
|
||||||
|
#
|
||||||
|
# For better organization, you split various jobs into seprate parts
|
||||||
|
# and each of them are controlled via individual file.
|
||||||
|
jobs:
|
||||||
|
- template: azure-linux-template.yml
|
||||||
|
parameters:
|
||||||
|
name: Linux
|
||||||
|
vmImage: ubuntu-16.04
|
||||||
|
os: linux
|
||||||
|
|
||||||
|
- template: azure-osx-template.yml
|
||||||
|
parameters:
|
||||||
|
name: macOS
|
||||||
|
vmImage: macOS-10.13
|
||||||
|
os: osx
|
||||||
|
|
||||||
|
- template: azure-windows-template.yml
|
||||||
|
parameters:
|
||||||
|
name: Windows
|
||||||
|
vmImage: vs2017-win2016
|
||||||
|
os: windows
|
||||||
34
.azure/azure-windows-template.yml
Normal file
34
.azure/azure-windows-template.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
jobs:
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
stack-lts-9:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack-lts-9.yaml
|
||||||
|
ARGS: "--resolver lts-9"
|
||||||
|
stack-lts-11:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-11"
|
||||||
|
stack-lts-12:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-12"
|
||||||
|
stack-lts-13:
|
||||||
|
BUILD: stack
|
||||||
|
STACK_YAML: stack.yaml
|
||||||
|
ARGS: "--resolver lts-13"
|
||||||
|
maxParallel: 3
|
||||||
|
steps:
|
||||||
|
- bash: |
|
||||||
|
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
|
||||||
|
curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip
|
||||||
|
unzip -o /usr/bin/stack.zip -d /usr/bin/
|
||||||
|
stack setup $ARGS > /dev/null
|
||||||
|
stack --install-ghc $ARGS test --bench --only-dependencies
|
||||||
|
stack $ARGS test --bench --no-run-benchmarks
|
||||||
|
env:
|
||||||
|
OS_NAME: ${{ parameters.os }}
|
||||||
|
displayName: 'Installation ${{parameters.os}} & Test'
|
||||||
Loading…
Reference in New Issue
Block a user