Skip to content
Merged
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
2 changes: 0 additions & 2 deletions .ghci

This file was deleted.

104 changes: 52 additions & 52 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
name: github-action

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1', '9.8.2', '9.10.1', '9.12.1']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:

- uses: actions/checkout@v3

- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.3.0'

- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.ghc }}-build-
${{ runner.os }}-${{ matrix.ghc }}-
${{ runner.os }}

- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks

- name: Build
run: cabal build --enable-tests --enable-benchmarks all

- name: Run tests
# We don't run hlint tests, because different versions of hlint have different suggestions, and we don't want to worry about satisfying them all.
run: cabal test --enable-tests -f-hlint all

- if: matrix.ghc != '8.4.4'
# docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
name: Build Docs
run: cabal haddock
#name: github-action
#
#on: [push, pull_request]
#
#jobs:
# build:
# strategy:
# fail-fast: false
# matrix:
# ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1', '9.8.2', '9.10.1', '9.12.1']
# os: ['ubuntu-latest', 'macos-latest']
# runs-on: ${{ matrix.os }}
#
# name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
# steps:
#
# - uses: actions/checkout@v3
#
# - uses: haskell/actions/setup@v2
# with:
# ghc-version: ${{ matrix.ghc }}
# cabal-version: '3.10.3.0'
#
# - name: Cache
# uses: actions/cache@v3
# env:
# cache-name: cache-cabal
# with:
# path: ~/.cabal
# key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
# restore-keys: |
# ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
# ${{ runner.os }}-${{ matrix.ghc }}-build-
# ${{ runner.os }}-${{ matrix.ghc }}-
# ${{ runner.os }}
#
# - name: Install dependencies
# run: |
# cabal update
# cabal build --only-dependencies --enable-tests --enable-benchmarks
#
# - name: Build
# run: cabal build --enable-tests --enable-benchmarks all
#
# - name: Run tests
# # We don't run hlint tests, because different versions of hlint have different suggestions, and we don't want to worry about satisfying them all.
# run: cabal test --enable-tests -f-hlint all
#
# - if: matrix.ghc != '8.4.4'
# # docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
# name: Build Docs
# run: cabal haddock
59 changes: 59 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: nix

on:
pull_request:
push:
branches: [ develop, master ]

env:
# The nix every job installs. release.nix evaluates through
# import-from-derivation.
EXTRA_NIX_CONFIG: |
experimental-features = nix-command flakes
allow-import-from-derivation = true
extra-substituters = https://cache.iog.io https://nixcache.reflex-frp.org
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=

jobs:
# The `-A` path of every cell of release.nix, for the smoke matrix. The
# parts state their cells from their matrix lists, so this evaluation
# builds nothing.
nix-attrs:
# A pull request whose head is `develop` or `master` in this repository
# gets the push run for the same commit, so its own run is skipped. The
# jobs below need this one, so the skip covers the whole run. The branch
# list repeats the push trigger's: an expression cannot read it.
if: >-
github.event_name == 'push'
|| github.event.pull_request.head.repo.full_name != github.repository
|| !contains(fromJSON('["develop", "master"]'), github.head_ref)
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.eval.outputs.paths }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: ${{ env.EXTRA_NIX_CONFIG }}
- name: Evaluate release.nix -A attr-paths
id: eval
run: |
paths=$(nix-instantiate --eval --strict --json --read-write-mode release.nix -A attr-paths)
echo "paths=$paths" >> "$GITHUB_OUTPUT"

# One build per cell, each on its own runner. A broken cell cancels no
# other build.
nix-smoke:
needs: nix-attrs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
attr: ${{ fromJSON(needs.nix-attrs.outputs.paths) }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: ${{ env.EXTRA_NIX_CONFIG }}
- name: Build release.nix -A ${{ matrix.attr }}
run: nix-build release.nix -A ${{ matrix.attr }} --keep-going --no-out-link
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
dist
result
result-*
cabal.sandbox.config
cabal.project.local
.cabal-sandbox/
Expand Down
Loading
Loading