-
Notifications
You must be signed in to change notification settings - Fork 46
98 lines (85 loc) · 3.41 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: perl
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
create:
jobs:
ci:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
env:
PGPLOT_DEV: /NULL
strategy:
fail-fast: false
matrix:
include:
- perl-version: '5.26'
os: windows-latest
steps:
- uses: actions/checkout@v2
- name: 'ci-dist: target-setup-perl'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
target-setup-perl: true
perl-version: ${{ matrix.perl-version }}
# conditional config
- name: Maybe gfortran
if: "!matrix.disable-fortran"
uses: PDLPorters/devops/github-actions/install-dep-gfortran@master
- 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: try
run: "where *make"
- 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
mv Basic Basic.x # ensure doesn't think is in repo!
prove -j4 t
- name: 'ci-dist: target-test (with coverage)'
uses: PDLPorters/devops/github-actions/ci-dist@master
if: matrix.coverage
with:
target-test: true
test-enable-coverage: ${{ matrix.coverage }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: perl -Iblib/lib -MData::Dumper -e 'eval { require PDL::Config }; $Data::Dumper::Sortkeys = 1; print Dumper \%PDL::Config'