Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Stackage LTS 20.26 #242

Merged
merged 4 commits into from
May 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 36 additions & 16 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Haskell CI
name: Stack CI

on:
push:
Expand All @@ -15,35 +15,55 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install required libraries
run: >-
sudo apt install
z3

# Use preinstalled Stack. Should Stack fail to be installed, use the setup action:
# - name: Setup Haskell
# uses: haskell-actions/setup@v2
# with:
# enable-stack: true
# stack-no-global: true

- name: Cache Stack build artifacts (user + project)
uses: actions/cache@v3
- name: Restore Stack build artifacts (user + project)
uses: actions/cache/restore@v4
id: cache
with:
path: |
~/.stack
.stack-work
# best effort for cache: tie it to Stack resolver and package config
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
# Write a fresh cache each time
key: ${{ runner.os }}-stack-${{ github.sha }}
restore-keys: |
${{ runner.os }}-stack


- name: Setup Haskell
uses: actions/setup-haskell@v1

- name: Install GHC using Stack
if: steps.ghc.outputs.cache-hit != 'true'
run: stack setup --install-ghc

- name: Build
run: stack build
- name: Setup Stack
run: stack setup

- name: Build dependencies
run: stack test --only-dependencies

# This step only consumes an extra minute without gains.
# - name: Build w/o tests
# run: stack build

- name: Build w/ tests
run: stack test --no-run-tests

- name: Run tests
run: stack test

# Always cache dependencies.
# This makes esp. sense now that some tests are broken.
- name: Cache Stack build artifacts (user + project)
buggymcbugfix marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/cache/save@v4
if: always() && steps.cache.outputs.cache-hit != 'true'
with:
path: |
~/.stack
.stack-work
key: ${{ steps.cache.outputs.cache-primary-key }}
Loading