Skip to content

Conversation

@souhailaS
Copy link
Contributor

@souhailaS souhailaS commented Jul 7, 2025

Change context

The CI workflow did run for more than 16k min for the past year only. The job runs can be optimized by reducing redundancy in steps across jobs. For instance, Node is being installed 5 times (once in each separate job: lint, unit, circular, e2e, e2e-cov). These redundant steps (checkouts, installations of dependencies) can take up to almost 1min of run.

Screenshot 2025-07-07 at 18 45 15

Change details

After optimization, Node is installed 2 times (once in the combined test job, once in the e2e job).

The changes are as fellows:

  • Combine lint, unit, circular dependencies, and examples tests into single job
  • Reduce redundant checkout, Node setup, and npm install steps
  • Maintain all existing functionality and test coverage
  • Keep E2E testing separate due to Windows matrix strategy
  • Results in faster execution and better resource efficiency

A result of the run can be found here: https://github.com/mrdoob/three.js/actions/runs/16122945642/usage
It reduces at least 1min of run time compared to the previous runs with the old configuration structure

Additional context

We are a team of researchers from University of Zurich (https://www.ifi.uzh.ch/en/zest.html) currently working on automating energy optimizations in GitHub Actions workflows. This optimization maintains full functionality while reducing computational overhead and energy consumption.

[email protected]

- Combine lint, unit, circular dependencies, and examples tests into single job
- Reduce redundant checkout, Node setup, and npm install steps
- Maintain all existing functionality and test coverage
- Keep E2E testing separate due to Windows matrix strategy
- Results in faster execution and better resource efficiency
@souhailaS souhailaS changed the title Optimize CI workflow by eliminating redundant setup steps [CI ENERGY WASTE]:Optimize CI workflow by eliminating redundant setup steps Jul 7, 2025
@Mugen87 Mugen87 merged commit d9a24af into mrdoob:dev Jul 7, 2025
8 checks passed
@Mugen87 Mugen87 added this to the r179 milestone Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants