@@ -446,6 +446,9 @@ jobs:
446
446
447
447
make -C git -j$(sysctl -n hw.physicalcpu) GIT-VERSION-FILE dist dist-doc
448
448
449
+ export GIT_BUILT_FROM_COMMIT=$(gunzip -c git/git-$VERSION.tar.gz | git get-tar-commit-id) ||
450
+ die "Could not determine commit for build"
451
+
449
452
# Extract tarballs
450
453
mkdir payload manpages
451
454
tar -xvf git/git-$VERSION.tar.gz -C payload
@@ -635,12 +638,83 @@ jobs:
635
638
*.deb
636
639
# End build and sign Debian package
637
640
641
+ # Validate installers
642
+ validate-installers :
643
+ name : Validate installers
644
+ strategy :
645
+ matrix :
646
+ component :
647
+ - os : ubuntu-latest
648
+ artifact : linux-artifacts
649
+ command : git
650
+ - os : macos-latest-xl-arm64
651
+ artifact : macos-artifacts
652
+ command : git
653
+ - os : macos-latest
654
+ artifact : macos-artifacts
655
+ command : git
656
+ - os : windows-latest
657
+ artifact : win-installer-x86_64
658
+ command : $PROGRAMFILES\Git\cmd\git.exe
659
+ - os : ['self-hosted', '1ES.Pool=github-arm64-pool']
660
+ artifact : win-installer-aarch64
661
+ command : $PROGRAMFILES\Git\cmd\git.exe
662
+ runs-on : ${{ matrix.component.os }}
663
+ needs : [prereqs, windows_artifacts, create-macos-artifacts, create-linux-artifacts]
664
+ steps :
665
+ - name : Download artifacts
666
+ uses : actions/download-artifact@v4
667
+ with :
668
+ name : ${{ matrix.component.artifact }}
669
+
670
+ - name : Install Windows
671
+ if : contains(matrix.component.artifact, 'win-installer')
672
+ shell : pwsh
673
+ run : |
674
+ $exePath = Get-ChildItem -Path ./*.exe | %{$_.FullName}
675
+ Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1"
676
+
677
+ - name : Install Linux
678
+ if : contains(matrix.component.artifact, 'linux')
679
+ run : |
680
+ debpath=$(find ./*.deb)
681
+ sudo apt install $debpath
682
+
683
+ - name : Install macOS
684
+ if : contains(matrix.component.artifact, 'macos')
685
+ run : |
686
+ # avoid letting Homebrew's `git` in `/opt/homebrew/bin` override `/usr/local/bin/git`
687
+ arch="$(uname -m)"
688
+ test arm64 != "$arch" ||
689
+ brew uninstall git
690
+
691
+ pkgpath=$(find ./*universal*.pkg)
692
+ sudo installer -pkg $pkgpath -target /
693
+
694
+ - name : Validate
695
+ shell : bash
696
+ run : |
697
+ "${{ matrix.component.command }}" --version | sed 's/git version //' >actual
698
+ echo ${{ needs.prereqs.outputs.tag_version }} >expect
699
+ cmp expect actual || exit 1
700
+
701
+ - name : Validate universal binary CPU architecture
702
+ if : contains(matrix.component.os, 'macos')
703
+ shell : bash
704
+ run : |
705
+ set -ex
706
+ git version --build-options >actual
707
+ cat actual
708
+ grep "cpu: $(uname -m)" actual
709
+ # End validate installers
710
+
638
711
create-github-release :
639
712
runs-on : ubuntu-latest
640
713
permissions :
641
714
contents : write
642
715
id-token : write # required for Azure login via OIDC
643
716
needs :
717
+ - validate-installers
644
718
- create-linux-artifacts
645
719
- create-macos-artifacts
646
720
- windows_artifacts
0 commit comments