diff --git a/.github/workflows/linux_bin_build.yml b/.github/workflows/linux_bin_build.yml index d362169..1efbe9c 100644 --- a/.github/workflows/linux_bin_build.yml +++ b/.github/workflows/linux_bin_build.yml @@ -11,6 +11,7 @@ on: env: PERL_MOD_DIR: /home/runner/perl5/lib/perl5 + jobs: perl: @@ -32,6 +33,22 @@ jobs: - name: perl -V run: perl -V + - name: Prepare for CPAN cache + run: | + perl -V > perlversion.txt + # echo '20220320a' >> perlversion.txt + echo 'bin build' >> perlversion.txt + # dir 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 Dependencies run: | sudo apt-get install -y zlib1g-dev @@ -40,7 +57,9 @@ jobs: sudo add-apt-repository ppa:ubuntugis/ppa sudo apt-get install -y gdal-bin cpanm --notest local::lib + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" cpanm --notest PkgConfig + cpanm --notest Alien::Build cpanm --notest Alien::Base::Wrapper cpanm --notest FFI::Platypus cpanm --notest FFI::Platypus::Declare @@ -53,6 +72,7 @@ jobs: - name: Build run: | + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" perl Makefile.PL cpanm --notest --installdeps . make test diff --git a/.github/workflows/linux_share_build.yml b/.github/workflows/linux_share_build.yml index 6bb9d8e..a5ea9c8 100644 --- a/.github/workflows/linux_share_build.yml +++ b/.github/workflows/linux_share_build.yml @@ -39,9 +39,18 @@ jobs: - name: Prepare for cache run: | perl -V > perlversion.txt - echo '20220320a' >> perlversion.txt + # echo '20220320a' >> perlversion.txt + echo 'share build' >> 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: | which -a cpanm diff --git a/.github/workflows/macos_share_builds.yml b/.github/workflows/macos_share_builds.yml index 6393e34..5360711 100644 --- a/.github/workflows/macos_share_builds.yml +++ b/.github/workflows/macos_share_builds.yml @@ -43,8 +43,19 @@ jobs: 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 @@ -60,10 +71,12 @@ jobs: - 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}