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

feat: add a perl test section #1230

Merged
merged 7 commits into from
Dec 4, 2024
Merged

feat: add a perl test section #1230

merged 7 commits into from
Dec 4, 2024

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Dec 1, 2024

I added a perl test section and used the following recipe to test:

context:
  name: "perl-data-dumper"
  version: "2.183"

package:
  name: ${{ name }}
  version: ${{ version }}

source:
  url: https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/Data-Dumper-${{ version }}.tar.gz
  sha256: e42736890b7dae1b37818d9c5efa1f1fdc52dec04f446a33a4819bf1d4ab5ad3

build:
  number: 0
  script:
    - perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
    - make
    - make test
    - make install VERBINST=1

requirements:
  build:
    - ${{ compiler('c') }}
    - make
  host:
    - perl
    - perl-extutils-makemaker
  run:
    - perl

tests:
  - perl:
      uses:
        - Data::Dumper

about:
  homepage: https://metacpan.org/pod/Data::Dumper
  license: GPL-1.0-or-later OR Artistic-1.0-Perl
  summary: 'seeds germane, yet not germinated'

I did have some other unrelated issues building this pacakge on macOS though (so the test didn't yet run) :) - the relinking had an issue that would be good to debug independently.

@danielnachun do you have a good recipe that we could use for testing?

@danielnachun
Copy link

It looks like the tests are passing now? I'm still happy to share another recipe if one is needed!

@wolfv
Copy link
Member Author

wolfv commented Dec 1, 2024

I only tested locally. If you have something that doesn't need compiling it might be faster for a ci test

@danielnachun
Copy link

danielnachun commented Dec 1, 2024

Here's one I have that is noarch: generic, has no dependencies other than perl and make and only tests a single import:

context:
  version: 0.03

package:
  name: perl-call-context
  version: ${{ version }}

source:
  url: https://cpan.metacpan.org/authors/id/F/FE/FELIPE/Call-Context-${{ version }}.tar.gz
  sha256: 0ee6bf46bc72755adb7a6b08e79d12e207de5f7809707b3c353b58cb2f0b5a26

build:
  number: 0
  noarch: generic
  script:
    - perl Makefile.PL INSTALLDIRS=site NO_PERLLOCAL=1 NO_PACKLIST=1
    - make
    - make test
    - make install
    - pod2text ${PREFIX}/lib/perl5/core_perl/pods/perlartistic.pod > LICENSE-ARTISTIC
    - pod2text ${PREFIX}/lib/perl5/core_perl/pods/perlgpl.pod > LICENSE-GPL

requirements:
  build:
    - make
  host:
    - perl
  run:
    - perl

tests:
  - perl:
      uses:
        - Call::Context

about:
  license: GPL-1.0-or-later OR Artistic-1.0-Perl
  license_file:
    - LICENSE-ARTISTIC
    - LICENSE-GPL
  summary: Sanity-check calling context
  homepage: http://metacpan.org/pod/Call-Context

Please let me know if you run into any issues!

@wolfv wolfv merged commit 0dbe0a6 into prefix-dev:main Dec 4, 2024
15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants