Skip to content

Commit 6c5a638

Browse files
committed
ci(windows): transfer the 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 <[email protected]>
1 parent c99af5f commit 6c5a638

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ jobs:
8989
HOME: ${{runner.workspace}}
9090
NO_PERL: 1
9191
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
9395
uses: actions/upload-artifact@v2
9496
with:
9597
name: windows-artifacts
@@ -102,15 +104,14 @@ jobs:
102104
matrix:
103105
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
104106
steps:
105-
- uses: actions/checkout@v1
106-
- name: download build artifacts
107+
- name: download tracked files and build artifacts
107108
uses: actions/download-artifact@v2
108109
with:
109110
name: windows-artifacts
110111
path: ${{github.workspace}}
111-
- name: extract build artifacts
112+
- name: extract tracked files and build artifacts
112113
shell: bash
113-
run: tar xf artifacts.tar.gz
114+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
114115
- uses: git-for-windows/setup-git-for-windows-sdk@main
115116
- name: test
116117
shell: bash
@@ -164,7 +165,9 @@ jobs:
164165
run: |
165166
mkdir -p artifacts &&
166167
eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)"
167-
- name: upload build artifacts
168+
- name: zip up tracked files
169+
run: git archive -o artifacts/tracked.tar.gz HEAD
170+
- name: upload tracked files and build artifacts
168171
uses: actions/upload-artifact@v2
169172
with:
170173
name: vs-artifacts
@@ -177,16 +180,15 @@ jobs:
177180
matrix:
178181
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
179182
steps:
180-
- uses: actions/checkout@v1
181183
- uses: git-for-windows/setup-git-for-windows-sdk@main
182-
- name: download build artifacts
184+
- name: download tracked files and build artifacts
183185
uses: actions/download-artifact@v2
184186
with:
185187
name: vs-artifacts
186188
path: ${{github.workspace}}
187-
- name: extract build artifacts
189+
- name: extract tracked files and build artifacts
188190
shell: bash
189-
run: tar xf artifacts.tar.gz
191+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
190192
- name: test
191193
shell: bash
192194
env:

0 commit comments

Comments
 (0)