-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (50 loc) · 1.46 KB
/
ci.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
name: CI
on:
push:
branches: [main]
pull_request:
branches:
- '*'
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# with:
# submodules: true
- name: submodule checkout (partially complete)
run: |
sed -i 's/[email protected]:/https:\/\/github.com\//g' .gitmodules
sed -i 's/[email protected]:/https:\/\/gitlab.com\//g' .gitmodules
git submodule sync --recursive || true
git submodule update --init --recursive || true
# git submodule update --init
- uses: haskell/actions/setup@v2
with:
ghc-version: '9.2.7' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-stack
with:
path: ~/.stack
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: |
sudo apt-get update
sudo apt-get install -y graphviz libghc-curl-dev
- run: stack build
- run: stack test
- run: time stack run -- write BSD-3-Clause
- uses: actions/upload-artifact@v2
with:
name: out
path: _out