Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
HuwCampbell committed Nov 9, 2023
1 parent 29ad69e commit 1503587
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 1 deletion.
93 changes: 93 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Haskell CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- cabal: "3.8.1"
ghc: "8.8.4"
os: ubuntu-latest
- cabal: "3.8.1"
ghc: "9.0.2"
os: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Freeze
run: |
cabal configure
cabal freeze
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

- name: Build
run: |
cabal build all
- name: Test x-aeson
run: |
cabal test x-aeson
- name: Test x-attoparsec
run: |
cabal test x-attoparsec
- name: Test x-bytestring
run: |
cabal test x-bytestring
- name: Test x-conduit
run: |
cabal test x-conduit
- name: Test x-eithert
run: |
cabal test x-eithert
- name: Test x-exception
run: |
cabal test x-exception
- name: Test x-file-embed
run: |
cabal test x-file-embed
- name: Test x-optparse
run: |
cabal test x-optparse
- name: Test x-show
run: |
cabal test x-show
- name: Test x-templatehaskell
run: |
cabal test x-templatehaskell
- name: Test x-vector
run: |
cabal test x-vector
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# X
### A collection of extra combinator libraries.

[![Build Status](https://api.travis-ci.com/icicle-lang/x.svg?branch=master)](https://travis-ci.com/icicle-lang/x)
[![Build Status](https://github.com/icicle-lang/x/actions/workflows/haskell.yml/badge.svg)](https://github.com/icicle-lang/x/actions/workflows/haskell.yml)

</div>

Expand Down
32 changes: 32 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,35 @@ packages:
constraints:
cabal > 2

package x-optparse
tests: True

package x-bytestring
tests: True

package x-eithert
tests: True

package x-attoparsec
tests: True

package x-exception
tests: True

package x-conduit
tests: True

package x-vector
tests: True

package x-templatehaskell
tests: True

package x-show
tests: True

package x-aeson
tests: True

package x-file-embed
tests: True

0 comments on commit 1503587

Please sign in to comment.