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

Simplified test suite that runs on Windows and MacOS #238

Merged
merged 5 commits into from
May 21, 2023
Merged
Changes from all commits
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
83 changes: 83 additions & 0 deletions .github/workflows/haskell-ci-simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build
on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
main:
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc:
- "8.0.2"
- "8.2.2"
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
- "9.2.7"
- "9.4.5"
- "9.6.1"
steps:
- uses: actions/checkout@v3

- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
cabal-update: true

- uses: actions/cache@v3
name: Cache cabal stuff
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}

- name: Versions
run: |
cabal --version

- name: Install alex & happy
run: |
cd ../
cabal install alex happy

- name: Unpack
run: |
cp src/Parser.y src/Parser.y.boot
cp src/Scan.x src/Scan.x.boot
cabal sdist --ignore-project --output-directory .
cabal get alex-*.tar.gz

- name: Build
run: |
cd alex-*/
cabal build all --enable-tests --enable-benchmarks

- name: Test
run: |
cd alex-*/
export ALEX=$(cabal list-bin alex)
cabal run --enable-tests alex:test:tests

- name: Haddock
run: |
cd alex-*/
cabal haddock --disable-documentation --haddock-all all

- name: Cabal check
run: |
cd alex-*/
cabal check