Skip to content

Commit

Permalink
GitHub ci with nix cachix stack and cabal (#76)
Browse files Browse the repository at this point in the history
* Nix flake file for dev work & CI builds

* Add CI workflow

* Update the Nix Flake for building with GHC 8.10.x and Cabal Install

* Add a Nix Flake for building with Stack & GHC 8.8

* Add a GitHub CI workflow to build with both legacy stack & cabal

* ignore cabal & nix build directories
  • Loading branch information
dysinger authored Feb 4, 2022
1 parent 2ac6f2a commit d060deb
Show file tree
Hide file tree
Showing 6 changed files with 774 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://hydra.iohk.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- uses: cachix/cachix-action@v10
with:
name: scarf
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: cachix,iohk,nix-community
- run: nix build
- run: nix develop --command /usr/bin/env -- bash -c 'hpack && cabal --ghc-options="-Wall -Wcompat -Werror" test'
- run: nix build ./.stack-flake
- run: nix develop ./.stack-flake --command /usr/bin/env -- bash -c 'hpack && cabal --ghc-options="-Wall -Wcompat -Werror" test'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.stack-work/
curl-runnings.cabal
*~
dist-newstyle/
result
328 changes: 328 additions & 0 deletions .stack-flake/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d060deb

Please sign in to comment.