user2609605
user2609605

Reputation: 628

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?

Upvotes: 0

Views: 141

Answers (2)

Rawley Fowler
Rawley Fowler

Reputation: 2584

You can tell both cpan and cpanm to install without tests which will be much faster:

sudo cpan -T App::cpanminus
sudo cpanm -n Cwd File::Spec::Functions Capture::Tiny DateTime DateTime::Format::ISO8601

Upvotes: 1

ikegami
ikegami

Reputation: 386706

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

  • File::Spec::Functions is provided by system package perl or perl-base.
  • Cwd is provided by system package perl or perl-base.
  • Capture::Tiny is provided by system package libcapture-tiny-perl.
  • DateTime::Format::ISO8601 by system package libdatetime-format-iso8601-perl.

Upvotes: 2

Related Questions