Skip to content

CI: more caching

CI: more caching #90

Workflow file for this run

name: linux_bin_build
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
env:
PERL_MOD_DIR: /home/runner/perl5/lib/perl5
jobs:
perl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.38'
- name: Locale check
run: |
locale -a
echo Current locale:
locale
- 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
sudo apt-get install -y libnet-ssleay-perl
sudo apt-get install -y software-properties-common
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
cpanm --notest Sort::Versions
cpanm --notest Test::Exception
cpanm --notest JSON
cpanm --notest PDL
cpanm --notest Path::Tiny
cpanm --notest Test::TempDir::Tiny
- name: Build
run: |
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
perl Makefile.PL
cpanm --notest --installdeps .
make test