Skip to content

Commit d681d0d

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9f79ac commit d681d0d

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@v1
115116
- name: test
116117
shell: bash
@@ -169,7 +170,9 @@ jobs:
169170
run: |
170171
mkdir -p artifacts &&
171172
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
173176
uses: actions/upload-artifact@v2
174177
with:
175178
name: vs-artifacts
@@ -182,16 +185,15 @@ jobs:
182185
matrix:
183186
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
184187
steps:
185-
- uses: actions/checkout@v1
186188
- uses: git-for-windows/setup-git-for-windows-sdk@v1
187-
- name: download build artifacts
189+
- name: download tracked files and build artifacts
188190
uses: actions/download-artifact@v2
189191
with:
190192
name: vs-artifacts
191193
path: ${{github.workspace}}
192-
- name: extract build artifacts
194+
- name: extract tracked files and build artifacts
193195
shell: bash
194-
run: tar xf artifacts.tar.gz
196+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
195197
- name: test
196198
shell: bash
197199
env:

0 commit comments

Comments
 (0)