From aa2d91b20c69ee369cbd1bc753ede63d3463649c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 28 Mar 2021 19:36:41 +0200 Subject: [PATCH 1/3] fixup! ci: use the brand-new GitHub Action to download git-sdk-64-minimal The Action is now at v1.0.0. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8568ab2c13733f..9f79768d592384 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: git-for-windows/setup-git-for-windows-sdk@v0 + - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: build shell: bash env: @@ -112,7 +112,7 @@ jobs: - name: extract tracked files and build artifacts shell: bash run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz - - uses: git-for-windows/setup-git-for-windows-sdk@v0 + - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: test shell: bash run: ci/run-test-slice.sh ${{matrix.nr}} 10 @@ -139,7 +139,7 @@ jobs: arch: [x64, arm64] steps: - uses: actions/checkout@v2 - - uses: git-for-windows/setup-git-for-windows-sdk@v0 + - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: initialize vcpkg uses: actions/checkout@v2 with: @@ -189,7 +189,7 @@ jobs: matrix: nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] steps: - - uses: git-for-windows/setup-git-for-windows-sdk@v0 + - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: download tracked files and build artifacts uses: actions/download-artifact@v2 with: From 2cd7022fa472bf395013500c8d06c6e7782d94d8 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 19 Feb 2021 11:39:37 +0100 Subject: [PATCH 2/3] ci(vs-build): download the vcpkg artifacts using a dedicated Action We now have 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 --- .github/workflows/main.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f79768d592384..737ebb7e3c369f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,14 +146,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@v1 - name: copy dlls to root From 42a539d3c3384494fab33e5c70b5232c58bbe1da Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 28 Mar 2021 19:42:38 +0200 Subject: [PATCH 3/3] fixup! git-artifacts: add ARM64 artifacts Let's use the `get-azure-pipelines-artifact` GitHub Action instead of the home-rolled PowerShell scriptlet to download the `vcpkg` artifacts. Signed-off-by: Johannes Schindelin --- .github/workflows/git-artifacts.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/git-artifacts.yml b/.github/workflows/git-artifacts.yml index 064e12dcd6bad1..f13a8d4c2ea833 100644 --- a/.github/workflows/git-artifacts.yml +++ b/.github/workflows/git-artifacts.yml @@ -276,14 +276,10 @@ jobs: path: 'compat/vcbuild/vcpkg' - name: download vcpkg artifacts if: env.SKIP != 'true' - 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 if: env.SKIP != 'true' uses: microsoft/setup-msbuild@v1