Skip to content

Commit 446d43a

Browse files
authored
Merge pull request #95 from tweag/ci/github-action
Add github-action based continuous integration
2 parents 1123f92 + d06b9ea commit 446d43a

File tree

3 files changed

+66
-9
lines changed

3 files changed

+66
-9
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Continuous integration
2+
on: [push, pull_request]
3+
env:
4+
# Bump this number to invalidate the Github-actions cache
5+
cache-invalidation-key: 0
6+
jobs:
7+
tests:
8+
name: Build & Test
9+
env:
10+
NIXSHELL: nix-shell --pure
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- uses: cachix/install-nix-action@v12
15+
with:
16+
nix_path: nixpkgs=channel:nixos-unstable
17+
- name: Build Nix dependencies
18+
run: $NIXSHELL --run "echo '=== Installed ==='"
19+
- name: Cache Cabal dependencies
20+
uses: actions/cache@v2
21+
with:
22+
path: |
23+
~/.cabal/packages
24+
~/.cabal/store
25+
dist-newstyle
26+
key: cache-${{ runner.os }}-${{ hashFiles('nixpkgs.nix') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-${{ github.sha }}
27+
restore-keys: cache-${{ runner.os }}-${{ hashFiles('nixpkgs.nix') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-
28+
- name: Update Cabal's database
29+
run: $NIXSHELL --run "cabal update"
30+
- name: Build Cabal's dependencies
31+
run: $NIXSHELL --run "cabal build --enable-tests --enable-benchmarks --dependencies-only"
32+
- name: Build
33+
run: $NIXSHELL --run "cabal build --flag=dev "
34+
- name: Test
35+
run: $NIXSHELL --run "cabal --flag=dev test"
36+
- name: Haddock
37+
run: $NIXSHELL --run "cabal haddock"

.gitignore

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
1-
# Stack
2-
.stack-work
31

4-
# Cabal
5-
dist/
2+
# Created by https://www.toptal.com/developers/gitignore/api/haskell
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=haskell
4+
5+
### Haskell ###
6+
dist
7+
dist-*
8+
cabal-dev
9+
*.o
10+
*.hi
11+
*.hie
12+
*.chi
13+
*.chs.h
14+
*.dyn_o
15+
*.dyn_hi
16+
.hpc
17+
.hsenv
18+
.cabal-sandbox/
19+
cabal.sandbox.config
20+
*.prof
21+
*.aux
22+
*.hp
23+
*.eventlog
24+
.stack-work/
25+
cabal.project.local
26+
cabal.project.local~
27+
.HTF/
28+
.ghc.environment.*
29+
30+
# End of https://www.toptal.com/developers/gitignore/api/haskell

0 commit comments

Comments
 (0)