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