Open
Description
Currently a run of the publish pipeline is taking around 30 minutes.
Most of the time is spent in the "build all translation" step.
comprehensive-rust/.github/workflows/publish.yml
Lines 55 to 60 in c1773a7
This is the main loop for building the translations. This is currently writing files into the book/<language>/html
folder, then moved into book/html/<language>
. The build.sh script is heavily modifying the current state of the repository so this is not trivially parallelized in the same step.
Options:
- separate steps by using Githubs job matrix to run each translation as a separate job. Note: this requires all other steps in that job to run multiple times which is wasting resources. Installing mdbook in that environment should be cached properly. The English translation should then also be handled like other languages as this is currently a special case.
- This also needs to take into account that the generated artifacts need to be used in later steps
- Alternative: Split the translation step into two steps (likely more efficient)
- (for each language) restore the entire book source as currently and copy all necessary files into a new
source/<language>/
directory - With all sources in each
source/<language>
folder, this can be easily parallelized after modifying the build script.
- (for each language) restore the entire book source as currently and copy all necessary files into a new
comprehensive-rust/.github/workflows/build.sh
Lines 27 to 28 in c1773a7
Metadata
Metadata
Assignees
Labels
No labels