Provide implementation for Zone11 (SPF test) #968
Workflow file for this run
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: | |
- develop | |
- master | |
- 'releases/**' | |
pull_request: | |
branches: | |
- develop | |
- master | |
- 'releases/**' | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
compatibility: | |
- develop | |
#- latest | |
perl: | |
- '5.32' | |
- '5.26' | |
- '5.16' | |
runner: | |
- ubuntu-20.04 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: Binary dependencies | |
run: | | |
# * These were taken from the installation instruction. | |
# * Gettext was added so we can run cpanm . on the Engine sources. | |
# * The Perl modules were left out because I couldn't get all of them | |
# to work with custom Perl versions. | |
# * Cpanminus was left out because actions-setup-perl installs it. | |
sudo apt-get install -y \ | |
autoconf \ | |
automake \ | |
build-essential \ | |
gettext \ | |
libidn2-dev \ | |
liblog-any-perl \ | |
libssl-dev \ | |
libtool \ | |
m4 \ | |
- name: Install Zonemaster::LDNS (latest) | |
if: ${{ matrix.compatibility == 'latest' }} | |
run: | | |
sudo cpanm --notest Module::Install Zonemaster::LDNS | |
- name: Install Zonemaster::LDNS (develop) | |
if: ${{ matrix.compatibility == 'develop' }} | |
run: | | |
sudo cpanm --notest Devel::CheckLib Module::Install Module::Install::XSUtil | |
git clone --branch=develop --depth=1 https://github.com/zonemaster/zonemaster-ldns.git | |
perl Makefile.PL # Generate MYMETA.yml to appease cpanm . | |
( cd zonemaster-ldns ; sudo cpanm --notest . ) | |
rm -rf zonemaster-ldns | |
# Installing Zonemaster::Engine requires root privileges, because of a | |
# bug in Mail::SPF preventing normal installation with cpanm as | |
# non-root user (see | |
# https://rt.cpan.org/Public/Bug/Display.html?id=34768). | |
# | |
# The alternative, if one still wishes to install Zonemaster::Engine | |
# as non-root user, is to install Mail::SPF first with a command like: | |
# | |
# % cpanm --notest \ | |
# --install-args="--install_path sbin=$HOME/.local/sbin" \ | |
# Mail::SPF | |
# | |
# For the sake of consistency, other Perl packages installed from CPAN | |
# are also installed as root. | |
- name: Install remaining dependencies | |
run: | | |
sudo cpanm --verbose --notest --installdeps . | |
- name: Install Zonemaster::Engine | |
run: | | |
sudo cpanm --verbose --notest . | |
- name: Show content of log files | |
if: ${{ failure() }} | |
run: cat /home/runner/.cpanm/work/*/build.log | |
- name: Test | |
run: | | |
prove -lv t |