Skip to content

Merge pull request #68 from fpl/new_fix_issue_53 #115

Merge pull request #68 from fpl/new_fix_issue_53

Merge pull request #68 from fpl/new_fix_issue_53 #115

name: macos_share_build
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
env:
PERL5LIB: /Users/runner/perl5/lib/perl5
PERL_LOCAL_LIB_ROOT: /Users/runner/perl5
PERL_MB_OPT: --install_base /Users/runner/perl5
PERL_MM_OPT: INSTALL_BASE=/Users/runner/perl5
jobs:
perl:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Set up Perl
run: |
brew install perl
echo "{/Users/runner/perl5/bin}" >> $GITHUB_PATH
mkdir -p ~/bin
cd ~/bin
curl -L https://cpanmin.us/ -o cpanm
chmod +x cpanm
echo "{~/bin}" >> $GITHUB_PATH
which perl
which cpanm
- name: perl -V
run: perl -V
- name: Prepare for cache
run: |
perl -V > perlversion.txt
echo '20221130' >> perlversion.txt
ls -l perlversion.txt
- name: Cache CPAN modules
uses: actions/cache@v4
with:
path: /home/runner/perl5/
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }}
- name: Install Dynamic Dependencies
run: |
cpanm --notest local::lib
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
cpanm --notest Path::Tiny
cpanm --notest Test::TempDir::Tiny
cpanm --notest PDL
cpanm --notest Alien::Build
cpanm --notest Alien::Build::MM
cpanm --notest Sort::Versions
cpanm --notest Alien::Build::Plugin::PkgConfig::PPWrapper
cpanm --notest --installdeps Alien::geos::af
cpanm --notest Alien::geos::af
cpanm --notest Alien::libtiff
cpanm --notest Alien::proj
cpanm --notest Alien::gdal
- name: Install Geo::GDAL::FFI deps
run: |
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
cpanm --installdeps Geo::GDAL::FFI
- name: Build
run: |
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
# bandaids
#export DYLD_LIBRARY_PATH=`perl -MAlien::geos::af -e'print Alien::geos::af->dist_dir . "/lib"'`
#export LD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
#echo Set DYLD_LIBRARY_PATH and LD_LIBRARY_PATH to ${DYLD_LIBRARY_PATH}
# what does libgdal want?
#export dylibname=`perl -MAlien::gdal -E'my @arr = grep {"libgdal"} Alien::gdal->dynamic_libs; print $arr[0]'`
#otool -L $dylibname | grep -v System
perl Makefile.PL
cpanm --installdeps --notest .
make test