From a7cafe1fcbd753ad57df2fc5f5dc6c5fe094f1fa Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 18 Dec 2023 08:07:06 +0100 Subject: [PATCH] Revert "TO-DROP: ci: reuse `windows-artifacts` from an earlier run" We need 994fbe4121f (win32: special-case `ENOSPC` when writing to a pipe, 2023-12-04) for t3701.60(handle very large filtered diff). This reverts commit 20737b3ee54eaad66402d99f7350b1674c329e51. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 50 +++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d285abc7da4b2..9eb22f3cfaa6f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,9 +19,37 @@ concurrency: group: ${{ github.sha }} jobs: + windows-build: + name: win build + runs-on: windows-latest + concurrency: + group: windows-build-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + - uses: git-for-windows/setup-git-for-windows-sdk@v1 + - name: replace the MSYS2 runtime + shell: powershell + run: | + Invoke-WebRequest -Headers @{ Authorization = "token ${{ secrets.GITHUB_TOKEN }}" } "https://api.github.com/repos/msys2/msys2-runtime/actions/artifacts/1082027388/zip" -outfile "a1.zip" + Expand-Archive -Force -DestinationPath D:/git-sdk-64-minimal a1.zip + Remove-Item a1.zip + - name: build + shell: bash + env: + HOME: ${{runner.workspace}} + NO_PERL: 1 + run: uname -a && . /etc/profile && ci/make-test-artifacts.sh artifacts + - name: zip up tracked files + run: git archive -o artifacts/tracked.tar.gz HEAD + - name: upload tracked files and build artifacts + uses: actions/upload-artifact@v3 + with: + name: windows-artifacts + path: artifacts windows-test: name: win test runs-on: windows-latest + needs: [windows-build] strategy: fail-fast: false matrix: @@ -31,23 +59,11 @@ jobs: concurrency: group: windows-test-${{ matrix.n.nr }}-${{ github.ref }} steps: - - name: reuse `windows-artifacts` - shell: bash - run: | - run_id=7069719923 && - name=windows-artifacts && - - curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ - -L https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts | - jq -r '.artifacts[] | select(.name | test("'$name'")) | [.name, .archive_download_url] | @tsv' | - tr -d '\r' | - while read name url - do - echo "$name" - curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ - -#sLo /tmp/"$name".zip "$url" && - unzip -q /tmp/"$name".zip - done + - name: download tracked files and build artifacts + uses: actions/download-artifact@v3 + with: + name: windows-artifacts + path: ${{github.workspace}} - name: extract tracked files and build artifacts shell: bash run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz