Skip to content

Commit

Permalink
Add Stack CI for GHC 8.0 - 9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed May 5, 2024
1 parent 3ad7f16 commit c1b80f2
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Stack build

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Stack ${{ matrix.ghc }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4', '8.2', '8.0']
include:
- os: macos-latest
ghc: '9.8'
- os: windows-latest
ghc: '9.8'

steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
cabal-update: false

- name: Restore cache
uses: actions/cache/restore@v4
id: cache
env:
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}
with:
key: ${{ env.key }}-commit-${{ github.sha }}
restore-keys: ${{ env.key }}-
path: |
${{ steps.setup.outputs.stack-root }}
.stack-work
- name: Build dependencies
run: stack build --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc --only-dependencies

- name: Build
run: stack build --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc

- name: Build tests
run: stack test --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc --no-run-tests

- name: Run tests
run: stack test --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc

- name: Save cache
uses: actions/cache/save@v4
if: always() && steps.cache.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache.outputs.cache-primary-key }}
path: |
${{ steps.setup.outputs.stack-root }}
.stack-work
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/dist-newstyle/
*.nix
/.stack-work/
*.nix
stack*.yaml.lock
10 changes: 10 additions & 0 deletions stack-8.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resolver: lts-9.21

extra-deps:
- generic-data-0.3.0.0
- base-orphans-0.8
- show-combinators-0.1.0.0

allow-newer: true
allow-newer-deps:
- profunctors
1 change: 1 addition & 0 deletions stack-8.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.28
5 changes: 5 additions & 0 deletions stack-8.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-11.22

extra-deps:
- generic-data-0.3.0.0
- base-orphans-0.8
5 changes: 5 additions & 0 deletions stack-8.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-12.26

extra-deps:
- generic-data-0.3.0.0
- base-orphans-0.8
1 change: 1 addition & 0 deletions stack-8.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-14.27
1 change: 1 addition & 0 deletions stack-8.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-16.31
1 change: 1 addition & 0 deletions stack-9.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-19.33
1 change: 1 addition & 0 deletions stack-9.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-20.26
1 change: 1 addition & 0 deletions stack-9.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-21.25
1 change: 1 addition & 0 deletions stack-9.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-22.20
1 change: 1 addition & 0 deletions stack-9.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2024-05-05

0 comments on commit c1b80f2

Please sign in to comment.