;ci: github: tweaks; quick tests for push, more tests for pull reqs

This commit is contained in:
Simon Michael 2020-03-06 13:54:32 -08:00
parent 9501c89711
commit dc9deb8931
4 changed files with 127 additions and 14 deletions

View File

@ -1,6 +1,5 @@
# linux CI tests
# reasonably thorough build/test/benchmark/haddock/functest testing
# with stackage lts, run on master push/pull request
# reasonably thorough build/test/benchmark/haddock/functest testing,
# on linux, run nightly and also for pull requests
# based on https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233
# docs:
@ -17,12 +16,12 @@
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
# https://sevenzip.osdn.jp/chm/cmdline/commands/index.htm
name: linux CI
name: linux nightly/pr CI
on:
# schedule:
# - cron: "0 23 * * *"
push:
schedule:
- cron: "0 23 * * *"
pull_request:
branches: [ master ]
paths:
- 'stack*'
@ -36,7 +35,8 @@ on:
- '!**.5'
- '!**.info'
- '!**.txt'
pull_request:
# uncomment when testing CI:
push:
branches: [ master ]
paths:
- 'stack*'

View File

@ -1,7 +1,6 @@
# mac CI tests
# basic build testing, run nightly
# basic build testing on mac, run nightly
name: mac CI
name: mac nightly CI
on:
schedule:

112
.github/workflows/quick.yml vendored Normal file
View File

@ -0,0 +1,112 @@
# quick build and tests, on linux, for noteworthy pushes to master
name: quick CI
on:
push:
branches: [ master ]
paths:
- 'stack*'
- 'hledger-lib'
- 'hledger'
- 'hledger-ui'
- 'hledger-web'
- '.github/workflows/linux*'
- '!**.md'
- '!**.1'
- '!**.5'
- '!**.info'
- '!**.txt'
jobs:
build:
runs-on: ubuntu-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 -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $INSTALLDIR '*/stack'
# mkdir -p ~/.local/bin
# 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
run: |
stack --version
- name: Install GHC
run: |
stack --resolver=lts setup
- name: Install shelltestrunner
run: |
export PATH=~/.local/bin:$PATH
if [[ ! -x ~/.local/bin/shelltest ]]; then stack --resolver=lts install shelltestrunner-1.9; fi
shelltest --version
- name: Install haskell deps
run: |
stack --resolver=lts build --only-dependencies
# --no-terminal
- name: Build hledger fast
run: |
stack --resolver=lts build --fast --ghc-options=-Werror
# --no-terminal
- name: Unit & functional tests (excluding addons)
run: |
export PATH=~/.local/bin:$PATH
COLUMNS=80 stack --resolver=lts exec -- shelltest --execdir -j16 tests -x /bin -x /addons
# - name: Configure
# if: startsWith(matrix.name, 'linux')
# run: |
# export PATH=/usr/local/bin:$PATH
# cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug ...

View File

@ -1,7 +1,7 @@
# windows CI tests
# basic hledger/hledger-web build testing, and binary building, run nightly
# basic hledger/hledger-web build testing, and binary building,
# on windows, run nightly
name: windows CI
name: windows nightly CI
on:
schedule:
@ -113,6 +113,7 @@ jobs:
ls C:\Users\runneradmin\AppData\Local\
ls C:\Users\runneradmin\AppData\Local\Programs\
ls C:\Users\runneradmin\AppData\Local\Programs\stack
ls C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows
ls C:\Users\runneradmin\AppData\LocalLow\
ls C:\Users\runneradmin\AppData\Roaming\
ls C:\Users\runneradmin\AppData\Roaming\stack\
@ -138,6 +139,7 @@ jobs:
ls C:\Users\runneradmin\AppData\Local\
ls C:\Users\runneradmin\AppData\Local\Programs\
ls C:\Users\runneradmin\AppData\Local\Programs\stack
ls C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows
ls C:\Users\runneradmin\AppData\LocalLow\
ls C:\Users\runneradmin\AppData\Roaming\
ls C:\Users\runneradmin\AppData\Roaming\stack\