ci: binaries: tool setup fixes, label tool version output

This commit is contained in:
Simon Michael 2024-04-17 14:22:40 -10:00
parent 7249fa80cd
commit 4e5a2dcc70
4 changed files with 26 additions and 28 deletions

View File

@ -122,13 +122,16 @@ jobs:
run: | 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 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
- name: Install haskell tools with ghcup if needed, and add .ghcup/bin to PATH - name: Add .ghcup/bin to PATH for following steps
run: | run: |
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
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; 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; ghc --version - name: Install haskell tools with ghcup if needed
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; cabal --version run: |
if [[ ! -x ~/.ghcup/bin/stack ]]; then ~/.ghcup/bin/ghcup install stack 2.15.5 && ~/.ghcup/bin/ghcup set stack 2.15.5; fi; stack --version 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 # build with cabal

View File

@ -185,7 +185,7 @@ jobs:
env: env:
stack: ${{ matrix.plan.stack }} stack: ${{ matrix.plan.stack }}
run: | run: |
printf "haddock version: "; haddock --version printf "haddock: "; stack exec -- haddock --version
time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" time $stack build --fast --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

View File

@ -119,16 +119,11 @@ jobs:
run: | run: |
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
- name: Install stack with ghcup if needed - name: Install haskell tools with ghcup if needed
run: | run: |
if [[ ! -x ~/.ghcup/bin/ghcup ]]; then if [[ ! -x ~/.ghcup/bin/ghcup ]]; then mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup; fi; printf "ghcup: "; ghcup --version
mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup 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
fi #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
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
stack --version
if: env.CONTINUE if: env.CONTINUE
- name: Install GHC with stack - name: Install GHC with stack
@ -179,17 +174,17 @@ jobs:
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 # bin 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 # bin
if: env.CONTINUE if: env.CONTINUE
# This is tested here rather than in the regular CI because it's slow, # # This is tested here rather than in the regular CI because it's slow,
# doesn't fail too often, and the cost of late detection and fixing is low. # # doesn't fail too often, and the cost of late detection and fixing is low.
- name: Test haddock generation # - name: Test haddock generation
env: # env:
stack: ${{ matrix.plan.stack }} # stack: ${{ matrix.plan.stack }}
run: | # run: |
printf "haddock version: "; haddock --version # printf "haddock: "; stack exec -- haddock --version
time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" # time $stack build --fast --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 # if: env.CONTINUE
# artifacts: # artifacts:

View File

@ -127,9 +127,9 @@ jobs:
curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip
7z x stack.zip stack.exe 7z x stack.zip stack.exe
which stack which stack
stack --version printf "stack: "; stack --version
which ./stack which ./stack
./stack --version printf "./stack: "; ./stack --version
if: env.CONTINUE if: env.CONTINUE
- name: Install GHC - name: Install GHC