@@ -6,178 +6,9 @@ permissions:
6
6
contents : read
7
7
8
8
jobs :
9
- build :
10
- runs-on : windows-latest
11
-
12
- steps :
13
- - name : Checkout code
14
- uses : actions/checkout@v4
15
-
16
- - name : setup-msys2
17
- uses : msys2/setup-msys2@v2
18
- with :
19
- msystem : MSYS
20
- update : true
21
- install : msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel xmlto docbook-xsl
22
-
23
- - name : Build
24
- shell : msys2 {0}
25
- run : |
26
- (cd winsup && ./autogen.sh)
27
- ./configure --disable-dependency-tracking --with-msys2-runtime-commit="$GITHUB_SHA"
28
- make -j8
29
-
30
- - name : Install
31
- shell : msys2 {0}
32
- run : |
33
- make DESTDIR="$(pwd)"/_dest install
34
-
35
- - name : Upload
36
- uses : actions/upload-artifact@v4
37
- with :
38
- name : install
39
- path : _dest/
40
-
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
-
121
9
ui-tests :
122
- needs : build
123
10
uses : ./.github/workflows/ui-tests.yml
124
11
with :
125
12
msys2-runtime-artifact-name : install
126
13
permissions :
127
14
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