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