-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.57 KB
/
haskell-stack.yml
File metadata and controls
58 lines (47 loc) · 1.57 KB
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
name: Haskell CI (Stack)
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
stack:
name: Stack LTS 22.44 on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: '9.6'
enable-stack: true
- name: Show toolchain versions
shell: bash
run: |
ghc --numeric-version
stack --numeric-version
- name: Cache Stack global package DB
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache Stack work directory
uses: actions/cache@v4
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-
${{ runner.os }}-stack-work-
- name: Build dependencies
run: stack build --system-ghc --only-dependencies --test
- name: Build the package
run: stack build --system-ghc
- name: Run tests
run: stack test --system-ghc