Skip to content

Commit bb2b919

Browse files
Another CI fix commit
1 parent 63d70f1 commit bb2b919

File tree

1 file changed

+14
-47
lines changed

1 file changed

+14
-47
lines changed

.github/workflows/main.yml

+14-47
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
on: [push]
22
name: Build and test
33
jobs:
4-
build:
4+
ci:
55
name: Build on ${{ matrix.os }}
6+
env:
7+
stack: stack --system-ghc
68
runs-on: ${{ matrix.os }}
79
strategy:
810
fail-fast: false
@@ -12,76 +14,41 @@ jobs:
1214
- name: Check out
1315
uses: actions/checkout@v2
1416

15-
- name: Cache GHC installation
16-
uses: actions/cache@v4
17-
id: ghcup
18-
with:
19-
path: |
20-
~/.ghcup/bin/*
21-
~/.ghcup/cache/*
22-
~/.ghcup/config.yaml
23-
~/.ghcup/ghc/*
24-
key: CI-ghcup
25-
2617
- name: Setup Haskell
2718
uses: haskell-actions/setup@v2
28-
if: steps.ghcup.outputs.cache-hit != 'true'
2919
with:
3020
enable-stack: true
3121

32-
- name: Cache Stackage package index
33-
id: pantry
22+
- name: Cache
3423
uses: actions/cache@v4
35-
with:
36-
path: ~/.stack/pantry
37-
key: CI-pantry-${{ env.STACK_LTS }}
38-
39-
- name: Recompute Stackage package index
40-
if: steps.pantry.outputs.cache-hit != 'true'
41-
run: stack update
42-
43-
- name: Cache Haskell dependencies
44-
uses: actions/cache@v3
4524
with:
4625
path: |
47-
~/.stack/stack.sqlite3
48-
~/.stack/snapshots
49-
key: CI-testdeps--${{ env.STACK_LTS }}--${{ hashFiles('stack.yaml.lock') }}
50-
restore-keys: |
51-
CI-testdeps--${{ env.STACK_LTS }}--
52-
CI-testdeps--
53-
54-
- name: Cache Haskell project buildstate
55-
uses: actions/cache@v4
56-
with:
57-
path: .stack-work
58-
key: CI-builddir--${{ env.GHC_VERSION }}
26+
~/.stack
27+
.stack-work
28+
key: ${{ matrix.os }}-stack-${{ hashFiles('./stack.yaml.lock') }}
5929

6030
- name: Build package dependencies
6131
run: |
62-
stack build --no-run-tests --no-run-benchmarks --only-dependencies
32+
$stack build --no-run-tests --no-run-benchmarks --only-dependencies
6333
6434
- name: Build package
6535
run: |
66-
stack build --no-run-tests --no-run-benchmarks
36+
$stack build --no-run-tests --no-run-benchmarks
6737
6838
- name: Build testing dependencies
6939
run: |
70-
stack build --no-run-tests --no-run-benchmarks --test --bench
40+
$stack build --no-run-tests --no-run-benchmarks --test --bench
7141
7242
- name: Run tests
7343
run: |
74-
stack build --test --no-run-benchmarks
44+
$stack build --test --no-run-benchmarks
7545
7646
- name: Build documentation
7747
run: |
78-
stack haddock
48+
$stack haddock
7949
8050
- name: Check documentation
51+
if: matrix.os != 'windows-latest'
8152
run: |
82-
stack install doctest
53+
$stack install doctest
8354
$(stack path --local-bin)${path.sep}doctest src/
84-
85-
- name: Deploy
86-
run: |
87-
stack path --local-install-root

0 commit comments

Comments
 (0)