add macos-11+12 in github workflow #23
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: CI | |
on: | |
push: | |
branches-ignore: | |
- '*travis*' | |
- '*appveyor*' | |
- '*doozer*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
create-dist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install prereqs | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -qy --no-install-recommends libmodule-build-perl | |
- name: Create dist | |
run: | | |
perl Build.PL | |
./Build | |
./Build dist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: "*.tar.gz" | |
test: | |
name: Test on ${{ matrix.container || matrix.runs-on }} | |
runs-on: ${{ matrix.runs-on }} | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
include: | |
- { runs-on: ubuntu-latest, container: "perl:5.8.9-threaded-stretch" } | |
- { runs-on: ubuntu-latest, container: "perl:5.10.1-buster" } | |
- { runs-on: ubuntu-latest, container: "perl:5.12.5-stretch" } | |
- { runs-on: ubuntu-latest, container: "perl:5.14.4-stretch" } | |
- { runs-on: ubuntu-latest, container: "perl:5.16.3-buster" } | |
- { runs-on: ubuntu-latest, container: "perl:5.18.4-buster" } | |
- { runs-on: ubuntu-latest, container: "perl:5.22.4-stretch" } | |
- { runs-on: ubuntu-latest, container: "perl:5.30.3-threaded-buster" } | |
- { runs-on: ubuntu-latest, container: "perl:5.36.0-slim-bullseye" } | |
- { runs-on: ubuntu-latest, container: "perl:5.38.0-slim-bookworm" } | |
- { runs-on: macos-11 } | |
- { runs-on: macos-12 } | |
- { runs-on: ubuntu-latest } | |
- { runs-on: windows-latest } | |
needs: create-dist | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Mac prereqs | |
run: | | |
brew install cpanminus | |
if: "startsWith(matrix.runs-on, 'macos-')" | |
- name: Windows prereqs | |
run: | | |
if (!(Test-Path -Path "C:\strawberry")) { | |
cinst strawberryperl | |
} | |
if: "startsWith(matrix.runs-on, 'windows-')" | |
- name: Ubuntu prereqs | |
run: | | |
apt-get update -q | |
apt-get install -qy --no-install-recommends cpanminus | |
if: "startsWith(matrix.runs-on, 'ubuntu-') && !matrix.container" | |
- name: Prereqs for older perls | |
run: | | |
perl -e 'exit($] >= 5.010 ? 0 : 1)' || cpanm Regexp::Common@2016020301 | |
if: "!startsWith(matrix.runs-on, 'windows-')" | |
# note: windows would need another command line, but not needed anyway | |
- name: Test with cpanm | |
run: | | |
cpanm --test --verbose *.tar.gz |