diff --git a/.azure/azure-linux-template.yml b/.azure/azure-linux-template.yml deleted file mode 100644 index bad9eba..0000000 --- a/.azure/azure-linux-template.yml +++ /dev/null @@ -1,38 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 180 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - stack-lts-9: - BUILD: stack - STACK_YAML: stack.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-14: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver lts-14" - nightly: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver nightly" - maxParallel: 6 - steps: - - script: | - export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root; - export PATH=$HOME/.local/bin:$PATH - 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' - stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps - env: - OS_NAME: ${{ parameters.os }} - displayName: 'Build and test' diff --git a/.azure/azure-osx-template.yml b/.azure/azure-osx-template.yml deleted file mode 100644 index 8f45c1c..0000000 --- a/.azure/azure-osx-template.yml +++ /dev/null @@ -1,38 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 120 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - stack-lts-9: - BUILD: stack - STACK_YAML: stack.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-14: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver lts-14" - stack-nightly: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver nightly" - maxParallel: 3 - steps: - - script: | - export PATH=$HOME/.local/bin:$PATH - 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; - stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps - env: - OS_NAME: ${{ parameters.os }} - displayName: 'Build and test' diff --git a/.azure/azure-pipelines.yml b/.azure/azure-pipelines.yml deleted file mode 100644 index 870176e..0000000 --- a/.azure/azure-pipelines.yml +++ /dev/null @@ -1,30 +0,0 @@ -# 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 diff --git a/.azure/azure-windows-template.yml b/.azure/azure-windows-template.yml deleted file mode 100644 index 4d36988..0000000 --- a/.azure/azure-windows-template.yml +++ /dev/null @@ -1,33 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 120 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - 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-14: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver lts-14" - stack-nightly: - BUILD: stack - STACK_YAML: stack.yaml - ARGS: "--resolver nightly" - 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 $ARGS test --bench --no-run-benchmarks - env: - OS_NAME: ${{ parameters.os }} - displayName: 'Build and test' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..22318cb --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tests + +on: [pull_request, push] + +jobs: + build: + name: CI + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + resolver: [nightly, lts-15, lts-14, lts-12, lts-11, lts-9] + + steps: + - name: Setup Stack + uses: mstksg/setup-stack@v1 + + - name: Clone project + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.stack + key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.resolver }}- + + - name: Build and run tests + run: | + set -ex + stack test --fast --no-terminal --resolver=${{ matrix.resolver }}