diff --git a/.github/workflows/binaries-linux-arm32v7.yml b/.github/workflows/binaries-linux-arm32v7.yml index 68890265c..b53c50754 100644 --- a/.github/workflows/binaries-linux-arm32v7.yml +++ b/.github/workflows/binaries-linux-arm32v7.yml @@ -5,19 +5,12 @@ # Slow, will probably time out. name: binaries-linux-arm32v7 - on: push: branches: [ binaries-linux-arm32v7 ] - #tags: - # - '[0-9]+.[0-9]+' - # - '[0-9]+.[0-9]+-*' - # - '[0-9]+.[0-9]+.[0-9]+' - # - '[0-9]+.[0-9]+.[0-9]+-*' workflow_dispatch: - jobs: - docker: + build: runs-on: ubuntu-latest steps: - name: Set up QEMU diff --git a/.github/workflows/binaries-linux-x64-stack.yml b/.github/workflows/binaries-linux-x64-stack.yml new file mode 100644 index 000000000..c81d02c46 --- /dev/null +++ b/.github/workflows/binaries-linux-x64-stack.yml @@ -0,0 +1,137 @@ +# Runs on any push to binaries-linux-x64-stack. +# Like binaries-linux-x64.yml except it builds with stack instead of cabal. + +name: binaries-linux-x64-stack +on: + push: + branches: [ binaries-linux-x64-stack ] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + container: alpine:latest + steps: + + - name: Check out + uses: actions/checkout@v4 + # have to fetch everything for git describe for --version + with: + fetch-depth: 0 + + # things to be cached/restored: + + - name: process cache of stack global package db + id: stack-global + uses: actions/cache@v4 + with: + path: ~/.stack + key: ${{ runner.os }}-stack-global-20240417-${{ hashFiles('**.yaml') }} + restore-keys: | + ${{ runner.os }}-stack-global-20240417 + + - name: process cache of stack-installed programs in ~/.local/bin + id: stack-programs + uses: actions/cache@v4 + with: + path: ~/.local/bin + key: ${{ runner.os }}-stack-programs-20240417-${{ hashFiles('**.yaml') }} + restore-keys: | + ${{ runner.os }}-stack-programs-20240417 + + - name: process cache of .stack-work + uses: actions/cache@v4 + with: + path: .stack-work + key: ${{ runner.os }}-stack-work-20240417-${{ hashFiles('**.yaml') }} + restore-keys: | + ${{ runner.os }}-stack-work-20240417 + + - name: process cache of hledger-lib/.stack-work + uses: actions/cache@v4 + with: + path: hledger-lib/.stack-work + key: ${{ runner.os }}-hledger-lib-stack-work-20240417-${{ hashFiles('hledger-lib/package.yaml') }} + restore-keys: | + ${{ runner.os }}-hledger-lib-stack-work-20240417 + + - name: process cache of hledger/.stack-work + uses: actions/cache@v4 + with: + path: hledger/.stack-work + key: ${{ runner.os }}-hledger-stack-work-20240417-${{ hashFiles('hledger/package.yaml') }} + restore-keys: | + ${{ runner.os }}-hledger-stack-work-20240417 + + - name: process cache of hledger-ui/.stack-work + uses: actions/cache@v4 + with: + path: hledger-ui/.stack-work + key: ${{ runner.os }}-hledger-ui-stack-work-20240417-${{ hashFiles('hledger-ui/package.yaml') }} + restore-keys: | + ${{ runner.os }}-hledger-ui-stack-work-20240417 + + - name: process cache of hledger-web/.stack-work + uses: actions/cache@v4 + with: + path: hledger-web/.stack-work + key: ${{ runner.os }}-hledger-web-stack-work-20240417-${{ hashFiles('hledger-web/package.yaml') }} + restore-keys: | + ${{ runner.os }}-hledger-web-stack-work-20240417 + + # actions: + + - name: Install general tools with system package manager + run: | + apk --no-cache add binutils-gold curl gcc g++ git gmp-dev ncurses-dev ncurses-static libffi-dev make xz tar perl zlib-dev zlib-static + + # needed by stack, at least; do it here in case it matters for ghcup too + - name: Fix $HOME for following steps (workaround from https://github.com/actions/runner/issues/863) + run: | + apk --no-cache add sudo + echo "setting HOME=/root" + echo HOME=/root | sudo tee -a $GITHUB_ENV + + - name: Add .ghcup/bin to PATH for following steps + run: | + echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH + + - name: Install haskell tools with ghcup if needed + run: | + if [[ ! -x ~/.ghcup/bin/ghcup ]]; then mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup; fi; printf "ghcup: "; ghcup --version + if [[ ! -x ~/.ghcup/bin/stack ]]; then ~/.ghcup/bin/ghcup install stack 2.15.5 && ~/.ghcup/bin/ghcup set stack 2.15.5; fi; printf "stack: "; stack --version + + # --allow-different-user is needed because of #863 above (or because stack didn't notice we're in a docker container) + - name: Install GHC with stack + run: | + stack --allow-different-user setup --install-ghc + + - name: Build with stack + run: | + stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger # || (echo "ERROR: building hledger failed"; false) + stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger-ui # || (echo "ERROR: building hledger-ui failed"; false) + stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger-web # || (echo "ERROR: building hledger-web failed"; false) + + - name: Run built-in unit tests + run: | + stack exec -- hledger test + + - name: Gather binaries + run: | + mkdir tmp + cd tmp + cp ~/.local/bin/hledger . + cp ~/.local/bin/hledger-ui . + cp ~/.local/bin/hledger-web . + strip hledger + strip hledger-ui + strip hledger-web + tar cvf hledger-mac-x64.tar hledger hledger-ui hledger-web + + # upload-artifact loses execute permissions, so we tar the binaries to preserve them. + # github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar. + # Unfortunately it means users must both unzip and untar. + - name: Upload binaries + uses: actions/upload-artifact@v4 + with: + name: hledger-linux-x64 + path: tmp/hledger-linux-x64.tar diff --git a/.github/workflows/binaries-linux-x64.yml b/.github/workflows/binaries-linux-x64.yml index 367a2f58d..a92db517e 100644 --- a/.github/workflows/binaries-linux-x64.yml +++ b/.github/workflows/binaries-linux-x64.yml @@ -1,20 +1,13 @@ # Runs on any push to binaries-linux-x64 or binaries. # Produces optimised static x64 linux binaries, -# using the GHC version below and (cabal or stack) and Alpine linux, +# using the GHC version below and cabal and Alpine linux, # which provides the statically-linkable musl. name: binaries-linux-x64 - on: push: branches: [ binaries-linux-x64, binaries ] - #tags: - # - '[0-9]+.[0-9]+' - # - '[0-9]+.[0-9]+-*' - # - '[0-9]+.[0-9]+.[0-9]+' - # - '[0-9]+.[0-9]+.[0-9]+-*' workflow_dispatch: - jobs: build: runs-on: ubuntu-latest @@ -47,77 +40,12 @@ jobs: restore-keys: | ${{ runner.os }}-cabal - # - name: process cache of stack global package db - # id: stack-global - # uses: actions/cache@v4 - # with: - # path: ~/.stack - # key: ${{ runner.os }}-stack-global-20240417-${{ hashFiles('**.yaml') }} - # restore-keys: | - # ${{ runner.os }}-stack-global-20240417 - - # - name: process cache of stack-installed programs in ~/.local/bin - # id: stack-programs - # uses: actions/cache@v4 - # with: - # path: ~/.local/bin - # key: ${{ runner.os }}-stack-programs-20240417-${{ hashFiles('**.yaml') }} - # restore-keys: | - # ${{ runner.os }}-stack-programs-20240417 - - # - name: process cache of .stack-work - # uses: actions/cache@v4 - # with: - # path: .stack-work - # key: ${{ runner.os }}-stack-work-20240417-${{ hashFiles('**.yaml') }} - # restore-keys: | - # ${{ runner.os }}-stack-work-20240417 - - # - name: process cache of hledger-lib/.stack-work - # uses: actions/cache@v4 - # with: - # path: hledger-lib/.stack-work - # key: ${{ runner.os }}-hledger-lib-stack-work-20240417-${{ hashFiles('hledger-lib/package.yaml') }} - # restore-keys: | - # ${{ runner.os }}-hledger-lib-stack-work-20240417 - - # - name: process cache of hledger/.stack-work - # uses: actions/cache@v4 - # with: - # path: hledger/.stack-work - # key: ${{ runner.os }}-hledger-stack-work-20240417-${{ hashFiles('hledger/package.yaml') }} - # restore-keys: | - # ${{ runner.os }}-hledger-stack-work-20240417 - - # - name: process cache of hledger-ui/.stack-work - # uses: actions/cache@v4 - # with: - # path: hledger-ui/.stack-work - # key: ${{ runner.os }}-hledger-ui-stack-work-20240417-${{ hashFiles('hledger-ui/package.yaml') }} - # restore-keys: | - # ${{ runner.os }}-hledger-ui-stack-work-20240417 - - # - name: process cache of hledger-web/.stack-work - # uses: actions/cache@v4 - # with: - # path: hledger-web/.stack-work - # key: ${{ runner.os }}-hledger-web-stack-work-20240417-${{ hashFiles('hledger-web/package.yaml') }} - # restore-keys: | - # ${{ runner.os }}-hledger-web-stack-work-20240417 - # actions: - name: Install general tools with system package manager run: | apk --no-cache add binutils-gold curl gcc g++ git gmp-dev ncurses-dev ncurses-static libffi-dev make xz tar perl zlib-dev zlib-static - # needed by stack, at least; do it here in case it matters for ghcup too - # - name: Fix $HOME for following steps (workaround from https://github.com/actions/runner/issues/863) - # run: | - # apk --no-cache add sudo - # echo "setting HOME=/root" - # echo HOME=/root | sudo tee -a $GITHUB_ENV - - name: Add .ghcup/bin to PATH for following steps run: | echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH @@ -127,10 +55,6 @@ jobs: if [[ ! -x ~/.ghcup/bin/ghcup ]]; then mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup; fi; printf "ghcup: "; ghcup --version if [[ ! -x ~/.ghcup/bin/ghc-9.8.2 ]]; then ~/.ghcup/bin/ghcup install ghc 9.8.2 && ~/.ghcup/bin/ghcup set ghc 9.8.2; fi; printf "ghc: "; ghc --version if [[ ! -x ~/.ghcup/bin/cabal ]]; then ~/.ghcup/bin/ghcup install cabal 3.10.3.0 && ~/.ghcup/bin/ghcup set cabal 3.10.3.0; fi; printf "cabal: "; cabal --version - # if [[ ! -x ~/.ghcup/bin/stack ]]; then ~/.ghcup/bin/ghcup install stack 2.15.5 && ~/.ghcup/bin/ghcup set stack 2.15.5; fi; printf "stack: "; stack --version - - - ## build with cabal - name: Update cabal package index run: | @@ -154,39 +78,6 @@ jobs: strip hledger-web tar cvf hledger-linux-x64.tar hledger hledger-ui hledger-web - ## build with stack - # --allow-different-user is needed because of #863 above, or because stack didn't notice we're in a docker container - # failing with: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld.gold: error: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/crtbeginT.o: requires dynamic R_X86_64_32 reloc against '__TMC_END__' which may overflow at runtime; recompile with -fPIC - # TODO: try again now with alpine:latest - - # - name: Install GHC with stack - # run: | - # stack --allow-different-user setup --install-ghc - - # - name: Build with stack - # run: | - # stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger # || (echo "ERROR: building hledger failed"; false) - # stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger-ui # || (echo "ERROR: building hledger-ui failed"; false) - # stack --allow-different-user build --ghc-options='-optl-static -fPIC' hledger-web # || (echo "ERROR: building hledger-web failed"; false) - - # - name: Run built-in unit tests - # run: | - # stack exec -- hledger test - - # - name: Gather binaries - # run: | - # mkdir tmp - # cd tmp - # cp ~/.local/bin/hledger . - # cp ~/.local/bin/hledger-ui . - # cp ~/.local/bin/hledger-web . - # strip hledger - # strip hledger-ui - # strip hledger-web - # tar cvf hledger-mac-x64.tar hledger hledger-ui hledger-web - - ## - # upload-artifact loses execute permissions, so we tar the binaries to preserve them. # github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar. # Unfortunately it means users must both unzip and untar. diff --git a/.github/workflows/binaries-mac-arm64.yml b/.github/workflows/binaries-mac-arm64.yml index dba01416f..44ecf0e98 100644 --- a/.github/workflows/binaries-mac-arm64.yml +++ b/.github/workflows/binaries-mac-arm64.yml @@ -3,42 +3,17 @@ # using the default stack.yaml's GHC version. name: binaries-mac-arm64 - on: - # Avoid, because these run in all forks also. - # jobs: - # job_id: - # if: github.event.pull_request.head.repo.full_name == github.repository - # schedule: - # - cron: "0 07 * * 0" # sunday midnight pacific - push: branches: [ binaries-mac-arm64, binaries ] workflow_dispatch: - jobs: build: # arm64 runs-on: macos-latest - - # strategy: - # fail-fast: false - # matrix: - # plan: - # # - { ghc: "810" , stack: "stack --stack-yaml=stack8.10.yaml" } - # # XXX func tests in bin should be run only with GHC 8.10 for now (see shelltest below) (?) - # # - { ghc: "90" , stack: "stack --stack-yaml=stack9.0.yaml" } - # # - { ghc: "92" , stack: "stack --stack-yaml=stack9.2.yaml" } - # # - { ghc: "94" , stack: "stack --stack-yaml=stack9.4.yaml" } - # # - { ghc: "96" , stack: "stack --stack-yaml=stack9.6.yaml" } - # - { ghc: "98" , stack: "stack --stack-yaml=stack.yaml" } - env: ghc: 98 stack: stack - # declare this to prevent "Context access might be invalid" warnings below - CONTINUE: - steps: - name: Check out diff --git a/.github/workflows/binaries-mac-x64.yml b/.github/workflows/binaries-mac-x64.yml index 39d84b86f..013d5b8e1 100644 --- a/.github/workflows/binaries-mac-x64.yml +++ b/.github/workflows/binaries-mac-x64.yml @@ -3,42 +3,17 @@ # using the default stack.yaml's GHC version. name: binaries-mac-x64 - on: - # Avoid, because these run in all forks also. - # jobs: - # job_id: - # if: github.event.pull_request.head.repo.full_name == github.repository - # schedule: - # - cron: "0 07 * * 0" # sunday midnight pacific - push: branches: [ binaries-mac-x64, binaries ] workflow_dispatch: - jobs: build: # x64 runs-on: macos-13 - - # strategy: - # fail-fast: false - # matrix: - # plan: - # # - { ghc: "810" , stack: "stack --stack-yaml=stack8.10.yaml" } - # # XXX func tests in bin should be run only with GHC 8.10 for now (see shelltest below) (?) - # # - { ghc: "90" , stack: "stack --stack-yaml=stack9.0.yaml" } - # # - { ghc: "92" , stack: "stack --stack-yaml=stack9.2.yaml" } - # # - { ghc: "94" , stack: "stack --stack-yaml=stack9.4.yaml" } - # # - { ghc: "96" , stack: "stack --stack-yaml=stack9.6.yaml" } - # - { ghc: "98" , stack: "stack --stack-yaml=stack.yaml" } - env: ghc: 944 stack: stack --stack-yaml=stack9.4.yaml - # declare this to prevent "Context access might be invalid" warnings below - CONTINUE: - steps: - name: Check out diff --git a/.github/workflows/binaries-windows-x64.yml b/.github/workflows/binaries-windows-x64.yml index 15c1b2d84..cf5c64717 100644 --- a/.github/workflows/binaries-windows-x64.yml +++ b/.github/workflows/binaries-windows-x64.yml @@ -4,17 +4,10 @@ # Currently runs no tests. name: binaries-windows-x64 - on: - # Avoid, because these run in all forks also. - # schedule: - # - cron: "0 07 * * 0" # sunday midnight pacific - push: branches: [ binaries-windows-x64, binaries ] workflow_dispatch: - - jobs: build: runs-on: windows-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 309422425..40a877c1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,33 +1,21 @@ # The main hledger continuous integration test workflow. -# Passing this is required for merging/pushing to master, per -# https://github.com/simonmichael/hledger/settings/branch_protection_rules/17386787 +# Builds all packages expecting no warnings, runs lots of tests, +# and on success, saves the binaries as an artifact. +# Code must pass this successfully before it can be merged or pushed to master +# (https://github.com/simonmichael/hledger/settings/branch_protection_rules/17386787). name: ci - -# When and where does this workflow run ? on: # When manually triggered in github ui, it runs in master. workflow_dispatch: - - # On this schedule, it runs in master. - # schedule: - # - cron: "0 07 * * 0" # sunday midnight pacific - # Avoid, because these run in all forks also. - # Possible workaround; does it prevent wasteful startups ? - # https://github.com/orgs/community/discussions/26409#discussioncomment-3251818 - # jobs: - # job_id: - # if: github.event.pull_request.head.repo.full_name == github.repository - - # When there's a push to the ci branch, it runs there. - # After passing there it can be merged/pushed to master. + # When there's a push to the ci branch, it runs in that branch. + # After it passes, those commits can be merged/pushed to master. # (Don't use these branches for pull requests, or it will run twice, # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/2) push: branches: [ ci ] - - # When there's a pull request against master, it runs in the PR branch. - # After passing there it can be merged/pushed to master. + # When there's a pull request against master, it runs in the pull request's branch. + # After it passes, that branch can be merged/pushed to master. pull_request: branches: [ master ] # Uncomment to run it only for changes to these paths: (but that could prevent merging) @@ -53,31 +41,14 @@ on: # - '!**.5' # - '!**.info' # - '!**.txt' - -# What does it do ? jobs: - - # Build all expecting no warnings and run unit/doc/functional/haddock/bench tests, - # with the platform(s) and GHC version(s) enabled below. - # On success, upload the binaries as a downloadable artifact. - ci: + citest: runs-on: ubuntu-latest - - # strategy: - # fail-fast: false - # matrix: - # # keep synced with branch protection rules, see link above - # plan: - # # the oldest supported ghc, to check backward compatibility - # # - { ghc: "810", stack: "stack --stack-yaml=stack8.10.yaml" } - # - { ghc: "944", stack: "stack --stack-yaml=stack9.4.yaml" } - env: ghc: 944 stack: stack --stack-yaml=stack9.4.yaml # declare this to prevent "Context access might be invalid" warnings below - CONTINUE: - + do-all: steps: - name: Check out @@ -86,7 +57,7 @@ jobs: with: fetch-depth: 0 - - name: Print debug output + - name: Print some context for troubleshooting env: GITHUB_CONTEXT: ${{ toJson(github) }} run: | @@ -138,14 +109,14 @@ jobs: run: | echo "git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog" (git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog \ - && (grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV)) \ - || ( echo "could not identify commit range, continuing CI steps"; echo "CONTINUE=true" >> $GITHUB_ENV ) + && (grep -qE '^ *;' $$.gitlog || echo "do-all=true" >> $GITHUB_ENV)) \ + || ( echo "could not identify commit range, continuing CI steps"; echo "do-all=true" >> $GITHUB_ENV ) - name: Check embedded files run: | sudo apt install -y ripgrep tools/checkembeddedfiles - if: env.CONTINUE + if: env.do-all # things to be cached/restored: @@ -160,7 +131,7 @@ jobs: key: ${{ runner.os }}-stack-global-$ghc-${{ hashFiles('**.yaml') }} restore-keys: | ${{ runner.os }}-stack-global-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache stack-installed programs in ~/.local/bin id: stack-programs @@ -170,7 +141,7 @@ jobs: key: ${{ runner.os }}-stack-programs-$ghc-${{ hashFiles('**.yaml') }} restore-keys: | ${{ runner.os }}-stack-programs-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache .stack-work uses: actions/cache@v4 @@ -179,7 +150,7 @@ jobs: key: ${{ runner.os }}-stack-work-$ghc-${{ hashFiles('**.yaml') }} restore-keys: | ${{ runner.os }}-stack-work-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache hledger-lib/.stack-work uses: actions/cache@v4 @@ -188,7 +159,7 @@ jobs: key: ${{ runner.os }}-hledger-lib-stack-work-$ghc-${{ hashFiles('hledger-lib/package.yaml') }} restore-keys: | ${{ runner.os }}-hledger-lib-stack-work-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache hledger/.stack-work uses: actions/cache@v4 @@ -197,7 +168,7 @@ jobs: key: ${{ runner.os }}-hledger-stack-work-$ghc-${{ hashFiles('hledger/package.yaml') }} restore-keys: | ${{ runner.os }}-hledger-stack-work-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache hledger-ui/.stack-work uses: actions/cache@v4 @@ -206,7 +177,7 @@ jobs: key: ${{ runner.os }}-hledger-ui-stack-work-$ghc-${{ hashFiles('hledger-ui/package.yaml') }} restore-keys: | ${{ runner.os }}-hledger-ui-stack-work-$ghc - if: env.CONTINUE + if: env.do-all - name: Uncache hledger-web/.stack-work uses: actions/cache@v4 @@ -215,7 +186,7 @@ jobs: key: ${{ runner.os }}-hledger-web-stack-work-$ghc-${{ hashFiles('hledger-web/package.yaml') }} restore-keys: | ${{ runner.os }}-hledger-web-stack-work-$ghc - if: env.CONTINUE + if: env.do-all # actions: @@ -226,21 +197,20 @@ 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 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 - if: env.CONTINUE + if: env.do-all - name: Install GHC run: | $stack setup --install-ghc - if: env.CONTINUE + if: env.do-all - name: Install haskell deps run: | $stack build --test --bench --only-dependencies --dry-run $stack build --test --bench --only-dependencies - if: env.CONTINUE + if: env.do-all # Packages are built one at a time to fail faster on error. - # Note: doctests won't run if using GHC 9.0, see hledger-lib/package.yaml # Takes ~2m on a 2023 github worker. - name: Build all hledger modules fast, warning free, run unit/doc/bench tests run: | @@ -249,14 +219,14 @@ jobs: $stack install --fast --ghc-options=-Werror --test --bench hledger-ui $stack install --fast --ghc-options=-Werror --test --bench hledger-web # --ghc-options=-split-sections --no-terminal - if: env.CONTINUE + if: env.do-all - name: Install shelltestrunner run: | export PATH=~/.local/bin:$PATH if [[ ! -x ~/.local/bin/shelltest ]]; then $stack install shelltestrunner-1.10; fi shelltest --version - if: env.CONTINUE + if: env.do-all # Takes ~30s on a 2023 github worker. - name: Test functional tests (excluding addons) @@ -264,10 +234,10 @@ jobs: export PATH=~/.local/bin:$PATH COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons -x ledger-compat/ledger-baseline -x ledger-compat/ledger-regress -x ledger-compat/ledger-collected # XXX run the bin/ func tests corresponding to the GHC version enabled above, only - if: env.CONTINUE + if: env.do-all # Takes 1m+ on a 2023 github worker. - # Moved to (one of) the binaries-* workflows instead; + # Moved to binaries-mac-arm64 workflow instead; # haddock breakage might not be found until release time but it's easy to fix. # - name: Test haddock generation # env: @@ -277,7 +247,7 @@ jobs: # time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" || echo "HADDOCK FAILED, IGNORING" # # --no-haddock-hyperlink-source is 25% faster # # --no-print-missing-docs is 600% quieter - # if: env.CONTINUE + # if: env.do-all - name: Gather binaries id: exes @@ -291,10 +261,7 @@ jobs: strip hledger-ui strip hledger-web tar cvf hledger-linux-x64.tar hledger hledger-ui hledger-web - if: env.CONTINUE - - # how to set a context variable, and an attempt to make a nice artifact version suffix: - # echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)" + if: env.do-all # upload-artifact loses execute permissions, so we tar the binaries to preserve them. # github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar. @@ -304,10 +271,14 @@ jobs: with: name: hledger-linux-x64 path: tmp/hledger-linux-x64.tar - if: env.CONTINUE + if: env.do-all + # snippets + + # how to set a context variable, and an attempt to make a nice artifact version suffix: + # echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)" # - name: show stuff # run: |