hledger/.github/workflows/mac-ci.yml

119 lines
2.8 KiB
YAML
Raw Normal View History

# mac CI tests
# basic build testing, run nightly
name: mac CI
on:
schedule:
- cron: "0 23 * * *"
# uncomment when testing CI:
push:
branches: [ master ]
paths:
- 'stack*'
- 'hledger-lib'
- 'hledger'
- 'hledger-ui'
- 'hledger-web'
2020-03-06 22:06:15 +03:00
- '.github/workflows/mac*'
- '!**.md'
- '!**.1'
- '!**.5'
- '!**.info'
- '!**.txt'
# pull_request:
# branches: [ master ]
# paths:
# - 'stack*'
# - 'hledger-lib'
# - 'hledger'
# - 'hledger-ui'
# - 'hledger-web'
2020-03-06 22:06:15 +03:00
# - '.github/workflows/mac*'
# - '!**.md'
# - '!**.1'
# - '!**.5'
# - '!**.info'
# - '!**.txt'
jobs:
build:
runs-on: macos-latest
steps:
# cached things
- name: Cache ~/.stack
uses: actions/cache@v1
with:
path: ~/.stack
key: ${{ runner.os }}-stack
- name: Cache ~/.local/bin
uses: actions/cache@v1
with:
path: ~/.local/bin
key: ${{ runner.os }}-local-bin
- name: Cache .stack-work
uses: actions/cache@v1
with:
path: .stack-work
key: ${{ runner.os }}-stack-work
- name: Cache hledger-lib/.stack-work
uses: actions/cache@v1
with:
path: hledger-lib/.stack-work
key: ${{ runner.os }}-hledger-lib-stack-work
- name: Cache hledger/.stack-work
uses: actions/cache@v1
with:
path: hledger/.stack-work
key: ${{ runner.os }}-hledger-stack-work
- name: Cache hledger-ui/.stack-work
uses: actions/cache@v1
with:
path: hledger-ui/.stack-work
key: ${{ runner.os }}-hledger-ui-stack-work
- name: Cache hledger-web/.stack-work
uses: actions/cache@v1
with:
path: hledger-web/.stack-work
key: ${{ runner.os }}-hledger-web-stack-work
# actions
- name: Check out
uses: actions/checkout@v2
- name: Install stack
# curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C $INSTALLDIR
run: |
brew install haskell-stack
stack --version
- name: Install GHC
run: |
stack --resolver=lts setup
# - name: Install shelltestrunner
# - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.9; fi
# - shelltest --version
- name: Install haskell deps
run: |
stack --resolver=lts --install-ghc test --bench --only-dependencies
# --no-terminal --bench --install-ghc
- name: Build hledger
run: |
stack --resolver=lts test --only-dependencies
# --no-terminal --bench --install-ghc
# run hledger-lib/hledger functional tests, skipping the ones for addons
#- COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons