Skip to content

CI: Upgrade to latest version of Haskell setup action #3

CI: Upgrade to latest version of Haskell setup action

CI: Upgrade to latest version of Haskell setup action #3

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Stack
uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Cache Stack build files
uses: actions/cache@v2
with:
path: |
~/.stack
.stack-work
key: >-
${{ runner.os }}-stack-${{
hashFiles('stack.yaml.lock', 'package.yaml') }}
restore-keys: |
${{runner.os}}-stack
- name: Test
run: stack test --ghc-options="-O2"
- name: Copy binary to ~/.local/bin so it can be uploaded
run: stack install
- name: Upload ${{ runner.os }} Release
uses: actions/upload-artifact@v2
with:
path: ~/.local/bin/haskell-template
name: haskell-template_${{ runner.os }}_${{ runner.arch }}