-
Notifications
You must be signed in to change notification settings - Fork 13
105 lines (92 loc) · 3.26 KB
/
ci.yml
File metadata and controls
105 lines (92 loc) · 3.26 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: shelltestrunner CI
on:
push:
paths:
- '.github/workflows/**'
- 'stack*'
- 'src/**'
- 'tests/**'
- '!**.md'
- '!**.1'
- '!**.5'
- '!**.info'
- '!**.txt'
pull_request:
paths:
- '.github/workflows/**'
- 'stack*'
- 'src/**'
- 'tests/**'
- '!**.md'
- '!**.1'
- '!**.5'
- '!**.info'
- '!**.txt'
# Scheduled workflows run on the latest commit on the default or base branch. (master)
# schedule:
# - cron: "0 07 * * 0" # sunday midnight pacific
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plan:
- { ghc: "912", stack: "stack --stack-yaml=stack912.yaml --system-ghc --no-install-ghc" }
# Use the preinstalled stack and ghc (3.5.1 and 9.12.2 as of 2025-04).
# This risks breaking when github updates these, but avoids a lot of wasted work.
steps:
- name: Check out
uses: actions/checkout@v4
- name: Cache stack global package db
id: stack-global
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
- name: Cache stack-installed programs in ~/.local/bin
id: stack-programs
uses: actions/cache@v4
with:
path: ~/.local/bin
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
- name: Cache .stack-work
uses: actions/cache@v4
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
# - name: Install specific stack version
# run: |
# mkdir -p ~/.local/bin
# export PATH=~/.local/bin:$PATH
# # curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
# if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
# stack --version
#
# - name: Install specific GHC version
# env:
# stack: ${{ matrix.plan.stack }}
# run: |
# $stack setup --install-ghc
- name: Install haskell deps
env:
stack: ${{ matrix.plan.stack }}
run: |
$stack build --test --bench --only-dependencies
- name: Build all shelltestrunner modules warning free, optimised and minimised, and run any unit/doc/bench tests
env:
stack: ${{ matrix.plan.stack }}
run: |
$stack install --test --bench --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
- name: Run functional tests (excluding windows tests)
env:
stack: ${{ matrix.plan.stack }}
run: |
export PATH=~/.local/bin:$PATH
make STACK="$stack" test