prevent type-conversion of output ndarray with parent already - #511 #4541
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: perl | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
pull_request: | |
jobs: | |
ci-32bit: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
container: ['i386/perl:5.38'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 32-bit CI | |
env: | |
HARNESS_OPTIONS: j4 | |
run: | | |
docker run --rm -v "$(pwd):/pdl" -w /pdl ${{ matrix.container }} \ | |
sh -c 'uname -a; perl -V; \ | |
export HARNESS_OPTIONS=j4 MAKEFLAGS=--jobs=4 | |
(cpanm -n ExtUtils::MakeMaker Devel::CheckLib File::Which && cpanm -n --installdeps .) || ( cat ~/.cpanm/build.log && false ) && \ | |
perl Makefile.PL && make --jobs=4 test' | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
perl-version: ['5.16.0'] | |
perl-threaded: [false] | |
include: | |
- perl-version: '5.30' | |
os: ubuntu-latest | |
release-test: true | |
coverage: true | |
- perl-version: '5.30' | |
os: ubuntu-latest | |
disttest: true | |
- perl-version: '5.16.0' | |
os: ubuntu-latest | |
perl-threaded: true | |
- perl-version: '5.30' | |
os: ubuntu-latest | |
eumm-blead: 1 | |
- perl-version: '5.30' | |
os: ubuntu-latest | |
test-installed: true # test not from blib but after installing | |
- perl-version: '5.30' | |
os: ubuntu-latest | |
use-clang: true # use `clang` instead of `gcc` default | |
- perl-version: '5.26' | |
os: windows-latest | |
- perl-version: '5.30' | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'ci-dist: target-setup-perl' | |
uses: PDLPorters/devops/github-actions/ci-dist@master | |
with: | |
target-setup-perl: true | |
perl-version: ${{ matrix.perl-version }} | |
perl-threaded: ${{ matrix.perl-threaded }} | |
# conditional config | |
- name: Use clang? | |
# clang is already installed in Travis-CI environment. Using PERL_MM_OPT does not work with subdirectory Makefile.PLs so we override Config.pm | |
# Also, both $Config{cc} and $Config{ld} need to be set because under ELF environments (such as Travis-CI's Ubuntu), this is what Perl's Config.pm does. | |
if: matrix.use-clang | |
run: | | |
[ -d build_aux ] || mkdir build_aux | |
echo 'package pdl_config_override; use ExtUtils::MakeMaker::Config; $Config{cc} = $Config{ld} = "clang"; 1;' > build_aux/pdl_config_override.pm | |
echo "PERL5OPT=${PERL5OPT:+${PERL5OPT} }-I$(pwd)/build_aux -Mpdl_config_override" >> $GITHUB_ENV | |
- name: EUMM blead? | |
if: matrix.eumm-blead | |
uses: PDLPorters/devops/github-actions/install-dep-eumm-blead@master | |
- name: Install PDL dependencies | |
uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@master | |
- name: 'ci-dist: target-install-dist-perl-deps' | |
uses: PDLPorters/devops/github-actions/ci-dist@master | |
with: | |
target-install-dist-perl-deps: true | |
dist-perl-deps-configure: ExtUtils::MakeMaker Devel::CheckLib File::Which | |
- name: 'ci-dist: target-test-release-testing' | |
uses: PDLPorters/devops/github-actions/ci-dist@master | |
with: | |
target-test-release-testing: true | |
test-enable-release-testing: ${{ matrix.release-test }} | |
- name: 'ci-dist: target-test (no coverage)' | |
uses: PDLPorters/devops/github-actions/ci-dist@master | |
if: '!matrix.coverage && !matrix.disttest' | |
with: | |
target-test: true | |
test-enable-coverage: ${{ matrix.coverage }} | |
- name: 'disttest' | |
if: matrix.disttest | |
run: | | |
set -e | |
( [ -f Makefile ] || $MYPERL Makefile.PL ) && make disttest | |
- name: Run tests after install (no coverage) | |
if: '!matrix.coverage && matrix.test-installed' | |
run: | | |
set -e | |
[ -f Makefile ] || perl Makefile.PL | |
make install | |
make clean # clean is to ensure no blib | |
prove -j4 t | |
- name: 'ci-dist: target-test (with coverage)' | |
uses: PDLPorters/devops/github-actions/ci-dist@master | |
if: matrix.coverage | |
env: | |
DEVEL_COVER_USE_HARNESS_VAR: 1 # so local::lib vars aren't squashed by D:C even though no 't' dir | |
with: | |
target-test: true | |
test-enable-coverage: ${{ matrix.coverage }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
weird-perls: | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
weirdness: [ 'uselongdouble', 'usequadmath' ] | |
name: Perl with ${{ matrix.weirdness }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
override_cache_key: ccache-v0.0-ubuntu-${{ matrix.weirdness }} | |
- name: Build perl ... | |
env: | |
MAKEFLAGS: --jobs=4 | |
run: | | |
sudo apt-get update && sudo apt-get install perlbrew | |
perlbrew init | |
perlbrew install --notest -D ${{ matrix.weirdness }} perl-5.40.0 --as perl-5.40.0-${{ matrix.weirdness }} || (cat ~/perl5/perlbrew/build.perl-5.40.0.log; false) | |
- name: run tests | |
env: | |
PERL_USE_UNSAFE_INC: 0 | |
HARNESS_OPTIONS: j4 | |
MAKEFLAGS: --jobs=4 | |
run: | | |
source ~/perl5/perlbrew/etc/bashrc | |
perlbrew switch perl-5.40.0-${{ matrix.weirdness }} | |
perlbrew install-cpanm | |
perl -V|grep archname | |
(cpanm -n ExtUtils::MakeMaker Devel::CheckLib File::Which && cpanm -n --installdeps .) || ( cat ~/.cpanm/build.log && false ) | |
perl Makefile.PL | |
make coretest | |
make test | |
build-status: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
if: ${{ always() }} | |
needs: [ 'ci', 'ci-32bit', 'weird-perls' ] | |
steps: | |
- uses: PDLPorters/devops/github-actions/irc-notifications@master | |
with: | |
target-build-status: true | |
needs: ${{ toJSON(needs) }} |