perlcpancpanm

CI: how to speed up step installing perl modules


In my pipeline I have the following steps:

    runs-on: ubuntu-latest

...

    - name: install additional packages
      # graphics: transfig gnuplot inkscape 
      # pdf utilities: poppler-utils (pdfinfo, pdftotext)
      # Perl modules Capture::Tiny in libcapture-tiny-perl
      run: sudo apt-get install -y transfig gnuplot inkscape poppler-utils libcapture-tiny-perl
    - name: install perl modules
      run: |
        sudo cpan App::cpanminus
        sudo cpanm Cwd File::Spec::Functions Capture::Tiny DateTime DateTime::Format::ISO8601

Whereas the first step runs 30 secs the second one sometimes requires 3-4 minutes. I wonder whether on ubuntu the modules are available via apt-get or there is another way to speed up...Caching?


Solution

  • Install all of the modules using apt or apt-get.