Move to Azure

This commit is contained in:
Michael Snoyman 2019-04-30 13:19:40 +03:00
parent e7d8a08442
commit 83117bd409
No known key found for this signature in database
GPG Key ID: A048E8C057E86876
3 changed files with 38 additions and 43 deletions

View File

@ -0,0 +1,20 @@
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 120
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- script: |
set -ex
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'
export PATH=$HOME/.local/bin:$PATH
sudo apt-get install libpq-dev
stack test --interleaved-output
set +ex
env:
OS_NAME: ${{ parameters.os }}
displayName: Installation

View File

@ -0,0 +1,18 @@
# 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

View File

@ -1,43 +0,0 @@
# This is the simple Travis configuration, which is intended for use
# on applications which do not require cross-platform and
# multiple-GHC-version support. For more information and other
# options, see:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named .travis.yml
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: c
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
# Ensure necessary system libraries are present
addons:
apt:
packages:
- libgmp-dev
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
install:
# Build dependencies. Start with just haskell-src-exts and then store since
# they require a lot of memory and we want it to build by itself.
- stack --no-terminal --install-ghc build haskell-src-exts
- stack --no-terminal --install-ghc build store
- stack --no-terminal --install-ghc test --only-dependencies
script:
# Build the package, its tests, and its docs and run the tests
- stack --no-terminal test # haddock always fails :( --haddock --no-haddock-deps