1717 minimal-sdk-artifact :
1818 if : github.event.repository.fork == false
1919 runs-on : windows-latest
20+ outputs :
21+ git-artifacts-extract-location : ${{ steps.git-artifacts-extract-location.outputs.result }}
2022 steps :
2123 - name : clone git-sdk-64
2224 run : |
5961 with :
6062 name : git-artifacts
6163 path : git-artifacts.tar.gz
64+ - name : determine where `git-artifacts` want to be extracted
65+ id : git-artifacts-extract-location
66+ shell : bash
67+ run : |
68+ cd .. &&
69+ echo "result=$(pwd)" >>$GITHUB_OUTPUT
6270 - name : create zip and 7z SFX variants of the minimal SDK
6371 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
6472 shell : bash
@@ -77,109 +85,19 @@ jobs:
7785 with :
7886 name : minimal-sdk-extra
7987 path : minimal-sdk-extra
80- test-minimal-sdk :
81- runs-on : windows-latest
82- needs : [minimal-sdk-artifact]
83- strategy :
84- matrix :
85- # 0..16 permuted according to the matrix builds' timings as of git/git@9fadedd63
86- nr : [9, 6, 13, 0, 8, 5, 2, 16, 15, 11, 10, 1, 7, 3, 14, 12, 4]
87- steps :
88- - name : download minimal-sdk artifact
89- uses : actions/download-artifact@v4
90- with :
91- name : minimal-sdk
92- path : ${{github.workspace}}
93- - name : uncompress minimal-sdk
94- shell : bash
95- run : |
96- mkdir -p minimal-sdk &&
97- tar -C minimal-sdk -xzf git-sdk-x86_64-minimal.tar.gz &&
98- cygpath -aw minimal-sdk/usr/bin >>$GITHUB_PATH
99- - name : download git artifacts
100- uses : actions/download-artifact@v4
101- with :
102- name : git-artifacts
103- path : ${{github.workspace}}
104- - name : uncompress git-artifacts
105- shell : bash
106- run : tar -C .. -xzf git-artifacts.tar.gz
107- - name : test
108- shell : bash
109- run : |
110- set -x
111- . /etc/profile
112- test "$(cygpath -aw /)" = "${{github.workspace}}\minimal-sdk" || exit 1
113- cd ../git/t &&
114- make T="$(ls -S t[0-9]*.sh | awk '!((NR+${{matrix.nr}})%17)' | tr '\n' \ )" prove || {
115- for d in trash*
116- do
117- t=${d#trash directory.}
118- echo ===========================
119- echo Failed: $t.sh
120- cat test-results/$t.out
121- done
122- exit 1
123- }
124- env :
125- GIT_TEST_OPTS : --verbose-log -x --no-chain-lint
126- GIT_PROVE_OPTS : --timer --jobs 8
127- NO_SVN_TESTS : 1
128- assorted-validations :
129- runs-on : windows-latest
130- needs : [minimal-sdk-artifact]
131- steps :
132- - name : download minimal-sdk artifact
133- uses : actions/download-artifact@v4
134- with :
135- name : minimal-sdk
136- path : ${{github.workspace}}
137- - name : uncompress minimal-sdk
138- shell : bash
139- run : |
140- mkdir -p minimal-sdk &&
141- tar -C minimal-sdk -xzf git-sdk-x86_64-minimal.tar.gz &&
142- cygpath -aw minimal-sdk/usr/bin >>$GITHUB_PATH
143- - name : run some tests
144- shell : bash
145- run : |
146- set -x
147- . /etc/profile
148-
149- # cygpath works
150- test "$(cygpath -aw /)" = "${{github.workspace}}\minimal-sdk" || exit 1
151-
152- # comes with GCC and can compile a DLL
153- test "$(type -p gcc)" = "/mingw64/bin/gcc" || exit 1
154- cat >dll.c <<-\EOF &&
155- __attribute__((dllexport)) int increment(int i)
156- {
157- return i + 1;
158- }
159- EOF
16088
161- gcc -Wall -g -O2 -shared -o sample.dll dll.c || exit 1
162- ls -la
163-
164- # stat works
165- test "stat is /usr/bin/stat" = "$(type stat)" || exit 1
166- stat /usr/bin/stat.exe || exit 1
89+ test-minimal-sdk :
90+ needs : minimal-sdk-artifact
91+ uses : ./.github/workflows/test-ci-artifacts.yml
92+ with :
93+ git-artifacts-extract-location : ${{ needs.minimal-sdk-artifact.outputs.git-artifacts-extract-location }}
94+ permissions :
95+ contents : read
16796
168- # unzip works
169- test "unzip is /usr/bin/unzip" = "$(type unzip)" || exit 1
170- git init unzip-test &&
171- echo TEST >unzip-test/README &&
172- git -C unzip-test add -A &&
173- git -C unzip-test -c user.name=A -c [email protected] commit -m 'Testing, testing...' && 174- git --git-dir=unzip-test/.git archive -o test.zip HEAD &&
175- unzip -v test.zip >unzip-test.out &&
176- cat unzip-test.out &&
177- test "grep is /usr/bin/grep" = "$(type grep)" || exit 1
178- grep README unzip-test.out
17997 publish-release-assets :
18098 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
18199 runs-on : ubuntu-latest
182- needs : [ test-minimal-sdk, assorted-validations]
100+ needs : test-minimal-sdk
183101 steps :
184102 - name : download minimal-sdk artifact
185103 uses : actions/download-artifact@v4
@@ -263,4 +181,4 @@ jobs:
263181 ...req,
264182 ref: 'tags/ci-artifacts',
265183 sha: process.env.GITHUB_SHA,
266- })
184+ })
0 commit comments