-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (63 loc) · 2.1 KB
/
ubuntu.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
name: CI (Ubuntu)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install libgc-dev
sudo apt-get install dwdiff
# GitHub-hosted runners provide Haskell Stack
# https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
# - name: Install Haskell Stack
# run: wget -qO- https://get.haskellstack.org/ | sh
- name: Verify dependencies
run: |
dpkg -s llvm
dpkg -s clang
dpkg -s libgc-dev
dpkg -s dwdiff
llc --version
clang --version
llvm-config --version
# cache Haskell Stack stuff
- name: Cache stack global package db
uses: actions/cache@v1
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}
# drop the cache if stack.yaml has been changed
- name: Cache stack-installed programs in ~/.local/bin
uses: actions/cache@v1
with:
path: ~/.local/bin
key: ${{ runner.os }}-stack-programs-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-programs-${{ hashFiles('stack.yaml') }}
- name: Cache .stack-work
uses: actions/cache@v1
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
- name: Install & build Haskell Stack dependencies
run: stack build --only-dependencies
- name: Build
run: make
- name: Run tests
run: make test || (echo "ERRS:" ; cat ERRS ; error "Testing failed")
- name: Install
run: sudo make install