mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 18:29:36 +03:00
ci: linux/mac/windows: skip steps if message begins with ;
This commit is contained in:
parent
4641db4604
commit
88c6d47e32
21
.github/workflows/linux.yml
vendored
21
.github/workflows/linux.yml
vendored
@ -116,6 +116,11 @@ jobs:
|
|||||||
&& bin/commitlint $RANGE \
|
&& bin/commitlint $RANGE \
|
||||||
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
||||||
|
|
||||||
|
- name: Skip remaining CI steps if latest commit message begins with ;
|
||||||
|
run: |
|
||||||
|
git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \
|
||||||
|
| grep -qE '^ *;' || echo “::set-env name=CONTINUE::true”
|
||||||
|
|
||||||
# things to be cached/restored:
|
# things to be cached/restored:
|
||||||
|
|
||||||
- name: Cache stack global package db
|
- name: Cache stack global package db
|
||||||
@ -126,6 +131,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache stack-installed programs in ~/.local/bin
|
- name: Cache stack-installed programs in ~/.local/bin
|
||||||
id: stack-programs
|
id: stack-programs
|
||||||
@ -135,6 +141,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -143,6 +150,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -151,6 +159,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ 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.ghc }}
|
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -159,6 +168,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ 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.ghc }}
|
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -167,6 +177,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ 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.ghc }}
|
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -175,6 +186,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ 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.ghc }}
|
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# no longer needed I think
|
# no longer needed I think
|
||||||
# For now due to
|
# For now due to
|
||||||
@ -208,6 +220,7 @@ jobs:
|
|||||||
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
||||||
if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
||||||
stack --version
|
stack --version
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install GHC
|
- name: Install GHC
|
||||||
env:
|
env:
|
||||||
@ -216,6 +229,7 @@ jobs:
|
|||||||
df -h
|
df -h
|
||||||
$stack setup --install-ghc
|
$stack setup --install-ghc
|
||||||
df -h
|
df -h
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install haskell deps
|
- name: Install haskell deps
|
||||||
env:
|
env:
|
||||||
@ -223,6 +237,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$stack build --test --bench --only-dependencies
|
$stack build --test --bench --only-dependencies
|
||||||
# --no-terminal
|
# --no-terminal
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Build all hledger modules warning free, optimised and minimised, run unit/doc/bench tests
|
- name: Build all hledger modules warning free, optimised and minimised, run unit/doc/bench tests
|
||||||
env:
|
env:
|
||||||
@ -232,6 +247,7 @@ jobs:
|
|||||||
# build quicker when tweaking ci: $stack install --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
|
# build quicker when tweaking ci: $stack install --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
|
||||||
# -split-sections shrinks binaries by 30% on average here
|
# -split-sections shrinks binaries by 30% on average here
|
||||||
# --pedantic --no-run-benchmarks
|
# --pedantic --no-run-benchmarks
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install shelltestrunner
|
- name: Install shelltestrunner
|
||||||
env:
|
env:
|
||||||
@ -240,6 +256,7 @@ jobs:
|
|||||||
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 install shelltestrunner-1.9; fi
|
||||||
shelltest --version
|
shelltest --version
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Test functional tests (excluding addons)
|
- name: Test functional tests (excluding addons)
|
||||||
env:
|
env:
|
||||||
@ -248,6 +265,7 @@ jobs:
|
|||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons
|
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons
|
||||||
# XXX run the bin/ func tests corresponding to the GHC version enabled above, only
|
# XXX run the bin/ func tests corresponding to the GHC version enabled above, only
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Test haddock generation
|
- name: Test haddock generation
|
||||||
env:
|
env:
|
||||||
@ -256,6 +274,7 @@ jobs:
|
|||||||
time $stack build --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs"
|
time $stack build --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs"
|
||||||
# --no-haddock-hyperlink-source is 25% faster
|
# --no-haddock-hyperlink-source is 25% faster
|
||||||
# --no-print-missing-docs is 600% quieter
|
# --no-print-missing-docs is 600% quieter
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# artifacts:
|
# artifacts:
|
||||||
# XXX unreliable, and we don't need this for every PR; disable for now
|
# XXX unreliable, and we don't need this for every PR; disable for now
|
||||||
@ -273,6 +292,7 @@ jobs:
|
|||||||
# example of setting a context variable, and an attempt to make a nice artifact version suffix.
|
# example of setting a context variable, and an attempt to make a nice artifact version suffix.
|
||||||
# But a constant name is easier in some ways.
|
# But a constant name is easier in some ways.
|
||||||
# echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)"
|
# echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)"
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
# XXX intermittent upload failures
|
||||||
- name: Upload executables artifact
|
- name: Upload executables artifact
|
||||||
@ -281,6 +301,7 @@ jobs:
|
|||||||
# name: hledger-ubuntu-${{ steps.exes.outputs.version }}
|
# name: hledger-ubuntu-${{ steps.exes.outputs.version }}
|
||||||
name: hledger-ubuntu
|
name: hledger-ubuntu
|
||||||
path: tmp/hledger
|
path: tmp/hledger
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
20
.github/workflows/mac.yml
vendored
20
.github/workflows/mac.yml
vendored
@ -73,6 +73,11 @@ jobs:
|
|||||||
&& bin/commitlint $RANGE \
|
&& bin/commitlint $RANGE \
|
||||||
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
||||||
|
|
||||||
|
- name: Skip remaining CI steps if latest commit message begins with ;
|
||||||
|
run: |
|
||||||
|
git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \
|
||||||
|
| grep -qE '^ *;' || echo “::set-env name=CONTINUE::true”
|
||||||
|
|
||||||
# things to be cached/restored:
|
# things to be cached/restored:
|
||||||
|
|
||||||
- name: Cache stack global package db
|
- name: Cache stack global package db
|
||||||
@ -83,6 +88,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-global-after202110110
|
${{ runner.os }}-stack-global-after202110110
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache stack-installed programs in ~/.local/bin
|
- name: Cache stack-installed programs in ~/.local/bin
|
||||||
id: stack-programs
|
id: stack-programs
|
||||||
@ -92,6 +98,7 @@ 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
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -100,6 +107,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-work
|
${{ runner.os }}-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -108,6 +116,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-lib-stack-work
|
${{ runner.os }}-hledger-lib-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -116,6 +125,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-stack-work
|
${{ runner.os }}-hledger-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -124,6 +134,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-ui-stack-work
|
${{ runner.os }}-hledger-ui-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -132,6 +143,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-web-stack-work
|
${{ runner.os }}-hledger-web-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# actions:
|
# actions:
|
||||||
|
|
||||||
@ -145,18 +157,21 @@ jobs:
|
|||||||
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
||||||
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
||||||
stack --version
|
stack --version
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install GHC
|
- name: Install GHC
|
||||||
env:
|
env:
|
||||||
stack: ${{ matrix.plan.stack }}
|
stack: ${{ matrix.plan.stack }}
|
||||||
run: |
|
run: |
|
||||||
$stack setup --install-ghc
|
$stack setup --install-ghc
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install haskell deps
|
- name: Install haskell deps
|
||||||
env:
|
env:
|
||||||
stack: ${{ matrix.plan.stack }}
|
stack: ${{ matrix.plan.stack }}
|
||||||
run: |
|
run: |
|
||||||
$stack build --test --only-dependencies
|
$stack build --test --only-dependencies
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Build hledger and test unit tests, doc tests
|
- name: Build hledger and test unit tests, doc tests
|
||||||
env:
|
env:
|
||||||
@ -165,6 +180,7 @@ jobs:
|
|||||||
$stack install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
|
$stack 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
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install shelltestrunner
|
- name: Install shelltestrunner
|
||||||
env:
|
env:
|
||||||
@ -173,6 +189,7 @@ jobs:
|
|||||||
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 install shelltestrunner-1.9; fi
|
||||||
shelltest --version
|
shelltest --version
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Test functional tests (excluding addons)
|
- name: Test functional tests (excluding addons)
|
||||||
env:
|
env:
|
||||||
@ -180,6 +197,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons # bin
|
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons # bin
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# artifacts:
|
# artifacts:
|
||||||
|
|
||||||
@ -192,6 +210,7 @@ jobs:
|
|||||||
cp ~/.local/bin/hledger .
|
cp ~/.local/bin/hledger .
|
||||||
cp ~/.local/bin/hledger-ui .
|
cp ~/.local/bin/hledger-ui .
|
||||||
cp ~/.local/bin/hledger-web .
|
cp ~/.local/bin/hledger-web .
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
# XXX intermittent upload failures
|
||||||
- name: Upload executables artifact
|
- name: Upload executables artifact
|
||||||
@ -199,3 +218,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: hledger-macos
|
name: hledger-macos
|
||||||
path: tmp/hledger
|
path: tmp/hledger
|
||||||
|
if: env.CONTINUE
|
||||||
|
18
.github/workflows/windows.yml
vendored
18
.github/workflows/windows.yml
vendored
@ -63,6 +63,11 @@ jobs:
|
|||||||
&& bin/commitlint $RANGE \
|
&& bin/commitlint $RANGE \
|
||||||
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
||||||
|
|
||||||
|
- name: Skip remaining CI steps if latest commit message begins with ;
|
||||||
|
run: |
|
||||||
|
git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \
|
||||||
|
| grep -qE '^ *;' || echo “::set-env name=CONTINUE::true”
|
||||||
|
|
||||||
# things to be cached/restored:
|
# things to be cached/restored:
|
||||||
|
|
||||||
- name: Cache stack global package db
|
- name: Cache stack global package db
|
||||||
@ -73,6 +78,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-appdata-roaming-stack
|
${{ runner.os }}-appdata-roaming-stack
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- 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
|
||||||
@ -84,6 +90,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-appdata-local-programs-stack
|
${{ runner.os }}-appdata-local-programs-stack
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache .stack-work
|
- name: Cache .stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -92,6 +99,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-stack-work
|
${{ runner.os }}-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-lib/.stack-work
|
- name: Cache hledger-lib/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -100,6 +108,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-lib-stack-work
|
${{ runner.os }}-hledger-lib-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger/.stack-work
|
- name: Cache hledger/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -108,6 +117,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-stack-work
|
${{ runner.os }}-hledger-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-ui/.stack-work
|
- name: Cache hledger-ui/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -116,6 +126,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-ui-stack-work
|
${{ runner.os }}-hledger-ui-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Cache hledger-web/.stack-work
|
- name: Cache hledger-web/.stack-work
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -124,6 +135,7 @@ jobs:
|
|||||||
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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-hledger-web-stack-work
|
${{ runner.os }}-hledger-web-stack-work
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# - name: showStuff
|
# - name: showStuff
|
||||||
# shell: bash
|
# shell: bash
|
||||||
@ -156,12 +168,14 @@ jobs:
|
|||||||
stack --version
|
stack --version
|
||||||
which ./stack
|
which ./stack
|
||||||
./stack --version
|
./stack --version
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
- name: Install GHC
|
- name: Install GHC
|
||||||
# if: steps.stack-programs-dir.outputs.cache-hit != 'true'
|
# if: steps.stack-programs-dir.outputs.cache-hit != 'true'
|
||||||
# set PATH=C:\Users\runneradmin\AppData\Local\Programs\stack\local\bin;%PATH%
|
# set PATH=C:\Users\runneradmin\AppData\Local\Programs\stack\local\bin;%PATH%
|
||||||
run: |
|
run: |
|
||||||
./stack --no-terminal setup --install-ghc
|
./stack --no-terminal setup --install-ghc
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# - name: Install shelltestrunner
|
# - name: Install shelltestrunner
|
||||||
## - export PATH=~/.local/bin:$PATH
|
## - export PATH=~/.local/bin:$PATH
|
||||||
@ -171,6 +185,7 @@ jobs:
|
|||||||
- name: Install haskell deps
|
- name: Install haskell deps
|
||||||
run: |
|
run: |
|
||||||
./stack --no-terminal build --only-dependencies
|
./stack --no-terminal build --only-dependencies
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# use whichever GHC is in default stack.yaml
|
# use whichever GHC is in default stack.yaml
|
||||||
|
|
||||||
@ -179,6 +194,7 @@ jobs:
|
|||||||
./stack --no-terminal install --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
|
./stack --no-terminal install --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
|
||||||
# --ghc-options=-split-sections doesn't work on windows, "too many sections"
|
# --ghc-options=-split-sections doesn't work on windows, "too many sections"
|
||||||
# --pedantic
|
# --pedantic
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# run hledger-lib/hledger functional tests, skipping the ones for addons
|
# run hledger-lib/hledger functional tests, skipping the ones for addons
|
||||||
## - export PATH=~/.local/bin:$PATH
|
## - export PATH=~/.local/bin:$PATH
|
||||||
@ -194,6 +210,7 @@ jobs:
|
|||||||
cd hledger
|
cd hledger
|
||||||
copy C:\Users\runneradmin\AppData\Roaming\local\bin\hledger.exe .
|
copy C:\Users\runneradmin\AppData\Roaming\local\bin\hledger.exe .
|
||||||
copy C:\Users\runneradmin\AppData\Roaming\local\bin\hledger-web.exe .
|
copy C:\Users\runneradmin\AppData\Roaming\local\bin\hledger-web.exe .
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
# XXX intermittent upload failures
|
||||||
- name: Create executables artifact
|
- name: Create executables artifact
|
||||||
@ -201,4 +218,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: hledger-windows
|
name: hledger-windows
|
||||||
path: tmp/hledger
|
path: tmp/hledger
|
||||||
|
if: env.CONTINUE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user