Skip to content

Commit

Permalink
ci: binaries: tool setup fixes, label tool version output
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Apr 18, 2024
1 parent 861e0f2 commit 27c981a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/binaries-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,16 @@ jobs:
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
- name: Install haskell tools with ghcup if needed, and add .ghcup/bin to PATH
- name: Add .ghcup/bin to PATH for following steps
run: |
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
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
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
- 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/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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/binaries-mac-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
env:
stack: ${{ matrix.plan.stack }}
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"
# --no-haddock-hyperlink-source is 25% faster
# --no-print-missing-docs is 600% quieter
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/binaries-mac-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,11 @@ jobs:
run: |
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
- name: Install stack with ghcup if needed
- 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-apple-darwin-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup
fi
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 [[ ! -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
#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: env.CONTINUE

- name: Install GHC with stack
Expand Down Expand Up @@ -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
if: env.CONTINUE

# 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.
- name: Test haddock generation
env:
stack: ${{ matrix.plan.stack }}
run: |
printf "haddock version: "; haddock --version
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-print-missing-docs is 600% quieter
if: env.CONTINUE
# # 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.
# - name: Test haddock generation
# env:
# stack: ${{ matrix.plan.stack }}
# run: |
# printf "haddock: "; stack exec -- haddock --version
# 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-print-missing-docs is 600% quieter
# if: env.CONTINUE

# artifacts:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/binaries-windows-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ jobs:
curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip
7z x stack.zip stack.exe
which stack
stack --version
printf "stack: "; stack --version
which ./stack
./stack --version
printf "./stack: "; ./stack --version
if: env.CONTINUE

- name: Install GHC
Expand Down

0 comments on commit 27c981a

Please sign in to comment.