-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (80 loc) · 2.17 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Haskell CI
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# run at the start of every day
- cron: '0 0 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: ['9.0', '9.8']
os: [ubuntu-20.04]
name: ${{ matrix.os }} GHC ${{ matrix.ghc }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Haskell
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
- name: configure
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build --dry-run
- name: Restore cached dependencies
uses: actions/cache/restore@v4
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies
- name: save cached dependencies
uses: actions/cache/save@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: build
run: cabal build all
# TODO
# - name: check
# run: cabal check
- name: document
run: cabal haddock
- name: checkout icestorm
uses: actions/checkout@v4
with:
repository: YosysHQ/icestorm
path: icestorm
- name: install icestorm
working-directory: icestorm
run: |
make
sudo make install
- name: checkout yosys
uses: actions/checkout@v4
with:
repository: YosysHQ/yosys
ref: main
path: yosys
submodules: true
- name: install yosys
working-directory: yosys
run: |
make -j$(nproc)
sudo make install
- name: test
run: cabal run test