Skip to content
Draft
Show file tree
Hide file tree
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
20 changes: 7 additions & 13 deletions .github/workflows/ci.dhall
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
let haskellCi = https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall
let haskellCi =
https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall

in haskellCi.generalCi
haskellCi.matrixSteps
( Some
{ ghc =
[ haskellCi.GHC.GHC8104
, haskellCi.GHC.GHC884
]
, cabal = [ haskellCi.Cabal.Cabal32 ]
}
)
// { on = [ haskellCi.Event.push
, haskellCi.Event.pull_request ]
}
haskellCi.defaultCabalSteps
haskellCi.DhallMatrix::{
, ghc =
[ haskellCi.GHC.GHC963, haskellCi.GHC.GHC947, haskellCi.GHC.GHC928 ]
}
: haskellCi.CI.Type
10 changes: 6 additions & 4 deletions .github/workflows/ci.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env bash
# Script by @fisx

set -eo pipefail

# cd into the dir where this script is placed
cd "$( dirname "${BASH_SOURCE[0]}" )"

echo "regenerating .github/workflows/ci.yaml..."
echo "regenerating .github/workflows/ci.yaml"

# based on https://github.com/vmchale/github-actions-dhall
which dhall-to-yaml || cabal install dhall-yaml
dhall-to-yaml --file ci.dhall > ci.yaml
which dhall-to-yaml-ng || cabal install dhall-yaml
dhall-to-yaml-ng --generated-comment --file ci.dhall > ci.yaml
81 changes: 45 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
# Code generated by dhall-to-yaml. DO NOT EDIT.
jobs:
build:
runs-on: ubuntu-20.04
name: "GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}, OS ${{ matrix.os }}"
"runs-on": "${{ matrix.os }}"
steps:
- uses: "actions/checkout@v1"
- id: setup-haskell-cabal
uses: "haskell/actions/setup@v1.2"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- name: Update Hackage repository
run: cabal update
- name: cabal.project.local.ci
run: |
if [ -e cabal.project.local.ci ]; then
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: cabal freeze
- uses: "actions/cache@v2"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle"
- name: Install dependencies
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
- name: build all
run: cabal build all --enable-tests --enable-benchmarks
- name: test all
run: cabal test test-hslice --enable-tests
- name: haddock all
run: cabal haddock all
- uses: "actions/checkout@v4"
with:
submodules: recursive
- id: "setup-haskell-cabal"
uses: "haskell-actions/setup@v2"
with:
"cabal-version": "${{ matrix.cabal }}"
"ghc-version": "${{ matrix.ghc }}"
- name: Update Hackage repository
run: cabal update
- name: cabal.project.local.ci
run: |
if [ -e cabal.project.local.ci ]; then
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: "cabal freeze --enable-tests --enable-benchmarks"
- uses: "actions/cache@v3"
with:
key: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal}}-${{ hashFiles('cabal.project.freeze') }}"
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
- name: Install dependencies
run: "cabal build all --enable-tests --enable-benchmarks --only-dependencies"
- name: build all
run: "cabal build all --enable-tests --enable-benchmarks"
- name: test all
run: "cabal test all --enable-tests"
- name: haddock all
run: cabal haddock all
strategy:
matrix:
cabal:
- '3.4'
- '3.10'
ghc:
- '9.0.2'
- '8.10.4'
- '8.8.4'
- '9.6.3'
- '9.4.7'
- '9.2.8'
os:
- "ubuntu-latest"
name: Haskell CI
on:
- push
- pull_request
'on':
pull_request: {}
push: {}
schedule:
- cron: "4 20 10 * *"