Skip to content

Commit 68e5d99

Browse files
authored
4th try haskell.yml
1 parent e0d56b8 commit 68e5d99

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/haskell.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ jobs:
3939
~/.stack/pantry
4040
~/.stack/indices
4141
key: ${{ runner.os }}-stack-pantry-${{ hashFiles('stack.yaml') }}-v1
42-
42+
restore-keys: |
43+
${{ runner.os }}-stack-pantry-
44+
4345
# Cache global stack programs
4446
- name: Cache Stack programs
4547
uses: actions/cache@v3
4648
with:
4749
path: ~/.stack/programs
4850
key: ${{ runner.os }}-stack-programs-${{ hashFiles('stack.yaml') }}-v1
51+
restore-keys: |
52+
${{ runner.os }}-stack-programs-
4953
5054
# Cache project dependencies
5155
- name: Cache Stack project dependencies
@@ -66,13 +70,10 @@ jobs:
6670
run: stack setup --install-ghc
6771

6872
- name: Install dependencies
69-
run: |
70-
stack build --only-dependencies --test --bench --no-run-benchmarks
73+
run: stack build --only-dependencies --test --bench --no-run-benchmarks
7174

7275
- name: Build
73-
run: |
74-
stack build --test --bench --no-run-benchmarks --pedantic
75-
# --pedantic turns warnings into errors
76+
run: stack build --test --bench --no-run-benchmarks
7677

7778
- name: Run tests
7879
run: |
@@ -90,11 +91,10 @@ jobs:
9091
stack exec -- ormolu --mode check $(find . -name '*.hs')
9192
9293
- name: Build documentation
93-
run: |
94-
stack haddock --no-haddock-deps
95-
# Optional: deploy docs to GitHub Pages
94+
run: stack haddock --no-haddock-deps
9695

97-
- name: Run benchmarkse
96+
- name: Run benchmarks
97+
if: github.event_name == 'pull_request' # Only run benchmarks on PRs
9898
run: stack bench
9999

100100
- name: Upload test results
@@ -107,8 +107,6 @@ jobs:
107107
.stack-work/dist/**/hpc/
108108
.stack-work/dist/**/doc/
109109
110-
111-
112110
concurrency:
113111
group: ${{ github.workflow }}-${{ github.ref }}
114112
cancel-in-progress: true

0 commit comments

Comments
 (0)