57 lines (48 loc) · 1.51 KB
/
haskell.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
ghc: [ "8.10.7", "9.2.4" ]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- name: Other Packages
run: |
sudo apt update
sudo apt purge aspnetcore* dotnet* firefox powershell
sudo apt upgrade
sudo apt install -y pkg-config libsodium-dev libsecp256k1-dev libsystemd-dev
- uses: haskell/actions/setup@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
- name: Copy cabal.project.local
shell: bash
run: |
cp .github/workflows/cabal.project.local.ci cabal.project.local
echo "# cabal.project.local"
cat cabal.project.local
- uses: actions/cache@v2
name: Cache ~/.cabal/store
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: |
# cabal build all -j --enable-tests --enable-benchmarks
cabal build all -j --dependencies-only
- name: Test
run: |
# cabal test all -j