Commit 41f3737f authored by Yuki's avatar Yuki
Browse files

Use nix for CI

parent 0688ba23
image: haskell:8
image: nixos/nix:latest
stages:
- lint
- basic
- build
lint:hlint:
stage: lint
basic:hlint:
stage: basic
before_script:
- cabal update
- cabal install hlint
- nix-env -iA nixpkgs.hlint
script:
- hlint Lib Exec
lint:brittany:
stage: lint
basic:brittany:
stage: basic
before_script:
- cabal update
- cabal install brittany
- nix-env -iA nixpkgs.haskellPackages.brittany nixpkgs.git
script:
- find Exec Lib -name "*.hs" -exec brittany --write-mode=inplace {} \;
- find Exec Lib -name '*.hs' -exec brittany --write-mode=inplace {} \;
- git diff --exit-code
build:cabal:
stage: build
basic:cabal2nix:
stage: basic
before_script:
- cabal update
- nix-env -iA nixpkgs.cabal2nix nixpkgs.git
script:
- cabal2nix . > default.nix
- git diff --exit-code
build:nix:
stage: build
script:
- cabal build
- nix-build release.nix
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment