ci: spread ghc versions among workflows, clean up restore keys
This commit is contained in:
parent
0489622a3f
commit
a1c2c82c03
61
.github/workflows/linux.yml
vendored
61
.github/workflows/linux.yml
vendored
@ -1,9 +1,12 @@
|
|||||||
# Thorough tests on linux.
|
|
||||||
# Runs on notable pushes to ci-linux, on notable pull requests against
|
# Runs on notable pushes to ci-linux, on notable pull requests against
|
||||||
# master, and weekly on master.
|
# master, and weekly on master.
|
||||||
# Builds all modules optimised, runs unit, benchmark, doc, functional,
|
|
||||||
# haddock tests, with all supported GHC versions,
|
# Builds all modules optimised and runs
|
||||||
# and uploads binaries artifact.
|
# unit/doc/functional/haddock/benchmark tests on linux,
|
||||||
|
# using the oldest supported GHC version (only, as a compromise to
|
||||||
|
# reduce carbon emissions. Some of the other versions are exercised by
|
||||||
|
# the other workflows.)
|
||||||
|
# Currently does not upload a binaries artifact.
|
||||||
|
|
||||||
name: linux CI
|
name: linux CI
|
||||||
|
|
||||||
@ -46,18 +49,18 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
plan:
|
plan:
|
||||||
# GHC 8.0 is still supported but we don't have a build plan for hledger-web, let it go
|
# GHC 8.0 is still supported but we don't have a build plan for hledger-web, let it go
|
||||||
# - { key: "80", args: "--stack-yaml=stack8.0.yaml" }
|
# - { ghc: "80", args: "--stack-yaml=stack8.0.yaml" }
|
||||||
- { key: "82", args: "--stack-yaml=stack8.2.yaml" }
|
- { ghc: "82", args: "--stack-yaml=stack8.2.yaml" }
|
||||||
- { key: "84", args: "--stack-yaml=stack8.4.yaml" }
|
# - { ghc: "84", args: "--stack-yaml=stack8.4.yaml" }
|
||||||
- { key: "86", args: "--stack-yaml=stack8.6.yaml" }
|
# - { ghc: "86", args: "--stack-yaml=stack8.6.yaml" }
|
||||||
- { key: "88", args: "--stack-yaml=stack.yaml" }
|
# - { ghc: "88", args: "--stack-yaml=stack.yaml" }
|
||||||
- { key: "810", args: "--stack-yaml=stack8.10.yaml" }
|
# - { ghc: "810", args: "--stack-yaml=stack8.10.yaml" }
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@ -71,65 +74,58 @@ jobs:
|
|||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.stack
|
path: ~/.stack
|
||||||
key: ${{ runner.os }}-stack-global-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-global-${{ matrix.plan.key }}
|
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-stack-global
|
|
||||||
|
|
||||||
- name: Cache stack-installed programs in ~/.local/bin
|
- name: Cache stack-installed programs in ~/.local/bin
|
||||||
id: stack-programs
|
id: stack-programs
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.local/bin
|
path: ~/.local/bin
|
||||||
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-programs-${{ matrix.plan.key }}
|
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-stack-programs
|
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: .stack-work
|
path: .stack-work
|
||||||
key: ${{ runner.os }}-stack-work-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-work-${{ matrix.plan.key }}
|
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-stack-work
|
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-lib/.stack-work
|
path: hledger-lib/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.key }}
|
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-hledger-lib-stack-work
|
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger/.stack-work
|
path: hledger/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.key }}
|
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-hledger-stack-work
|
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-ui/.stack-work
|
path: hledger-ui/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.key }}
|
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-hledger-ui-stack-work
|
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-web/.stack-work
|
path: hledger-web/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-web/package.yaml') }}
|
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.key }}
|
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-hledger-web-stack-work
|
|
||||||
|
|
||||||
# For now due to
|
# For now due to
|
||||||
# https://github.com/actions/virtual-environments/issues/709
|
# https://github.com/actions/virtual-environments/issues/709
|
||||||
@ -168,7 +164,6 @@ jobs:
|
|||||||
df -h
|
df -h
|
||||||
stack $ARGS setup --install-ghc
|
stack $ARGS setup --install-ghc
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ARGS: ${{ matrix.plan.args }}
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
|
|||||||
64
.github/workflows/mac.yml
vendored
64
.github/workflows/mac.yml
vendored
@ -1,7 +1,8 @@
|
|||||||
# Fairly thorough tests on mac.
|
|
||||||
# Runs on notable pushes to ci-mac, and weekly on master.
|
# Runs on notable pushes to ci-mac, and weekly on master.
|
||||||
# Builds all modules optimised, runs unit, doc, functional tests,
|
|
||||||
# and uploads binaries artifact.
|
# Builds all modules optimised and runs unit/doc/functional tests on mac,
|
||||||
|
# using GHC 8.6,
|
||||||
|
# and uploads a binaries artifact.
|
||||||
|
|
||||||
name: mac CI
|
name: mac CI
|
||||||
|
|
||||||
@ -28,6 +29,17 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
plan:
|
||||||
|
# - { ghc: "80", args: "--stack-yaml=stack8.0.yaml" }
|
||||||
|
# - { ghc: "82", args: "--stack-yaml=stack8.2.yaml" }
|
||||||
|
# - { ghc: "84", args: "--stack-yaml=stack8.4.yaml" }
|
||||||
|
- { ghc: "86", args: "--stack-yaml=stack8.6.yaml" }
|
||||||
|
# - { ghc: "88", args: "--stack-yaml=stack.yaml" }
|
||||||
|
# - { ghc: "810", args: "--stack-yaml=stack8.10.yaml" }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out
|
- name: Check out
|
||||||
@ -43,7 +55,6 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-global
|
${{ runner.os }}-stack-global
|
||||||
${{ runner.os }}-stack
|
|
||||||
|
|
||||||
- name: Cache stack-installed programs in ~/.local/bin
|
- name: Cache stack-installed programs in ~/.local/bin
|
||||||
id: stack-programs
|
id: stack-programs
|
||||||
@ -53,37 +64,46 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-programs
|
${{ runner.os }}-stack-programs
|
||||||
${{ runner.os }}-local-bin
|
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: .stack-work
|
path: .stack-work
|
||||||
key: ${{ runner.os }}-stack-work
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-lib/.stack-work
|
path: hledger-lib/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-lib-stack-work
|
key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-lib-stack-work
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger/.stack-work
|
path: hledger/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-stack-work
|
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-ui/.stack-work
|
path: hledger-ui/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-ui-stack-work
|
key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-ui-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-web/.stack-work
|
path: hledger-web/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-web-stack-work
|
key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-web-stack-work
|
||||||
|
|
||||||
# actions:
|
# actions:
|
||||||
|
|
||||||
@ -91,32 +111,44 @@ jobs:
|
|||||||
# curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C $INSTALLDIR
|
# curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C $INSTALLDIR
|
||||||
run: |
|
run: |
|
||||||
brew install haskell-stack
|
brew install haskell-stack
|
||||||
stack --version
|
stack $ARGS --version
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Install GHC
|
- name: Install GHC
|
||||||
run: |
|
run: |
|
||||||
stack setup --install-ghc
|
stack $ARGS setup --install-ghc
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Install haskell deps
|
- name: Install haskell deps
|
||||||
run: |
|
run: |
|
||||||
stack build --test --only-dependencies
|
stack $ARGS build --test --only-dependencies
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Build hledger and test unit tests, doc tests
|
- name: Build hledger and test unit tests, doc tests
|
||||||
run: |
|
run: |
|
||||||
stack install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
|
stack $ARGS install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
|
||||||
# --ghc-options=-split-sections doesn't work on mac
|
# --ghc-options=-split-sections doesn't work on mac
|
||||||
# --pedantic
|
# --pedantic
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Install shelltestrunner
|
- name: Install shelltestrunner
|
||||||
run: |
|
run: |
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.9; fi
|
if [[ ! -x ~/.local/bin/shelltest ]]; then stack $ARGS install shelltestrunner-1.9; fi
|
||||||
shelltest --version
|
shelltest --version
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Test functional tests (excluding addons)
|
- name: Test functional tests (excluding addons)
|
||||||
run: |
|
run: |
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
COLUMNS=80 stack $ARGS exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
# artifacts:
|
# artifacts:
|
||||||
|
|
||||||
|
|||||||
73
.github/workflows/push.yml
vendored
73
.github/workflows/push.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
# Quick tests on linux, minimising compute power and carbon emissions.
|
|
||||||
# Runs on notable pushes to master.
|
# Runs on notable pushes to master.
|
||||||
# Builds incrementally and runs functional tests with one GHC version.
|
|
||||||
|
# Builds incrementally and runs functional tests on linux,
|
||||||
|
# using the latest supported GHC version.
|
||||||
|
|
||||||
name: push CI
|
name: push CI
|
||||||
|
|
||||||
@ -24,6 +25,17 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
plan:
|
||||||
|
# - { ghc: "80", args: "--stack-yaml=stack8.0.yaml" }
|
||||||
|
# - { ghc: "82", args: "--stack-yaml=stack8.2.yaml" }
|
||||||
|
# - { ghc: "84", args: "--stack-yaml=stack8.4.yaml" }
|
||||||
|
# - { ghc: "86", args: "--stack-yaml=stack8.6.yaml" }
|
||||||
|
# - { ghc: "88", args: "--stack-yaml=stack.yaml" }
|
||||||
|
- { ghc: "810", args: "--stack-yaml=stack8.10.yaml" }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out
|
- name: Check out
|
||||||
@ -51,55 +63,58 @@ jobs:
|
|||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.stack
|
path: ~/.stack
|
||||||
key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-global
|
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-stack
|
|
||||||
|
|
||||||
- name: Cache stack-installed programs in ~/.local/bin
|
- name: Cache stack-installed programs in ~/.local/bin
|
||||||
id: stack-programs
|
id: stack-programs
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.local/bin
|
path: ~/.local/bin
|
||||||
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-programs
|
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
||||||
${{ runner.os }}-local-bin
|
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: .stack-work
|
path: .stack-work
|
||||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-lib/.stack-work
|
path: hledger-lib/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }}
|
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-lib-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger/.stack-work
|
path: hledger/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-ui/.stack-work
|
path: hledger-ui/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }}
|
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-ui-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-web/.stack-work
|
path: hledger-web/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }}
|
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-web-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
|
||||||
# actions:
|
# actions:
|
||||||
|
|
||||||
@ -109,29 +124,39 @@ jobs:
|
|||||||
# export PATH=~/.local/bin:$PATH
|
# export PATH=~/.local/bin:$PATH
|
||||||
# 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
|
# 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
|
||||||
run: |
|
run: |
|
||||||
stack --version
|
stack $ARGS --version
|
||||||
|
|
||||||
- name: Install GHC
|
- name: Install GHC
|
||||||
run: |
|
run: |
|
||||||
stack setup --install-ghc
|
stack $ARGS setup --install-ghc
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Install haskell deps
|
- name: Install haskell deps
|
||||||
run: |
|
run: |
|
||||||
stack build --only-dependencies
|
stack $ARGS build --only-dependencies
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Build hledger fast
|
- name: Build hledger fast
|
||||||
run: |
|
run: |
|
||||||
stack build --fast --ghc-options=-Werror
|
stack $ARGS build --fast --ghc-options=-Werror
|
||||||
# --ghc-options=-fforce-recomp # needed occasionally to clear out stale compiled modules
|
# --ghc-options=-fforce-recomp # needed occasionally to clear out stale compiled modules
|
||||||
# --pedantic
|
# --pedantic
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Install shelltestrunner
|
- name: Install shelltestrunner
|
||||||
run: |
|
run: |
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.9; fi
|
if [[ ! -x ~/.local/bin/shelltest ]]; then stack $ARGS install shelltestrunner-1.9; fi
|
||||||
shelltest --version
|
shelltest --version
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|
||||||
- name: Test functional tests (excluding addons)
|
- name: Test functional tests (excluding addons)
|
||||||
run: |
|
run: |
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
COLUMNS=80 stack $ARGS exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
||||||
|
env:
|
||||||
|
ARGS: ${{ matrix.plan.args }}
|
||||||
|
|||||||
31
.github/workflows/windows.yml
vendored
31
.github/workflows/windows.yml
vendored
@ -1,12 +1,8 @@
|
|||||||
# Fairly thorough tests on windows.
|
|
||||||
# Runs on notable pushes to ci-windows, and weekly on master.
|
# Runs on notable pushes to ci-windows, and weekly on master.
|
||||||
# Builds all modules optimised, runs unit, doc tests,
|
|
||||||
# and uploads binaries artifact.
|
|
||||||
|
|
||||||
# Light Windows CI tests: build and run functional tests with one GHC version.
|
# Builds all modules optimised on windows,
|
||||||
# GHC 8.8.2 for now to avoid https://gitlab.haskell.org/ghc/ghc/issues/17926.
|
# using GHC 8.8.2 to avoid https://gitlab.haskell.org/ghc/ghc/issues/17926,
|
||||||
#
|
# and uploads a binaries artifact.
|
||||||
# Runs: periodically on master, and on notable push to ci-windows.
|
|
||||||
|
|
||||||
name: windows CI
|
name: windows CI
|
||||||
|
|
||||||
@ -46,7 +42,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: C:\Users\runneradmin\AppData\Roaming\stack\
|
path: C:\Users\runneradmin\AppData\Roaming\stack\
|
||||||
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-appdata-roaming-stack
|
restore-keys: |
|
||||||
|
${{ runner.os }}-appdata-roaming-stack
|
||||||
|
|
||||||
- name: Cache stack programs dir # ghc, ghc-included packages and their haddocks, mingw, msys2
|
- name: Cache stack programs dir # ghc, ghc-included packages and their haddocks, mingw, msys2
|
||||||
id: stack-programs-dir
|
id: stack-programs-dir
|
||||||
@ -56,42 +53,48 @@ jobs:
|
|||||||
# which files signal a change in stack's global db ?
|
# which files signal a change in stack's global db ?
|
||||||
# **.yaml includes */package.yaml and stack.yaml* (too many), and hopefully no other changing yamls
|
# **.yaml includes */package.yaml and stack.yaml* (too many), and hopefully no other changing yamls
|
||||||
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-appdata-local-programs-stack
|
restore-keys: |
|
||||||
|
${{ runner.os }}-appdata-local-programs-stack
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: .stack-work
|
path: .stack-work
|
||||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-lib/.stack-work
|
path: hledger-lib/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }}
|
key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-lib-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-lib-stack-work
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger/.stack-work
|
path: hledger/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-ui/.stack-work
|
path: hledger-ui/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }}
|
key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-ui-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-ui-stack-work
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: hledger-web/.stack-work
|
path: hledger-web/.stack-work
|
||||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }}
|
key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-hledger-web-stack-work
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hledger-web-stack-work
|
||||||
|
|
||||||
# - name: showStuff
|
# - name: showStuff
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user