Skip to content

feat(Makefile): add stack support, default to cabal #26

feat(Makefile): add stack support, default to cabal

feat(Makefile): add stack support, default to cabal #26

Workflow file for this run

name: Haskell CI (Stack)
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
stack:
name: Stack LTS 22.44 on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: '9.6'
enable-stack: true
- name: Show toolchain versions
shell: bash
run: |
ghc --numeric-version
stack --numeric-version
- name: Cache Stack global package DB
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache Stack work directory
uses: actions/cache@v4
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-
${{ runner.os }}-stack-work-
- name: Build dependencies
run: stack build --system-ghc --only-dependencies --test
- name: Build the package
run: stack build --system-ghc
- name: Run tests
run: stack test --system-ghc