Skip to content

should be just one #197

should be just one

should be just one #197

Workflow file for this run

# This is a basic workflow to help you get started with Actions
# use [tobyink]'s https://github.com/tobyink/p5-exporter-tiny/blob/master/.github/workflows/ci.yml as a reference
# - for testing, don't need the "dist" job, because I don't need the tarball; I can just run tests from the repo checkout
# - eventually, might want to add back in a "dist", which creates and archives the tarball during a tag
# -- that probably won't work, because of gpg signing
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
name: Test With Perl ${{ matrix.perl }} ${{ matrix.os }} ${{ matrix.joblabel }}
runs-on: ${{ ( ( startsWith(matrix.os, 'ubuntu:') && 'ubuntu-latest' ) || ( startsWith(matrix.os, 'macos:') && 'macos-latest' ) || startsWith(matrix.os, 'windows:') && 'windows-latest' ) || matrix.os }}
env:
PCJ: ${{ ( startsWith(matrix.os, 'windows') && '(get-command perl).Path' ) || 'which perl' }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest']
#perl: [ '5.8.5', '5.8.6', '5.8.7', '5.8.8', '5.8.9', '5.10', '5.10.1', '5.12', '5.14', '5.16', '5.18', '5.20', '5.22', '5.24', '5.26', '5.28', '5.30', '5.32' ]
#perl: [ '5.10', '5.32' ]
perl: [ '5.32' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up perl ${{ matrix.perl }} ${{ matrix.os }} ${{ matrix.joblabel }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
multi-thread: ${{ ( ( startsWith(matrix.os, 'windows') || endsWith(matrix.os, ':thr') ) && true ) || false }}
distribution: ${{ ( endsWith(matrix.os, ':strawberry') && 'strawberry' ) || 'default' }}
- name: Find binaries expecting ${{ matrix.perl }} ${{ matrix.os }} ${{ matrix.joblabel }}
run: |
${{ ( startsWith(matrix.os, 'windows') && '(get-command perl).Path' ) || 'which perl' }}
perl -v
${{ ( startsWith(matrix.os, 'windows') && '(get-command cpanm).Path' ) || 'which cpanm' }}
cpanm --version
#- name: Combined Directory Listing
# run: ${{ ( startsWith(matrix.os, 'windows') && 'Get-ChildItem -Recurse') || 'ls -latrR' }}
- name: Create makefile before prereqs
# but there are some modules needed by configure, which makes chicken/egg problem
run: |
cpanm --notest File::Fetch File::Spec File::Which Archive::Extract Archive::Zip
perl Makefile.PL
${{ ( startsWith(matrix.os, 'windows') && 'Get-ChildItem -Recurse $Env:Temp') || 'echo $TMP' }}
# ${{ ( startsWith(matrix.os, 'windows') && '(get-command notepad++).Path' ) || 'echo no notepad++' }}
- name: Install module prereqs
# see [tobyink] for ways to enable optional dependencies, based on testing matrix
run: |
cpanm --notest --installdeps .
# TODO: coverage prereqs (conditional)
# TODO: run test
# TODO: run xt (conditional)
- name: Linux test
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: |
make test
- name: Windows test
if: startsWith(matrix.os, 'windows')
shell: cmd
run: |
where notepad.exe
perl -MConfig -le "print $Config{make}"
FOR /F "tokens=* USEBACKQ" %%F IN (`perl -MConfig -e "print $Config{make}"`) DO ( SET mymake=%%F )
echo MyMake = %mymake%
cmd/c echo %mymake% test
- name: cpanm test
run: cpanm --test-only --verbose --no-interactive .