Skip to content

Commit

Permalink
ci(portable): when building Portable Git, also test it
Browse files Browse the repository at this point in the history
Just like the installer, we can run the Portable Git self-extractor and
validate that it works as intended.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Aug 13, 2024
1 parent c5f0622 commit 47366ab
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,30 @@ jobs:
# cannot test SSH keys in read-only mode, skip test for now
sed -i 's|[email protected]:v3/git-for-windows/git/git|https://github.com/git/git|' $checklist &&
sh -x $checklist
- name: extract Portable Git
if: matrix.directory == 'portable'
shell: pwsh
run: |
$exePath = Get-ChildItem -Path ${{ steps.build.outputs.result }}/*.7z.exe | %{$_.FullName}
Get-ChildItem -Path "$exePath"
$installer = Start-Process -PassThru -Wait -FilePath "$exePath" -ArgumentList "-o portable-git -y"
$exitCode = $installer.ExitCode
if ($exitCode -ne 0) {
Write-Host "::error::Extracting the Portable Git failed with exit code $exitCode!"
exit 1
}
Get-ChildItem -Path "portable-git"
"$PWD\portable-git\usr\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
"$PWD\portable-git\mingw64\bin" | Out-File -Encoding ascii -Append $env:GITHUB_PATH
- name: validate
if: matrix.directory == 'portable'
shell: bash
run: |
set -x &&
root="$(cygpath -aw /)" &&
test "${root%portable-git}" != "$root" &&
git.exe version --build-options >version &&
cat version
sdk-artifacts:
needs: determine-packages
if: needs.determine-packages.outputs.test-sdk-artifacts == 'true'
Expand Down

0 comments on commit 47366ab

Please sign in to comment.