@@ -19,37 +19,9 @@ concurrency:
19
19
group : ${{ github.sha }}
20
20
21
21
jobs :
22
- windows-build :
23
- name : win build
24
- runs-on : windows-latest
25
- concurrency :
26
- group : windows-build-${{ github.ref }}
27
- steps :
28
- - uses : actions/checkout@v3
29
- - uses : git-for-windows/setup-git-for-windows-sdk@v1
30
- - name : replace the MSYS2 runtime
31
- shell : powershell
32
- run : |
33
- Invoke-WebRequest -Headers @{ Authorization = "token ${{ secrets.GITHUB_TOKEN }}" } "https://api.github.com/repos/msys2/msys2-runtime/actions/artifacts/1082027388/zip" -outfile "a1.zip"
34
- Expand-Archive -Force -DestinationPath D:/git-sdk-64-minimal a1.zip
35
- Remove-Item a1.zip
36
- - name : build
37
- shell : bash
38
- env :
39
- HOME : ${{runner.workspace}}
40
- NO_PERL : 1
41
- run : uname -a && . /etc/profile && ci/make-test-artifacts.sh artifacts
42
- - name : zip up tracked files
43
- run : git archive -o artifacts/tracked.tar.gz HEAD
44
- - name : upload tracked files and build artifacts
45
- uses : actions/upload-artifact@v3
46
- with :
47
- name : windows-artifacts
48
- path : artifacts
49
22
windows-test :
50
23
name : win test
51
24
runs-on : windows-latest
52
- needs : [windows-build]
53
25
strategy :
54
26
fail-fast : false
55
27
matrix :
@@ -76,11 +48,23 @@ jobs:
76
48
concurrency :
77
49
group : windows-test-${{ matrix.nr }}-${{ github.ref }}
78
50
steps :
79
- - name : download tracked files and build artifacts
80
- uses : actions/download-artifact@v3
81
- with :
82
- name : windows-artifacts
83
- path : ${{github.workspace}}
51
+ - name : reuse `windows-artifacts`
52
+ shell : bash
53
+ run : |
54
+ run_id=7069719923 &&
55
+ name=windows-artifacts &&
56
+
57
+ curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
58
+ -L https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts |
59
+ jq -r '.artifacts[] | select(.name | test("'$name'")) | [.name, .archive_download_url] | @tsv' |
60
+ tr -d '\r' |
61
+ while read name url
62
+ do
63
+ echo "$name"
64
+ curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
65
+ -#sLo /tmp/"$name".zip "$url" &&
66
+ unzip -q /tmp/"$name".zip
67
+ done
84
68
- name : extract tracked files and build artifacts
85
69
shell : bash
86
70
run : tar xf artifacts.tar.gz && tar xf tracked.tar.gz
0 commit comments