Skip to content

Commit

Permalink
try to figure out why static builds lack git info
Browse files Browse the repository at this point in the history
  • Loading branch information
geekosaur committed Dec 31, 2024
1 parent 62073c9 commit 4c8ca38
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,11 @@ jobs:
apk add bash curl sudo jq pkgconfig \
zlib-dev zlib-static binutils-gold curl \
gcc g++ gmp-dev libc-dev libffi-dev make \
musl-dev ncurses-dev perl tar xz
musl-dev ncurses-dev perl tar xz git
# Apparently there's some permissions thing inside vs. outside the container
# that Alpine's git doesn't like. Hack around it.
- run: git config --global --add safe.directory $(pwd)

- uses: actions/checkout@v4

Expand Down Expand Up @@ -368,9 +372,18 @@ jobs:
run: |
echo 'executable-static: true' >> cabal.validate.project
# Try to figure out why we have no git info, part 1
- run: git status

- name: Build
run: sh validate.sh $FLAGS -s build

# Try to figure out why we have no git info, part 2
- run: |
if $(cabal list-bin --builddir=dist-newstyle-validate-ghc-${{ env.GHC_FOR_RELEASE }} --project-file=cabal.validate.project cabal-install:exe:cabal) --version 2>&1 | grep ' , '; then
exit 1
fi
- name: Tar cabal head executable
run: |
CABAL_EXEC=$(cabal list-bin --builddir=dist-newstyle-validate-ghc-${{ env.GHC_FOR_RELEASE }} --project-file=cabal.validate.project cabal-install:exe:cabal)
Expand Down

0 comments on commit 4c8ca38

Please sign in to comment.