Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1ef96b

Browse files
ci: use D:/ instead of C:/ and sharding fixes
On Windows 2025, `D:/` was re-introduced again this week to improve performance actions/runner-images#12744 Also, this change reduced the shards to 1 on PR workflow, additional we also fix an issue where in each shard we split the tests into another 4 shards which on Windows causes a lot of IO operations. Difference: `e2e_windows (windows-2025, 22, npm, 1)` from `48m 13s` to `20m 16s`
1 parent 3a637c0 commit a1ef96b

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

‎.github/shared-actions/windows-bazel-test/action.yml‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ runs:
4949
run: |
5050
cd ${{steps.init_wsl.outputs.repo_path}}
5151
tar -cf /tmp/test.tar.gz dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_
52-
mkdir /mnt/c/test
53-
mv /tmp/test.tar.gz /mnt/c/test
54-
(cd /mnt/c/test && tar -xf /mnt/c/test/test.tar.gz)
52+
# Use D:/ for better performance see: https://github.com/actions/runner-images/issues/12744
53+
mkdir /mnt/d/test
54+
mkdir /mnt/d/tmp_dir
55+
mv /tmp/test.tar.gz /mnt/d/test
56+
(cd /mnt/d/test && tar -xf /mnt/d/test/test.tar.gz)
5557
5658
- name: Convert symlinks for Windows host
5759
shell: wsl-bash {0}
@@ -61,7 +63,7 @@ runs:
6163
6264
cd ${{steps.init_wsl.outputs.repo_path}}
6365
64-
runfiles_dir="/mnt/c/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles"
66+
runfiles_dir="/mnt/d/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles"
6567
6668
# Make WSL symlinks compatible on Windows native file system.
6769
node scripts/windows-testing/convert-symlinks.mjs $runfiles_dir "${{steps.init_wsl.outputs.cmd_path}}"
@@ -75,7 +77,9 @@ runs:
7577
shell: bash
7678
env:
7779
BAZEL_BINDIR: '.'
78-
working-directory: "C:\\test"
80+
# Use D:/ for better performance see: https://github.com/actions/runner-images/issues/12744
81+
E2E_TEMP: 'D:\\tmp_dir'
82+
working-directory: "D:\\test"
7983
run: |
8084
node "${{github.workspace}}\\scripts\\windows-testing\\parallel-executor.mjs" \
8185
$PWD/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles \

‎.github/workflows/pr.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ jobs:
142142
- name: Run CLI E2E tests
143143
uses: ./.github/shared-actions/windows-bazel-test
144144
with:
145+
E2E_SHARD_TOTAL: 1
145146
test_target_name: e2e_node22
146147
test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
147148

‎scripts/windows-testing/parallel-executor.mjs‎

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,32 @@ const initialStatusRegex = /Running (\d+) tests/;
1414

1515
async function main() {
1616
const [runfilesDir, targetName, testArgs] = process.argv.slice(2);
17-
const maxShards = 4;
18-
1917
const testEntrypoint = path.resolve(runfilesDir, '../', targetName);
2018
const testWorkingDir = path.resolve(runfilesDir, '_main');
2119
const tasks = [];
2220
const progress = {};
2321

24-
for (let i = 0; i < maxShards; i++) {
25-
tasks.push(
26-
spawnTest(
27-
'bash',
28-
[testEntrypoint, ...testArgs.split(' ').filter((arg) => arg !== '')],
29-
{
30-
cwd: testWorkingDir,
31-
env: {
32-
// Try to construct a pretty hermetic environment, as within Bazel.
33-
PATH: process.env.PATH,
34-
TEST_TOTAL_SHARDS: maxShards,
35-
TEST_SHARD_INDEX: i,
36-
E2E_SHARD_TOTAL: process.env.E2E_SHARD_TOTAL,
37-
E2E_SHARD_INDEX: process.env.E2E_SHARD_INDEX,
38-
FORCE_COLOR: '3',
39-
// Needed by `rules_js`
40-
BAZEL_BINDIR: '.',
41-
},
22+
tasks.push(
23+
spawnTest(
24+
'bash',
25+
[testEntrypoint, ...testArgs.split(' ').filter((arg) => arg !== '')],
26+
{
27+
cwd: testWorkingDir,
28+
env: {
29+
// Try to construct a pretty hermetic environment, as within Bazel.
30+
PATH: process.env.PATH,
31+
E2E_SHARD_TOTAL: process.env.E2E_SHARD_TOTAL,
32+
E2E_SHARD_INDEX: process.env.E2E_SHARD_INDEX,
33+
FORCE_COLOR: '3',
34+
// Needed by `rules_js`
35+
BAZEL_BINDIR: '.',
36+
// Needed to run the E2E in a different temp path.
37+
E2E_TEMP: process.env.E2E_TEMP,
4238
},
43-
(s)=>(progress[i]=s),
44-
),
45-
);
46-
}
39+
},
40+
(s)=>(progress[0]=s),
41+
),
42+
);
4743

4844
const printUpdate = () => {
4945
console.error(`----`);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /