asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
435 stars 106 forks source link

Use caching in GitHub Actions #333

Open pepijnve opened 3 years ago

pepijnve commented 3 years ago

The test suite is getting larger (a good thing), but as a consequence the test runs are taking a significant amount of time to run to completion (not such a good thing).

Investigate if GitHub's cache action could be used to speed up the test runs.

snecklifter commented 3 years ago

On MacOS, ERD and MacTex both take a long time (8mins each) to install which is where a lot of the time goes.

MacTex provides a cut down version called BasicTex but this didn't pull down the deps required for the test.

ERD was a challenge to get working as well.

Another issue is that 5 runners is the maximum for macOS so as there is 5 ruby envs they get queued on a single commit. So reducing the number of ruby envs would help in the short term but is not the best fix obviously.

Another option might be to only run the ERD and MacText stuff on the scheduled cron?

KartikSoneji commented 1 year ago

Another issue is that 5 runners is the maximum for macOS so as there is 5 ruby envs they get queued on a single commit. So reducing the number of ruby envs would help in the short term but is not the best fix obviously.

A temporary solution is to limit the number of concurrent runners per workflow run with the max-parallel key: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#defining-the-maximum-number-of-concurrent-jobs

For example, the following workflow will run a maximum of two jobs at a time, even if there are runners available to run all six jobs at once.

jobs:
  example_matrix:
    strategy:
      max-parallel: 2
      matrix:
        version: [10, 12, 14]
        os: [ubuntu-latest, windows-latest]