From 4c8ca387f7557267e9996c8cff54192f0dfb4f70 Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Tue, 31 Dec 2024 09:45:07 -0500 Subject: [PATCH] try to figure out why static builds lack git info --- .github/workflows/validate.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index daa0811440d..c98913de8f7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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 @@ -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)