Skip to content

Commit

Permalink
CI: more caching
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnlaffan committed Jun 12, 2024
1 parent 8925658 commit 241daae
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/linux_bin_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
env:
PERL_MOD_DIR: /home/runner/perl5/lib/perl5


jobs:
perl:

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
11 changes: 10 additions & 1 deletion .github/workflows/linux_share_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/macos_share_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit 241daae

Please sign in to comment.