-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 1.9 KB
/
ci.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build project
on: push
jobs:
build:
name: Build master with ${{ matrix.ghc }} / ${{ matrix.cabal }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['9.6.2']
cabal: ['3.10.1.0']
os: ['ubuntu-20.04'']
steps:
- name: 'GitHub actions env workaround'
run: 'echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV'
# Setup
- name: Checkout repository
uses: actions/checkout@v1
# Haskell Setup
- name: Install GHC and Cabal
uses: haskell/actions/[email protected]
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Confirm GHC and Cabal installation
run: |
ghc --version
cabal --version
# Project Setup
- uses: actions/cache@v2
name: Cache dist-newstyle
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-4-cabal
# Build
- name: Update package database
run: cabal update
- name: Display outdated packages
run: cabal outdated
- name: Install build dependencies
run: cabal build --only-dependencies
- name: Build
run: cabal build
# Upload artifacts
- name: Copy build txg artifact (txg)
run: cp `cabal list-bin exe:txg` .
- name: Copy build artifact (mempool-p2p-tester)
run: cp `cabal list-bin exe:mempool-p2p-tester` .
- name: Stripping txg binary
run: strip txg
- uses: actions/upload-artifact@v2
with:
name: txg-build-${{ matrix.os }}
path: txg
- name: Stripping mempool-p2p-tester binary
run: strip mempool-p2p-tester
- uses: actions/upload-artifact@v2
with:
name: txg-build-${{ matrix.os }}
path: mempool-p2p-tester
# Test
- name: Test
run: cabal v2-test