@@ -595,12 +595,80 @@ jobs:
595
595
*.deb
596
596
# End build and sign Debian package
597
597
598
+ # Validate installers
599
+ validate-installers :
600
+ name : Validate installers
601
+ strategy :
602
+ matrix :
603
+ component :
604
+ - os : ubuntu-latest
605
+ artifact : linux-artifacts
606
+ command : git
607
+ - os : macos-latest-xl-arm64
608
+ artifact : macos-artifacts
609
+ command : git
610
+ - os : macos-latest
611
+ artifact : macos-artifacts
612
+ command : git
613
+ - os : windows-latest
614
+ artifact : win-installer-x86_64
615
+ command : $PROGRAMFILES\Git\cmd\git.exe
616
+ runs-on : ${{ matrix.component.os }}
617
+ needs : [prereqs, windows_artifacts, create-macos-artifacts, create-linux-artifacts]
618
+ steps :
619
+ - name : Download artifacts
620
+ uses : actions/download-artifact@v4
621
+ with :
622
+ name : ${{ matrix.component.artifact }}
623
+
624
+ - name : Install Windows
625
+ if : contains(matrix.component.os, 'windows')
626
+ shell : pwsh
627
+ run : |
628
+ $exePath = Get-ChildItem -Path ./*.exe | %{$_.FullName}
629
+ Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1"
630
+
631
+ - name : Install Linux
632
+ if : contains(matrix.component.os, 'ubuntu')
633
+ run : |
634
+ debpath=$(find ./*.deb)
635
+ sudo apt install $debpath
636
+
637
+ - name : Install macOS
638
+ if : contains(matrix.component.os, 'macos')
639
+ run : |
640
+ # avoid letting Homebrew's `git` in `/opt/homebrew/bin` override `/usr/local/bin/git`
641
+ arch="$(uname -m)"
642
+ test arm64 != "$arch" ||
643
+ brew uninstall git
644
+
645
+ pkgpath=$(find ./*universal*.pkg)
646
+ sudo installer -pkg $pkgpath -target /
647
+
648
+ - name : Validate
649
+ shell : bash
650
+ run : |
651
+ "${{ matrix.component.command }}" --version | sed 's/git version //' >actual
652
+ echo ${{ needs.prereqs.outputs.tag_version }} >expect
653
+ cmp expect actual || exit 1
654
+
655
+ - name : Validate universal binary CPU architecture
656
+ if : contains(matrix.component.os, 'macos')
657
+ shell : bash
658
+ run : |
659
+ set -ex
660
+ git version --build-options >actual
661
+ cat actual
662
+ grep "cpu: $(uname -m)" actual
663
+ # End validate installers
664
+
598
665
create-github-release :
599
666
runs-on : ubuntu-latest
600
667
permissions :
601
668
contents : write
602
669
id-token : write # required for Azure login via OIDC
603
670
needs :
671
+ - validate-installers
604
672
- create-linux-artifacts
605
673
- create-macos-artifacts
606
674
- windows_artifacts
0 commit comments