-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.09 KB
/
hs.yml
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
name: Haskell CI
on:
push:
branches: [ main ]
paths: [ hs/** ]
pull_request:
branches: [ main ]
paths: [ hs/** ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Day
id: get-day
run: echo "::set-output name=day::$(seq 1 $(expr '(' $(date +%s) - $(TZ=UTC+5 date +%s --date=2020-12-01) ')' / 86400 + 1) | head -n25 | tail -n1)"
- uses: actions/cache@v2
with:
key: inputs-${{ steps.get-day.outputs.day }}
restore-keys: inputs-
path: day*.txt
- name: Get inputs
run: make
env:
SESSION: ${{ secrets.SESSION }}
- uses: actions/setup-haskell@v1
with:
stack-version: latest
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-${{ hashFiles('**/stack.*') }}-${{ hashFiles('**/package.yaml') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('**/stack.*') }}-
path: ~/.stack
- run: stack build --test --bench --no-run-benchmarks
working-directory: hs