@@ -38,146 +38,10 @@ jobs:
3838 name : install
3939 path : _dest/
4040
41- minimal-sdk-artifact :
42- runs-on : windows-latest
43- needs : [build]
44- outputs :
45- git-artifacts-extract-location : ${{ steps.git-artifacts-extract-location.outputs.result }}
46- env :
47- G4W_SDK_REPO : git-for-windows/git-sdk-64
48- steps :
49- - name : get latest successful ci-artifacts run
50- # Cannot just grab from https://github.com/git-for-windows/git-sdk-64/releases/tag/ci-artifacts
51- # because we also need the git-artifacts
52- id : ci-artifacts-run-id
53- uses : actions/github-script@v7
54- with :
55- script : |
56- const [ owner, repo ] = process.env.G4W_SDK_REPO.split('/')
57- const info = await github.rest.actions.listWorkflowRuns({
58- owner,
59- repo,
60- workflow_id: 938271, // ci-artifacts.yml
61- status: 'success',
62- per_page: 1
63- })
64- return info.data.workflow_runs[0].id
65- - name : get the ci-artifacts build's artifacts
66- shell : bash
67- run : |
68- run_id=${{ steps.ci-artifacts-run-id.outputs.result }} &&
69-
70- curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
71- -L https://api.github.com/repos/$G4W_SDK_REPO/actions/runs/$run_id/artifacts |
72- jq -r '.artifacts[] | [.name, .archive_download_url] | @tsv' |
73- tr -d '\r' |
74- while read name url
75- do
76- echo "$name"
77- curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
78- -#sLo /tmp/"$name".zip "$url" &&
79- unzip -qo /tmp/"$name".zip ||
80- exit $?
81- done
82- ls -la
83- - uses : actions/download-artifact@v4
84- with :
85- name : install
86- path : install
87- - name : overwrite MSYS2 runtime with the just-built msys2-runtime
88- shell : bash
89- run : |
90- set -x &&
91- mkdir minimal-sdk &&
92- cd minimal-sdk &&
93- tar xzf ../git-sdk-x86_64-minimal.tar.gz &&
94- tar -C ../install -cf - . | tar xf - &&
95- tar cvf - * .[0-9A-Za-z]* | gzip -1 >../git-sdk-x86_64-minimal.tar.gz
96- - name : upload minimal-sdk artifact
97- uses : actions/upload-artifact@v4
98- with :
99- name : minimal-sdk
100- path : git-sdk-x86_64-minimal.tar.gz
101- - name : run `uname`
102- run : minimal-sdk\usr\bin\uname.exe -a
103- - name : determine where `git-artifacts` want to be extracted
104- id : git-artifacts-extract-location
105- shell : bash
106- run : |
107- echo "result=$(tar Oxf git-artifacts.tar.gz git/bin-wrappers/git |
108- sed -n 's|^GIT_EXEC_PATH='\''\(.*\)/git'\''$|\1|p')" >>$GITHUB_OUTPUT
109- - name : upload git artifacts for testing
110- uses : actions/upload-artifact@v4
111- with :
112- name : git-artifacts
113- path : git-artifacts.tar.gz
114-
115- test-minimal-sdk :
116- needs : [minimal-sdk-artifact]
117- uses : git-for-windows/git-sdk-64/.github/workflows/test-ci-artifacts.yml@main
118- with :
119- git-artifacts-extract-location : ${{ needs.minimal-sdk-artifact.outputs.git-artifacts-extract-location }}
120-
12141 ui-tests :
12242 needs : build
12343 uses : ./.github/workflows/ui-tests.yml
12444 with :
12545 msys2-runtime-artifact-name : install
12646 permissions :
12747 contents : read
128-
129- generate-msys2-tests-matrix :
130- runs-on : ubuntu-latest
131- outputs :
132- matrix : ${{ steps.matrix.outputs.matrix }}
133- steps :
134- - id : matrix
135- uses : msys2/msys2-tests/gha-matrix-gen@main
136-
137- msys2-tests :
138- needs : [build, generate-msys2-tests-matrix]
139- strategy :
140- fail-fast : false
141- matrix :
142- include : ${{ fromJson(needs.generate-msys2-tests-matrix.outputs.matrix) }}
143-
144- name : msys2-tests ${{ matrix.msystem }}-${{ matrix.cc }}
145- runs-on : ${{ matrix.runner }}
146- env :
147- CC : ${{ matrix.cc }}
148- CXX : ${{ matrix.cxx }}
149- FC : ${{ matrix.fc }}
150- steps :
151- - id : msys2
152- uses : msys2/setup-msys2@v2
153- with :
154- msystem : ${{ matrix.msystem }}
155- update : true
156- install : ${{ matrix.packages }}
157-
158- - name : Add staging repo
159- shell : msys2 {0}
160- run : |
161- sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
162-
163- - name : Update using staging
164- shell : pwsh
165- run : |
166- msys2 -c 'pacman --noconfirm -Suuy'
167- $ErrorActionPreference = 'Stop'
168- $PSNativeCommandUseErrorActionPreference = $true
169- msys2 -c 'pacman --noconfirm -Suu'
170-
171- - name : Download msys2-runtime artifact
172- uses : actions/download-artifact@v4
173- with :
174- name : install
175- path : ${{ steps.msys2.outputs.msys2-location }}
176-
177- - name : uname -a
178- shell : msys2 {0}
179- run : uname -a
180-
181- - name : Run tests
182- uses : msys2/msys2-tests@main
183-
0 commit comments