Skip to content

Accepts multiple GIVETH variables #1671

Accepts multiple GIVETH variables

Accepts multiple GIVETH variables #1671

Workflow file for this run

name: Haskell CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
enable-stack: true
- name: Cache Haskell stack
uses: actions/cache@v4
env:
cache-name: cache-stack
with:
path: ~/.stack
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('lib/haskell/**/package.yaml','lib/haskell/**/stack.yaml.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('lib/haskell/**/package.yaml','lib/haskell/**/stack.yaml.lock') }}
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('lib/haskell/**/package.yaml') }}
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Ubuntu Prerequisites (libpcre)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install libpcre3-dev
- name: Install MacOS Prerequisites (libpcre)
if: startsWith(matrix.os, 'macOS')
run: |
wget https://ftp.exim.org/pub/pcre/pcre-8.45.tar.gz
tar -xvf pcre-8.45.tar.gz
cd pcre-8.45
./configure
make
sudo make install
- name: Build and test
run: stack test
working-directory: lib/haskell
- name: Check that generate .cabal files are up-to-date
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -sSL https://raw.githubusercontent.com/sol/hpack/main/get-hpack.sh | bash
find -name 'package.yaml' -exec hpack '{}' \; && git diff --color --exit-code