-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from adjoint-io/actions-ci
Setup Github Actions
- Loading branch information
Showing
10 changed files
with
221 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Cabal CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: cabal ${{ matrix.ghc }} | ||
runs-on: ubuntu-16.04 | ||
strategy: | ||
matrix: | ||
ghc: ["8.8.1", "8.6.5", "8.6.4", "8.6.3", "8.6.2"] | ||
cabal: ["3.0"] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-haskell@v1 | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache ~/.cabal/packages | ||
with: | ||
path: ~/.cabal/packages | ||
key: cabal-packages-${{ matrix.ghc }} | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ~/.cabal/store | ||
key: cabal-store-${{ matrix.ghc }} | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache dist-newstyle | ||
with: | ||
path: dist-newstyle | ||
key: dist-newstyle-${{ matrix.ghc }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
cabal update | ||
- name: Build | ||
run: | | ||
cabal new-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: HLint CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: hlint | ||
runs-on: ubuntu-16.04 | ||
strategy: | ||
matrix: | ||
ghc: ["8.8.1"] | ||
cabal: ["3.0"] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-haskell@v1 | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache ~/.cabal/packages | ||
with: | ||
path: ~/.cabal/packages | ||
key: cabal-packages | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ~/.cabal/store | ||
key: cabal-store | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache dist-newstyle | ||
with: | ||
path: dist-newstyle | ||
key: dist-newstyle | ||
|
||
- name: Install hlint | ||
run: | | ||
cabal update | ||
cabal new-install hlint --installdir=dist-newstyle | ||
- name: Run hlint | ||
run: | | ||
dist-newstyle/hlint -g -e=hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Stack CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
|
||
jobs: | ||
build: | ||
name: stack ${{ matrix.plan.resolver }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
plan: | ||
- { build: stack, resolver: "lts-13" } # redundant because lts-14 checks ghc-8.6 already | ||
- { build: stack, resolver: "lts-14" } # ghc-8.6.5 | ||
#- { build: stack, resolver: "nightly" } | ||
include: [] | ||
exclude: | ||
- os: macOS-latest | ||
plan: | ||
build: cabal | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install OS Packages | ||
uses: mstksg/get-package@v1 | ||
with: | ||
apt-get: ${{ matrix.apt-get }} | ||
brew: ${{ matrix.brew }} | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup stack | ||
uses: mstksg/setup-stack@v1 | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache .stack-work | ||
with: | ||
path: .stack-work | ||
key: stack-work | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: stack | ||
|
||
- name: Install dependencies | ||
run: | | ||
set -ex | ||
stack --no-terminal --install-ghc --resolver $ARGS test --bench --only-dependencies | ||
set +ex | ||
env: | ||
ARGS: ${{ matrix.plan.resolver }} | ||
BUILD: ${{ matrix.plan.build }} | ||
|
||
- name: Build | ||
run: | | ||
set -ex | ||
stack --no-terminal --resolver $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps | ||
set +ex | ||
env: | ||
ARGS: ${{ matrix.plan.resolver }} | ||
BUILD: ${{ matrix.plan.build }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- ignore: {name: Avoid lambda} | ||
- ignore: {name: Eta reduce} | ||
- ignore: {name: Redundant lambda} | ||
- ignore: {name: Collapse lambdas} | ||
- ignore: {name: Use String} | ||
- ignore: {name: Reduce duplication} | ||
- ignore: {name: Redundant bracket} | ||
- ignore: {name: Redundant if} | ||
- ignore: {name: Use list comprehension} | ||
- ignore: {name: Use section} | ||
- ignore: {name: Use &&} | ||
- ignore: {name: Replace case with fromMaybe} | ||
- ignore: {name: "Use :"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,35 @@ | ||
{ pkgs ? import <nixpkgs> {} | ||
{ mkDerivation, aeson, base, bulletproofs, containers, criterion | ||
, elliptic-curve, filepath, galois-fft, galois-field, hpack | ||
, markdown-unlit, MonadRandom, pairing, poly, process-extras | ||
, protolude, QuickCheck, quickcheck-instances, semirings, stdenv | ||
, tasty, tasty-discover, tasty-hunit, tasty-quickcheck, text | ||
, vector, wl-pprint-text | ||
}: | ||
pkgs.haskellPackages.developPackage { | ||
root = ./.; | ||
mkDerivation { | ||
pname = "arithmetic-circuits"; | ||
version = "0.2.0"; | ||
src = ./arithmetic-circuits; | ||
libraryHaskellDepends = [ | ||
aeson base bulletproofs containers elliptic-curve filepath | ||
galois-fft galois-field MonadRandom poly process-extras protolude | ||
semirings text vector wl-pprint-text | ||
]; | ||
libraryToolDepends = [ hpack ]; | ||
testHaskellDepends = [ | ||
aeson base bulletproofs containers elliptic-curve filepath | ||
galois-fft galois-field markdown-unlit MonadRandom pairing poly | ||
process-extras protolude QuickCheck quickcheck-instances semirings | ||
tasty tasty-discover tasty-hunit tasty-quickcheck text vector | ||
wl-pprint-text | ||
]; | ||
testToolDepends = [ markdown-unlit tasty-discover ]; | ||
benchmarkHaskellDepends = [ | ||
aeson base bulletproofs containers criterion elliptic-curve | ||
filepath galois-fft galois-field MonadRandom pairing poly | ||
process-extras protolude semirings text vector wl-pprint-text | ||
]; | ||
prePatch = "hpack"; | ||
homepage = "https://github.com/adjoint-io/arithmetic-circuits#readme"; | ||
description = "Arithmetic circuits for zkSNARKs"; | ||
license = stdenv.lib.licenses.mit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{-# LANGUAGE PackageImports #-} | ||
module Test.QAP where | ||
|
||
import Protolude | ||
|