Skip to content

Commit 0b88291

Browse files
committed
add stack8.10.yaml; add more elaborate CI with caching
1 parent df0aa6e commit 0b88291

File tree

2 files changed

+113
-8
lines changed

2 files changed

+113
-8
lines changed

.github/workflows/ci.yml

Lines changed: 107 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,113 @@
1-
name: Haskell CI
2-
on: [push, pull_request]
1+
name: shelltestrunner CI
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/**
7+
- 'stack*'
8+
- 'src/**'
9+
- 'tests/**'
10+
- '!**.md'
11+
- '!**.1'
12+
- '!**.5'
13+
- '!**.info'
14+
- '!**.txt'
15+
16+
pull_request:
17+
paths:
18+
- '.github/workflows/**
19+
- 'stack*'
20+
- 'src/**'
21+
- 'tests/**'
22+
- '!**.md'
23+
- '!**.1'
24+
- '!**.5'
25+
- '!**.info'
26+
- '!**.txt'
27+
28+
# Scheduled workflows run on the latest commit on the default or base branch. (master)
29+
# schedule:
30+
# - cron: "0 07 * * 0" # sunday midnight pacific
31+
332
jobs:
433
test:
534
runs-on: ubuntu-latest
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
plan:
39+
# - { ghc: "80" , stack: "stack --stack-yaml=stack8.0.yaml" }
40+
# - { ghc: "82" , stack: "stack --stack-yaml=stack8.2.yaml" }
41+
# - { ghc: "84" , stack: "stack --stack-yaml=stack8.4.yaml" }
42+
# - { ghc: "86" , stack: "stack --stack-yaml=stack8.6.yaml" }
43+
- { ghc: "88" , stack: "stack --stack-yaml=stack.yaml" }
44+
- { ghc: "810" , stack: "stack --stack-yaml=stack8.10.yaml" }
45+
646
steps:
7-
- uses: actions/checkout@v2
8-
- name: Setup
9-
run: stack setup
10-
- name: Build
11-
run: stack build
12-
- name: Run tests
47+
48+
- name: Check out
49+
uses: actions/checkout@v2
50+
51+
- name: Cache stack global package db
52+
id: stack-global
53+
uses: actions/cache@v2
54+
with:
55+
path: ~/.stack
56+
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
57+
restore-keys: |
58+
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
59+
60+
- name: Cache stack-installed programs in ~/.local/bin
61+
id: stack-programs
62+
uses: actions/cache@v2
63+
with:
64+
path: ~/.local/bin
65+
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
66+
restore-keys: |
67+
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
68+
69+
- name: Cache .stack-work
70+
uses: actions/cache@v2
71+
with:
72+
path: .stack-work
73+
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
74+
restore-keys: |
75+
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
76+
77+
- name: Show stack version
78+
# curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $INSTALLDIR '*/stack'
79+
# mkdir -p ~/.local/bin
80+
# export PATH=~/.local/bin:$PATH
81+
# if [[ ! -x ~/.local/bin/stack ]]; then curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
82+
env:
83+
stack: ${{ matrix.plan.stack }}
1384
run: |
85+
$stack --version
86+
87+
- name: Install GHC
88+
env:
89+
stack: ${{ matrix.plan.stack }}
90+
run: |
91+
$stack setup --install-ghc
92+
93+
- name: Install haskell deps
94+
env:
95+
stack: ${{ matrix.plan.stack }}
96+
run: |
97+
$stack build --test --bench --only-dependencies
98+
# --no-terminal
99+
100+
- name: Build all shelltestrunner modules warning free, optimised and minimised, and run any unit/doc/bench tests
101+
env:
102+
stack: ${{ matrix.plan.stack }}
103+
run: |
104+
$stack install --test --bench --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
105+
106+
- name: Run functional tests (excluding windows tests)
107+
env:
108+
stack: ${{ matrix.plan.stack }}
109+
run: |
110+
export PATH=~/.local/bin:$PATH
14111
make test
112+
# $stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons
113+
#COLUMNS=80

stack8.10.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resolver: nightly-2020-08-18
2+
3+
packages:
4+
- '.'
5+
6+
#extra-deps: []

0 commit comments

Comments
 (0)