Skip to content

Create Github Workflows for compiling all versions of Gogol #4

Create Github Workflows for compiling all versions of Gogol

Create Github Workflows for compiling all versions of Gogol #4

Workflow file for this run

name: Haskell CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# INFO: The following configuration block ensures that only one build runs per branch,
# which may be desirable for projects with a costly build process.
# Remove this block from the CI workflow to let each CI job run to completion.
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build-haskell:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- { lts: "22.27", ghc: "9.6.5" }
steps:
- name: Clone project
uses: actions/checkout@v2
- name: Setup Haskell
id: setup-haskell-stack
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.versions.ghc }}
enable-stack: true
stack-version: 'latest'
cabal-update: false
- name: Cache
uses: actions/cache@v4
with:
key: ${{ matrix.versions.lts }}-${{ github.head_ref }}
restore-keys: |
${{ matrix.versions.lts }}-build-${{ github.head_ref }}-
${{ matrix.versions.lts }}-build-
${{ matrix.versions.lts }}-
path: |
${{ steps.setup-haskell-stack.outputs.stack-root }}
.stack-work
*/.stack-work
- name: Run tests
run: stack test --system-ghc --stack-yaml stack-${{ matrix.versions.ghc }}.yaml
- name: Install dependencies
run: stack build --system-ghc --stack-yaml stack-${{ matrix.versions.ghc }}.yaml --only-dependencies
- name: Build
run: stack build --system-ghc --stack-yaml stack-${{ matrix.versions.ghc }}.yaml