Skip to content

Enable macos back

Enable macos back #723

Workflow file for this run

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 8 * * 3'
jobs:
stack:
name: ${{ matrix.os }} / ${{ matrix.snapshot }}
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.snapshot == 'nightly' }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- macOS
- windows
snapshot:
- 'lts-12.11'
- 'lts-14.18'
- 'lts-16.12'
- 'lts-18.28'
- 'lts-19.33'
- 'lts-20.26'
- 'lts-21.25'
- 'lts-22.18'
- 'nightly'
steps:
- uses: actions/checkout@main
- uses: haskell-actions/setup@main
name: Setup Haskell Stack
id: setuphaskell
with:
enable-stack: true
stack-no-global: true
- uses: actions/cache/restore@v4
name: Cache stack files
with:
path: ${{ steps.setuphaskell.outputs.stack-root }}
key: ${{ runner.os }}-${{ matrix.snapshot }}-stack2
- name: Setup stack.yaml
shell: bash
run: |
set -x
mv -vf "stack-ci.yaml" ./stack.yaml || true
mv -vf "stack-${{ matrix.snapshot }}.yaml" ./stack.yaml || true
mv -vf "stack-${{ matrix.snapshot }}-${{ matrix.os }}.yaml" ./stack.yaml || true
- name: Build and test
shell: bash
run: |
set -x
grep . stack.yaml
if grep SKIP stack.yaml; then
echo Skipped because that snapshot is broken
exit 0
fi
stack setup --resolver=${{ matrix.snapshot }}
echo "stack_root: ${{ steps.setuphaskell.outputs.stack-root }}"
stack --version
stack --resolver=${{ matrix.snapshot }} ghc -- --version
# we first build everything without running the tests (with unlimited parallelism)
stack build --resolver=${{ matrix.snapshot }} --ghc-options=-Werror --test --bench --no-run-tests
# once that's done we run the tests in a single threaded fashion to avoid
# https://github.com/commercialhaskell/stack/issues/5024#issuecomment-845001389
stack build --resolver=${{ matrix.snapshot }} --ghc-options=-Werror --test --bench -j 1
- uses: actions/cache/save@v4
if: always()
with:
path: ${{ steps.setuphaskell.outputs.stack-root }}
key: ${{ runner.os }}-${{ matrix.snapshot }}-stack2