From e32d2996a8d78c1f7003c0e317d751e907a94103 Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 26 Nov 2024 01:54:18 +0000 Subject: [PATCH] add CI plus trappings of CPAN distro --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++ .github/workflows/issue-notify.yml | 21 ++++++++++ .gitignore | 38 +++++++++++++++++ Makefile.PL | 31 +++++++++++--- 4 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/issue-notify.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..707bae2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: perl +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + create: + +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-notifications: true + ci: + runs-on: ${{ matrix.os }} + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + perl-version: ['5.16', '5.20'] + include: + - perl-version: '5.30' + os: ubuntu-latest + release-test: true + coverage: true + - perl-version: '5.30' + os: macos-latest + steps: + - uses: actions/checkout@v2 + - name: 'ci-dist: target-setup-perl' + uses: PDLPorters/devops/github-actions/ci-dist@master + with: + target-setup-perl: true + perl-version: ${{ matrix.perl-version }} + - name: Install PDL dependencies + uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@master + - name: 'ci-dist: target-all' + uses: PDLPorters/devops/github-actions/ci-dist@master + with: + target-setup-perl: false + target-install-dist-perl-deps: true + dist-perl-deps-configure: PDL + target-test-release-testing: true + target-test: true + test-enable-release-testing: ${{ matrix.release-test }} + test-enable-coverage: ${{ matrix.coverage }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + build-status: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + needs: [ 'ci' ] + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-build-status: true + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml new file mode 100644 index 0000000..430b399 --- /dev/null +++ b/.github/workflows/issue-notify.yml @@ -0,0 +1,21 @@ +name: issue-notify + +on: + issues: + types: [opened,assigned,closed,reopened] + issue_comment: + types: [created] + pull_request: + types: [closed,assigned,converted_to_draft,ready_for_review,review_requested] + pull_request_review: + types: [submitted] + +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-notifications: true diff --git a/.gitignore b/.gitignore index 9163ae6..e287b41 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,41 @@ Complex.c Complex.pm Complex.xs + +*.o +*.obj +*.so +*.dylib +*.bundle + +_eumm +pm_to_blib +blib +*.bs +Makefile +Makefile.aperl +MYMETA.yml +MYMETA.json +MANIFEST.bak + +# Editor temp files +*~ +# VIM +.*.swp + +# Strange mac files +._* + +# Devel::Cover files +*.gcda +*.gcno +*.gcov +cover_db/ + +nytprof* + +# Directory specific build files +# These can either be in the specific directories or specified +# with full patch in the top level directory (as here). + +pp-*.c diff --git a/Makefile.PL b/Makefile.PL index f1d1a6c..6a29a75 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,13 +1,34 @@ use strict; use warnings; use ExtUtils::MakeMaker; +use PDL::Core::Dev; -my @pack = (["complex.pd", qw(Complex PDL::Complex)]); +my @pack = (["complex.pd", qw(Complex PDL::Complex), '', 1]); -my %hash = pdlpp_stdargs_int(@pack); +my %hash = pdlpp_stdargs(@pack); $hash{LIBS} = ['-lm']; +$hash{CONFIGURE_REQUIRES}{'ExtUtils::MakeMaker'} = '7.14'; +$hash{CONFIGURE_REQUIRES}{'PDL::Core::Dev'} = 0; +$hash{PREREQ_PM}{'PDL'} = '2.095'; -undef &MY::postamble; # suppress warning -*MY::postamble = sub{ pdlpp_postamble_int(@pack); }; +sub MY::postamble { pdlpp_postamble(@pack); } -WriteMakefile(%hash); +WriteMakefile( + AUTHOR => 'Marc Lehmann ', + LICENSE => 'perl', + MIN_PERL_VERSION => '5.016', + META_MERGE => { + "meta-spec" => { version => 2 }, + resources => { + homepage => 'http://pdl.perl.org/', + bugtracker => {web=>'https://github.com/PDLPorters/PDL-Complex/issues'}, + repository => { + url => 'git://github.com/PDLPorters/PDL-Complex.git', + type => 'git', + web => 'https://github.com/PDLPorters/PDL-Complex', + }, + x_IRC => 'irc://irc.perl.org/#pdl', + }, + }, + %hash, +);