NAME
Alien::Build::Plugin::Probe::OverrideCI - Override logic for continuous integration
VERSION
version 0.03
SYNOPSIS
In your .travis.yml:
language: perl
install:
- cpanm -n Alien::Build::Plugin::Probe::OverrideCI
- cpanm -n --installdeps .
env:
global:
- ALIEN_BUILD_PRELOAD=Probe::OverrideCI
matrix:
- ALIEN_INSTALL_TYPE_CI=share
- ALIEN_INSTALL_TYPE_CI=system
In your appveyor.yml
install:
- ... # however you install/select which Perl to use
- cpanm -n Alien::Build::Plugin::Probe::OverrideCI
- cpanm -n --installdeps .
environment:
ALIEN_BUILD_PRELOAD: Probe::OverrideCI
matrix:
- ALIEN_INSTALL_TYPE_CI: share
ALIEN_INSTALL_TYPE_CI: system
In your .github/workflows/main.yml
jobs:
perl:
env:
ALIEN_BUILD_PRELOAD: Probe::OverrideCI
strategy:
matrix:
install_type:
- share
- system
perl-version:
- '5.30'
- '5.16'
steps:
- uses: actions/checkout@v2
- name: Install CI Dependencies
run: cpanm -n -q Alien::Build::Plugin::Probe::OverrideCI
- name: Install Project Dependencies
run: cpanm -n -q --installdeps .
- name: Configure Project
run: perl Makefile.PL
env:
ALIEN_INSTALL_TYPE_CI: ${{ matrix.install_type }}
DESCRIPTION
This plugin provides an easy way to test both share and system installs using a travis or appveyor environment matrix, without affecting the install type detection of prereqs. Thus if your library Alien::libfoo
depends on Alien::gmake you can test both a system and share install for Alien::libfoo
while building Alien::gmake using the default (usually system) install and saving build time.
It does this using the appropriate environment variables from the CI tool to determine if the alienfile is in the build root. If you are in the build root, then we use the environment variable ALIEN_INSTALL_TYPE_CI
, if we are not in the build root, then we fallback on the existing behavior (either ALIEN_INSTALL_TYPE
, or the default for the alienfile itself).
If you want to override the install type on a per-alien basis in a development or production environment (not CI), then Alien::Build::Plugin::Probe::Override may be useful for you.
SEE ALSO
AUTHOR
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Roy Storey (KIWIROY)
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.