Skip to content

Commit

Permalink
Merge pull request #5 from PDLPorters/gha-shared-actions
Browse files Browse the repository at this point in the history
Use shared GitHub Actions
  • Loading branch information
mohawk2 committed Oct 31, 2021
2 parents 0d31e3f + f1786ab commit a7d2c8e
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 3 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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' }}
needs: notify
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
perl-version: ['5.10', '5.14', '5.20']
include:
- perl-version: '5.30'
os: ubuntu-latest
release-test: true
coverage: true
#- perl-version: '5.30'
# os: windows-latest
- perl-version: '5.30'
os: macos-11
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: Install Perl configure deps
shell: bash
run: |
$MYPERL -S cpanm --dev -n Alien::Base::ModuleBuild || cat ~/.cpanm/build.log
- name: 'ci-dist: target-all'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
target-setup-perl: false
target-install-dist-perl-deps: true
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) }}
17 changes: 17 additions & 0 deletions .github/workflows/issue-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: issue-notify

on:
issues:
types: [opened]
issue_comment:
types: [created]

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
5 changes: 2 additions & 3 deletions Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if (my $s = `pkg-config --variable pc_path pkg-config`) {
}

$dest_libdir = $first_lib || $first_lib64 || "";
undef $dest_libdir if $> != 0; # not root
$prefix = "%s";

if($dest_libdir) {
Expand All @@ -45,10 +46,8 @@ if (my $s = `pkg-config --variable pc_path pkg-config`) {
$prefix = $s;
}
} else {
if($first_share_pc) {
if($first_share_pc && $> == 0) {
$bonus_install_command = "mv %s/lib/pkgconfig/fftw*.pc $first_share_pc";
} else {
die "Couldn't figure out a reasonable place to stick the pkg-config files for fftw.\n Sorry, you're on your own.";
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions lib/Alien/FFTW3.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ use warnings;
our $VERSION = '0.04';
use parent 'Alien::Base';

use Env qw(@PKG_CONFIG_PATH);
use File::Spec;

our $pkgconfig;
BEGIN {
unshift @PKG_CONFIG_PATH, File::Spec->catfile(
__PACKAGE__->dist_dir,
qw(lib pkgconfig)
) if __PACKAGE__->install_type('share');
if ($^O eq 'MSWin32') {
# no 'which' on MS Windows but 'pkg-config' might be installed
$pkgconfig = 'pkg-config' if `pkg-config --version`;
Expand Down

0 comments on commit a7d2c8e

Please sign in to comment.