threads / patch / 61983

patch, 2 partsUpdate the win+VS build definition

Subject: [PATCH 0/2] Update the win+VS build definition

## tl;dr

6 messages between Aug 20, 2024 and Aug 20, 2024. Diffs are folded; open one to read it.

replies: 5people: 2as markdown or json

Johannes Schindelin via GitGitGadget· Aug 20, 2024, 14:31 UTC · lore
These two patches have been in Git for Windows' fork for quite a while.

While the win+VS builds are not run in Git's CI builds, it is still a good idea to upstream these changes.

Johannes Schindelin (2):
  ci: bump microsoft/setup-msbuild from v1 to v2
  ci(win+VS): download the vcpkg artifacts using a dedicated GitHub
    Action
 .github/workflows/main.yml | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
base-commit: bb9c16bd4f1a9a00799e10c81ee6506cf468c0c7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1775%2Fdscho%2Fwin%2BVS-updates-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1775/dscho/win+VS-updates-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1775
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Aug 20, 2024, 14:31 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH 1/2] ci: bump microsoft/setup-msbuild from v1 to v2

From: Johannes Schindelin <Johannes.Schindelin@gmx.de>

The main benefit: The new version uses a node.js version that is not yet deprecated.

Links:
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1...v2)

This patch was originally by GitHub's Dependabot, but I cannot attribute that bot properly because it has no dedicated email address. Probably because it hasn't reached legal age yet, or something.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to .github/workflows/main.yml +1 −1
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 13cc0fe8077..85e5767aae6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -190,7 +190,7 @@ jobs:
         Expand-Archive compat.zip -DestinationPath . -Force
         Remove-Item compat.zip
     - name: add msbuild to PATH
-      uses: microsoft/setup-msbuild@v1
+      uses: microsoft/setup-msbuild@v2
     - name: copy dlls to root
       shell: cmd
       run: compat\vcbuild\vcpkg_copy_dlls.bat release
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Aug 20, 2024, 14:31 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH 2/2] ci(win+VS): download the vcpkg artifacts using a dedicated GitHub Action

From: Johannes Schindelin <johannes.schindelin@gmx.de>

The Git for Windows project provides a GitHub Action to download and cache Azure Pipelines artifacts (such as the `vcpkg` artifacts), hiding gnarly internals, and also providing some robustness against network glitches. Let's use it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 .github/workflows/main.yml | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
Show changes to .github/workflows/main.yml +4 −8
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 85e5767aae6..1ee0433acc1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -181,14 +181,10 @@ jobs:
         repository: 'microsoft/vcpkg'
         path: 'compat/vcbuild/vcpkg'
     - name: download vcpkg artifacts
-      shell: powershell
-      run: |
-        $urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
-        $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
-        $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
-        (New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
-        Expand-Archive compat.zip -DestinationPath . -Force
-        Remove-Item compat.zip
+      uses: git-for-windows/get-azure-pipelines-artifact@v0
+      with:
+        repository: git/git
+        definitionId: 9
     - name: add msbuild to PATH
       uses: microsoft/setup-msbuild@v2
     - name: copy dlls to root
-- 
gitgitgadget
Junio C Hamano· Aug 20, 2024, 15:22 UTC · re: Johannes Schindelin via GitGitGadget · lore

Re: [PATCH 0/2] Update the win+VS build definition

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 12 quoted lines
> These two patches have been in Git for Windows' fork for quite a while.
>
> While the win+VS builds are not run in Git's CI builds, it is still a good
> idea to upstream these changes.
>
> Johannes Schindelin (2):
>   ci: bump microsoft/setup-msbuild from v1 to v2
>   ci(win+VS): download the vcpkg artifacts using a dedicated GitHub
>     Action
>
>  .github/workflows/main.yml | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
Thanks.  

Do you mind if I applied these directly to 'maint' and merged the result upwards?

Johannes Schindelin· Aug 20, 2024, 20:15 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/2] Update the win+VS build definition

Hi Junio,
On Tue, 20 Aug 2024, Junio C Hamano wrote:
Show 20 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > These two patches have been in Git for Windows' fork for quite a while.
> >
> > While the win+VS builds are not run in Git's CI builds, it is still a good
> > idea to upstream these changes.
> >
> > Johannes Schindelin (2):
> >   ci: bump microsoft/setup-msbuild from v1 to v2
> >   ci(win+VS): download the vcpkg artifacts using a dedicated GitHub
> >     Action
> >
> >  .github/workflows/main.yml | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
>
> Thanks.
>
> Do you mind if I applied these directly to 'maint' and merged the
> result upwards?
I concur that this is a good idea.

Thank you, Johannes

Junio C Hamano· Aug 20, 2024, 20:38 UTC · re: Johannes Schindelin · lore

Re: [PATCH 0/2] Update the win+VS build definition

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> Do you mind if I applied these directly to 'maint' and merged the
>> result upwards?
>
> I concur that this is a good idea.
Will, do.  Thanks.

← back to recent threads