mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 18:29:36 +03:00
;ci: reduced scheduled runs to weekly; build with all ghcs on linux
This commit is contained in:
parent
2cec32cebe
commit
99dc37d0ab
@ -1,33 +1,17 @@
|
||||
# reasonably thorough build/test/benchmark/haddock/functest testing,
|
||||
# on linux, run nightly and also for noteworthy pull requests
|
||||
# linux CI tests, run "periodically", and on notable push to ci-linux,
|
||||
# and on notable pull request to master.
|
||||
# Periodic runs don't use caching.
|
||||
# Reasonably thorough build/test/benchmark/haddock/functest testing, with all GHC versions
|
||||
|
||||
# based on https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233
|
||||
# docs:
|
||||
# http://www.btellez.com/posts/triggering-github-actions-with-webhooks.html
|
||||
# https://github.com/actions/cache
|
||||
# https://github.com/actions/setup-haskell
|
||||
# https://github.com/actions/upload-artifact
|
||||
# https://github.com/marketplace/actions/cache
|
||||
# https://github.com/marketplace/actions/checkout
|
||||
# https://github.com/sdras/awesome-actions
|
||||
# https://help.github.com/en/actions
|
||||
# https://help.github.com/en/actions/configuring-and-managing-workflows/caching-and-storing-workflow-data
|
||||
# https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
|
||||
# https://sevenzip.osdn.jp/chm/cmdline/commands/index.htm
|
||||
|
||||
name: linux nightly/pr CI
|
||||
name: linux / pull request CI
|
||||
|
||||
on:
|
||||
# run nightly
|
||||
schedule:
|
||||
- cron: "0 07 * * *"
|
||||
# and on pull requests to master
|
||||
- cron: "0 07 * * 0" # sunday midnight pacific
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- '.github/workflows/linux-nightly.yml'
|
||||
- '.github/workflows/linux.yml'
|
||||
- 'stack*.yaml'
|
||||
- 'hledger-lib/**'
|
||||
- 'hledger/**'
|
||||
@ -43,7 +27,7 @@ on:
|
||||
push:
|
||||
branches: [ ci-linux ]
|
||||
paths:
|
||||
- '.github/workflows/linux-nightly.yml'
|
||||
- '.github/workflows/linux.yml'
|
||||
- 'stack*'
|
||||
- 'hledger-lib'
|
||||
- 'hledger'
|
||||
@ -60,32 +44,14 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
plan:
|
||||
# - { build: stack, resolver: "--resolver lts-9" } # ghc-8.0.2
|
||||
# - { build: stack, resolver: "--resolver lts-11" } # ghc-8.2.2
|
||||
# - { build: stack, resolver: "--resolver lts-12" } # ghc-8.4.4
|
||||
## - { build: stack, resolver: "--resolver lts-13" } redundant because lts-14 checks ghc-8.6 already
|
||||
# - { build: stack, resolver: "--resolver lts-14" } # ghc-8.6.5
|
||||
- { build: stack, resolver: "--resolver lts-15" } # ghc-8.8.2
|
||||
# - { build: stack, resolver: "--resolver nightly" }
|
||||
# - { build: stack, resolver: "" }
|
||||
# - { build: cabal, ghc: 8.0.2, cabal-install: "2.0" } # setup-haskell only supports cabal-install 2.0 and higher
|
||||
# - { build: cabal, ghc: 8.2.2, cabal-install: "2.0" }
|
||||
# - { build: cabal, ghc: 8.4.4, cabal-install: "2.2" }
|
||||
# - { build: cabal, ghc: 8.6.5, cabal-install: "2.4" }
|
||||
# - { build: cabal, ghc: 8.8.1, cabal-install: "2.4" } # currently not working for >= 3.0
|
||||
# use this to include any dependencies from OS package managers
|
||||
# include: []
|
||||
# - os: macos-latest
|
||||
# brew: anybrewdeps
|
||||
# - os: ubuntu-latest
|
||||
# apt-get: happy libblas-dev liblapack-dev
|
||||
# exclude:
|
||||
# - os: macos-latest
|
||||
# plan:
|
||||
# build: cabal
|
||||
runs-on: ${{ matrix.os }}
|
||||
- { key:"80", args: "--stack-yaml=stack-8.0.yaml" }
|
||||
- { key:"82", args: "--stack-yaml=stack-8.2.yaml" }
|
||||
- { key:"84", args: "--stack-yaml=stack-8.4.yaml" }
|
||||
- { key:"86", args: "--stack-yaml=stack-8.6.yaml" }
|
||||
- { key:"88", args: "--stack-yaml=stack.yaml" }
|
||||
- { key:"810", args: "--stack-yaml=stack-8.10.yaml" }
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
@ -93,63 +59,73 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# declare/restore cached things
|
||||
# caching doesn't work for nightly runs yet https://github.com/actions/cache/issues/63
|
||||
# caching doesn't work for scheduled runs yet https://github.com/actions/cache/issues/63
|
||||
|
||||
- name: Cache stack global package db
|
||||
id: stack-global
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.stack
|
||||
key: ${{ runner.os }}-stack-global-${{ hashFiles('**.yaml') }}
|
||||
key: ${{ runner.os }}-stack-global-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-global-${{ matrix.plan.key }}
|
||||
${{ runner.os }}-stack-global
|
||||
${{ runner.os }}-stack
|
||||
|
||||
- name: Cache stack-installed programs in ~/.local/bin
|
||||
id: stack-programs
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.local/bin
|
||||
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
|
||||
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-programs-${{ matrix.plan.key }}
|
||||
${{ runner.os }}-stack-programs
|
||||
${{ runner.os }}-local-bin
|
||||
|
||||
# stack's local package dbs for the project and each package
|
||||
- name: Cache .stack-work
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: .stack-work
|
||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-stack-work
|
||||
key: ${{ runner.os }}-stack-work-${{ matrix.plan.key }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-work-${{ matrix.plan.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-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-hledger-lib-stack-work
|
||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.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-${{ hashFiles('hledger/package.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-hledger-stack-work
|
||||
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.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-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-hledger-ui-stack-work
|
||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.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-${{ hashFiles('hledger-web/package.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-hledger-web-stack-work
|
||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.key }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.key }}
|
||||
${{ runner.os }}-hledger-web-stack-work
|
||||
|
||||
# actions
|
||||
|
||||
@ -165,21 +141,21 @@ jobs:
|
||||
run: |
|
||||
stack $ARGS setup --install-ghc
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: Install haskell deps
|
||||
run: |
|
||||
stack $ARGS build --test --bench --only-dependencies
|
||||
# --no-terminal
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: Build hledger and test unit tests, doc tests
|
||||
- name: Build hledger quickly warning free, run unit tests, run doc tests
|
||||
run: |
|
||||
stack $ARGS build --test --bench --ghc-options=-Werror
|
||||
# --pedantic --no-terminal # --no-run-benchmarks
|
||||
stack $ARGS build --test --bench --fast --ghc-options=-Werror --no-terminal
|
||||
# --pedantic --no-run-benchmarks
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: Install shelltestrunner
|
||||
run: |
|
||||
@ -187,14 +163,14 @@ jobs:
|
||||
if [[ ! -x ~/.local/bin/shelltest ]]; then stack $ARGS install shelltestrunner-1.9; fi
|
||||
shelltest --version
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: Test functional tests (excluding addons)
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
COLUMNS=80 stack $ARGS exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: Test haddock generation
|
||||
shell: bash
|
||||
@ -203,7 +179,7 @@ jobs:
|
||||
# --no-haddock-hyperlink-source is 25% faster
|
||||
# --no-print-missing-docs is 600% quieter
|
||||
env:
|
||||
ARGS: ${{ matrix.plan.resolver }}
|
||||
ARGS: ${{ matrix.plan.args }}
|
||||
|
||||
- name: show stuff
|
||||
run: |
|
||||
@ -215,6 +191,24 @@ jobs:
|
||||
|
||||
|
||||
|
||||
# docs:
|
||||
|
||||
# based on https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233
|
||||
# http://www.btellez.com/posts/triggering-github-actions-with-webhooks.html
|
||||
# https://github.com/actions/cache
|
||||
# https://github.com/actions/setup-haskell
|
||||
# https://github.com/actions/upload-artifact
|
||||
# https://github.com/marketplace/actions/cache
|
||||
# https://github.com/marketplace/actions/checkout
|
||||
# https://github.com/sdras/awesome-actions
|
||||
# https://help.github.com/en/actions
|
||||
# https://help.github.com/en/actions/configuring-and-managing-workflows/caching-and-storing-workflow-data
|
||||
# https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
|
||||
# https://sevenzip.osdn.jp/chm/cmdline/commands/index.htm
|
||||
|
||||
|
||||
# https://github.com/mxschmitt/action-tmate
|
||||
# - name: Setup tmate session
|
||||
# uses: mxschmitt/action-tmate@v1
|
@ -1,16 +1,15 @@
|
||||
# basic build testing on mac, run nightly
|
||||
# mac CI tests, run "periodically", and on notable push to ci-mac.
|
||||
# Periodic runs don't use caching.
|
||||
|
||||
name: mac nightly CI
|
||||
name: mac CI
|
||||
|
||||
on:
|
||||
# run nightly
|
||||
schedule:
|
||||
- cron: "0 07 * * *"
|
||||
# and on pushes to ci-mac branch
|
||||
- cron: "0 07 * * 0" # sunday midnight pacific
|
||||
push:
|
||||
branches: [ ci-mac ]
|
||||
paths:
|
||||
- '.github/workflows/mac-nightly.yml'
|
||||
- '.github/workflows/mac.yml'
|
||||
- 'stack*.yaml'
|
||||
- 'hledger-lib/**'
|
||||
- 'hledger/**'
|
||||
@ -32,7 +31,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# declare/restore cached things
|
||||
# caching doesn't work for nightly runs yet https://github.com/actions/cache/issues/63
|
||||
# caching doesn't work for scheduled runs yet https://github.com/actions/cache/issues/63
|
||||
|
||||
- name: Cache stack global package db
|
||||
id: stack-global
|
3
.github/workflows/push.yml
vendored
3
.github/workflows/push.yml
vendored
@ -1,5 +1,4 @@
|
||||
# quick build and tests (unit & func, but not doc or haddock tests),
|
||||
# on linux, for noteworthy pushes to master
|
||||
# quick CI tests, run on notable push to master
|
||||
|
||||
name: push CI
|
||||
|
||||
|
@ -1,18 +1,16 @@
|
||||
# basic hledger/hledger-web build testing, and binary building,
|
||||
# on windows, run nightly
|
||||
# windows CI tests, run "periodically", and on notable push to ci-windows
|
||||
# Periodic runs don't use caching.
|
||||
# Using GHC 8.8.2 to avoid "access violation" error with 8.8.3
|
||||
|
||||
name: windows nightly CI with GHC 8.8.2
|
||||
name: windows CI
|
||||
|
||||
on:
|
||||
# run nightly
|
||||
schedule:
|
||||
- cron: "0 07 * * *"
|
||||
# and on pushes to ci-windows branch
|
||||
- cron: "0 07 * * 0" # sunday midnight pacific
|
||||
push:
|
||||
branches: [ ci-windows ]
|
||||
paths:
|
||||
- '.github/workflows/windows-nightly.yml'
|
||||
- '.github/workflows/windows.yml'
|
||||
- 'stack*.yaml'
|
||||
- 'hledger-lib/**'
|
||||
- 'hledger/**'
|
||||
@ -34,7 +32,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# declare/restore cached things
|
||||
# caching doesn't work for nightly runs yet https://github.com/actions/cache/issues/63
|
||||
# caching doesn't work for scheduled runs yet https://github.com/actions/cache/issues/63
|
||||
|
||||
- name: Cache stack global package db
|
||||
id: stack-global-package-db
|
Loading…
Reference in New Issue
Block a user