Version 1.30 #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
pull_request: | |
env: | |
PERL5LIB: c:\cx\lib\perl5 | |
PERL_LOCAL_LIB_ROOT: c:/cx | |
PERL_MB_OPT: --install_base C:/cx | |
PERL_MM_OPT: INSTALL_BASE=C:/cx | |
ALIEN_BUILD_PRELOAD: Fetch::Cache | |
#AUTOMATED_TESTING: 1 | |
jobs: | |
perl: | |
runs-on: windows-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Perl | |
run: | | |
choco install strawberryperl | |
echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
choco install sqlite | |
- name: perl -V | |
run: | | |
echo $env:PATH | |
perl -V | |
- name: Prepare for CPAN cache | |
run: | | |
perl -V > perlversion.txt | |
echo 'update 20220413' >> perlversion.txt | |
dir perlversion.txt | |
- name: Cache CPAN modules | |
uses: actions/cache@v4 | |
with: | |
path: c:\cx | |
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} | |
# - name: Prepare for Alien cache | |
# run: | | |
# perl -V > aliencache.txt | |
# echo 'aliens 20220413' >> aliencache.txt | |
# dir aliencache.txt | |
# - name: Cache Alien downloads | |
# uses: actions/cache@v4 | |
# with: | |
# path: C:\Users\runneradmin\.alienbuild | |
# key: ${{ runner.os }}-build-${{ hashFiles('aliencache.txt') }} | |
# restore-keys: | | |
# ${{ runner.os }}-build-${{ hashFiles('aliencache.txt') }} | |
#- name: Install Dependencies | |
# run: curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure | |
- name: Install dependencies 1 | |
run: | | |
#cpanm --notest local::lib | |
#eval "$(perl -Mlocal::lib=${PWD}/perl_modules)" | |
cpanm --quiet --notest Alien::Build | |
cpanm --quiet --notest Alien::Build::MM | |
cpanm --quiet --notest Sort::Versions | |
cpanm --quiet --notest PkgConfig | |
cpanm --quiet --notest Alien::Build::Plugin::Cleanse::BuildDir | |
cpanm --quiet --notest File::Find::Rule | |
cpanm --quiet --notest Alien::Build::Plugin::Fetch::Cache | |
cpanm --quiet --notest Env::ShellWords | |
- name: Install dependencies Alien::MSYS | |
run: | | |
cpanm --notest Alien::MSYS | |
- name: Install dependencies Alien::sqlite | |
run: | | |
cpanm -v Alien::sqlite | |
#dir C:\strawberry\c\bin | |
$sqpath = perl -MAlien::sqlite -E"print Alien::sqlite->bin_dir" | |
$env:PATH="$sqpath;$env:PATH" | |
$sqlite3 = perl -MAlien::sqlite -E"print Alien::sqlite->bin_dir . '/sqlite3.exe'" | |
& $sqlite3 -version | |
- name: Install more dependencies for Alien::proj | |
run: | | |
# this is clunky, but we need to avoid Alien:curl for now | |
# cpanm -v --notest --installdeps Alien::proj | |
cpanm Alien::Build::Plugin::Cleanse::BuildDir | |
cpanm FFI::CheckLib | |
cpanm --quiet --notest Alien::Build::Plugin::PkgConfig::PPWrapper | |
cpanm --installdeps . | |
- name: Install Alien::libtiff and Alien::curl | |
run: | | |
cpanm Alien::libtiff # will be a system install under strawberry | |
# disable for now | |
# cpanm Alien::curl | |
- name: gcc | |
run: | | |
which gcc | |
gcc -v | |
# Runs a set of commands using the runners shell | |
- name: Build | |
run: | | |
perl Makefile.PL | |
gmake | |
gmake test | |
#- name: Zip _alien | |
# #if: ${{ failure() }} | |
# if: ${{ always() }} | |
# run: | | |
# pwd | |
# & 7z.exe a _alien.7z | |
# $sql_dir = perl -MAlien::sqlite -E"print Alien::sqlite->dist_dir" | |
# & 7z.exe a sqlite3_dir.7z $sql_dir | |
# #dir *.sql | |
# #$file = Get-Childitem –Path . -Include foo.sql -File -Recurse -ErrorAction SilentlyContinue | |
# #$file | |
# #Get-Content $file | |
# #$sq3 = perl -MAlien::sqlite -E"print Alien::sqlite->bin_dir . '/sqlite3.exe'" | |
# #Get-Content $file | & $sq3 foo.db | |
# | |
#- name: Upload artefact | |
# if: ${{ always() }} | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: _alien.7z | |
# path: ./_alien.7z | |
# | |
#- name: Upload artefact | |
# if: ${{ always() }} | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: sqlite3_dir.7z | |
# path: ./sqlite3_dir.7z |