@@ -508,6 +508,9 @@ jobs:
508508
509509          make -C git -j$(sysctl -n hw.physicalcpu) GIT-VERSION-FILE dist dist-doc 
510510
511+           export GIT_BUILT_FROM_COMMIT=$(gunzip -c git/git-$VERSION.tar.gz | git get-tar-commit-id) || 
512+             die "Could not determine commit for build" 
513+ 
511514          # Extract tarballs 
512515          mkdir payload manpages 
513516          tar -xvf git/git-$VERSION.tar.gz -C payload 
@@ -708,12 +711,83 @@ jobs:
708711            *.deb 
709712#  End build and sign Debian package
710713
714+   #  Validate installers
715+   validate-installers :
716+     name : Validate installers 
717+     strategy :
718+       matrix :
719+         component :
720+           - os : ubuntu-latest 
721+             artifact : linux-artifacts 
722+             command : git 
723+           - os : macos-latest 
724+             artifact : macos-artifacts 
725+             command : git 
726+           - os : macos-latest 
727+             artifact : macos-artifacts 
728+             command : git 
729+           - os : windows-latest 
730+             artifact : win-installer-x86_64 
731+             command : $PROGRAMFILES\Git\cmd\git.exe 
732+           - os : windows-11-arm 
733+             artifact : win-installer-aarch64 
734+             command : $PROGRAMFILES\Git\cmd\git.exe 
735+     runs-on : ${{ matrix.component.os }} 
736+     needs : [prereqs, windows_artifacts, create-macos-artifacts, create-linux-artifacts] 
737+     steps :
738+       - name : Download artifacts 
739+         uses : actions/download-artifact@v4 
740+         with :
741+           name : ${{ matrix.component.artifact }} 
742+ 
743+       - name : Install Windows 
744+         if : contains(matrix.component.artifact, 'win-installer') 
745+         shell : pwsh 
746+         run : | 
747+           $exePath = Get-ChildItem -Path ./*.exe | %{$_.FullName} 
748+           Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1" 
749+ 
750+ name : Install Linux 
751+         if : contains(matrix.component.artifact, 'linux') 
752+         run : | 
753+           debpath=$(find ./*.deb) 
754+           sudo apt install $debpath 
755+ 
756+ name : Install macOS 
757+         if : contains(matrix.component.artifact, 'macos') 
758+         run : | 
759+           # avoid letting Homebrew's `git` in `/opt/homebrew/bin` override `/usr/local/bin/git` 
760+           arch="$(uname -m)" 
761+           test arm64 != "$arch" || 
762+           brew uninstall git 
763+ 
764+           pkgpath=$(find ./*universal*.pkg) 
765+           sudo installer -pkg $pkgpath -target / 
766+ 
767+ name : Validate 
768+         shell : bash 
769+         run : | 
770+           "${{ matrix.component.command }}" --version | sed 's/git version //' >actual 
771+           echo ${{ needs.prereqs.outputs.tag_version }} >expect 
772+           cmp expect actual || exit 1 
773+ 
774+ name : Validate universal binary CPU architecture 
775+         if : contains(matrix.component.os, 'macos') 
776+         shell : bash 
777+         run : | 
778+           set -ex 
779+           git version --build-options >actual 
780+           cat actual 
781+           grep "cpu: $(uname -m)" actual 
782+ #  End validate installers
783+ 
711784  create-github-release :
712785    runs-on : ubuntu-latest 
713786    permissions :
714787      contents : write 
715788      id-token : write  #  required for Azure login via OIDC
716789    needs :
790+       - validate-installers 
717791      - create-linux-artifacts 
718792      - create-macos-artifacts 
719793      - windows_artifacts 
0 commit comments