ci (windows): transfer also the Git-tracked files to the test jobs

Git's test suite is excruciatingly slow on Windows, mainly due to the fact that it executes a lot of shell script code, and that's simply not native to Windows. To help with that, we established the pattern where the artifacts are first built in one job, and then multiple test jobs run in parallel using the artifacts built in the first job. We take pains in transferring only the build outputs, and letting `actions/checkout` fill in the rest of the files. One major downside of that strategy is that the test jobs might fail to check out the intended revision (e.g. because the branch has been updated while the build was running, as is frequently the case with the `seen` branch). Let's transfer also the files tracked by Git, and skip the checkout step in the test jobs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 4, 2021 at 22:55 UTC d681d0dc3a77016caa7e26abfe734afbdab44de5
1 file changed +12 -10
.github/workflows/main.yml
+12 -10
@@ -89,7 +89,9 @@ jobs:
89 HOME: ${{runner.workspace}}
90 NO_PERL: 1
91 run: ci/make-test-artifacts.sh artifacts
92 - - name: upload build artifacts
92 + - name: zip up tracked files
93 + run: git archive -o artifacts/tracked.tar.gz HEAD
94 + - name: upload tracked files and build artifacts
95 uses: actions/upload-artifact@v2
96 with:
97 name: windows-artifacts
@@ -102,15 +104,14 @@ jobs:
104 matrix:
105 nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
106 steps:
105 - - uses: actions/checkout@v1
106 - - name: download build artifacts
107 + - name: download tracked files and build artifacts
108 uses: actions/download-artifact@v2
109 with:
110 name: windows-artifacts
111 path: ${{github.workspace}}
111 - - name: extract build artifacts
112 + - name: extract tracked files and build artifacts
113 shell: bash
113 - run: tar xf artifacts.tar.gz
114 + run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
115 - uses: git-for-windows/setup-git-for-windows-sdk@v1
116 - name: test
117 shell: bash
@@ -169,7 +170,9 @@ jobs:
170 run: |
171 mkdir -p artifacts &&
172 eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)"
172 - - name: upload build artifacts
173 + - name: zip up tracked files
174 + run: git archive -o artifacts/tracked.tar.gz HEAD
175 + - name: upload tracked files and build artifacts
176 uses: actions/upload-artifact@v2
177 with:
178 name: vs-artifacts
@@ -182,16 +185,15 @@ jobs:
185 matrix:
186 nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
187 steps:
185 - - uses: actions/checkout@v1
188 - uses: git-for-windows/setup-git-for-windows-sdk@v1
187 - - name: download build artifacts
189 + - name: download tracked files and build artifacts
190 uses: actions/download-artifact@v2
191 with:
192 name: vs-artifacts
193 path: ${{github.workspace}}
192 - - name: extract build artifacts
194 + - name: extract tracked files and build artifacts
195 shell: bash
194 - run: tar xf artifacts.tar.gz
196 + run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
197 - name: test
198 shell: bash
199 env: