Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow options on install-modules option #701

Closed
ylavoie opened this issue May 12, 2021 · 5 comments
Closed

Allow options on install-modules option #701

ylavoie opened this issue May 12, 2021 · 5 comments

Comments

@ylavoie
Copy link

ylavoie commented May 12, 2021

Related to #684 & #686

Install options should allow user to add options for the installers, to grant possibility to cache features or develoment mode.

Install modules does a great job to install modules listed in the main part of cpanfile.
The user still need to implement caching to install features.

For example:

        uses: shogo82148/actions-setup-perl@v1.11.0
        with:
          perl-version: 5.32
          install-modules-with: cpm
            - with-develop
            - feature=f1,f2

would allow a single invocation, let the user benefit from the implemented caching and install development and features f1 & f2.

@shogo82148
Copy link
Owner

I'm working on this, and it is available on v1.12.0-rc1.

steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-perl@v1.12.0-rc1
  with:
    perl-version: '5.32'
    install-modules-with: cpm
    install-modules-args: --with-develop --with-configure
- run: prove -lv t

please try it, and give me a feedback.

@ylavoie
Copy link
Author

ylavoie commented May 12, 2021

      - name: Setup Perl environment
        uses: shogo82148/actions-setup-perl@v1.12.0-rc1
        with:
          perl-version: 5.32
          install-modules-with: cpm
          install-modules-args: --with-develop --feature=starman --feature=latex-pdf-ps --feature=openoffice --feature=xls --feature=edi

worked wonderfully, installed the 309 distributions required by the above features and set a cache for them.

For lisibility, we may gain to be able to use something like

          install-modules-args: --with-develop --feature=starman \
                                --feature=latex-pdf-ps --feature=openoffice \
                                --feature=xls --feature=edi

@shogo82148
Copy link
Owner

You can use the folding style of YAML: https://yaml.org/spec/1.2/spec.html#style/block/folded

          install-modules-args: >
                    --with-develop --feature=starman
                    --feature=latex-pdf-ps --feature=openoffice
                    --feature=xls --feature=edi

@shogo82148
Copy link
Owner

released as v1.12.0

@lskatz
Copy link

lskatz commented Sep 3, 2021

Do you need install-modules-args: --with-develop --with-configure to have the cache? Or will caching work without those options?

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

No branches or pull requests

3 participants