From 1d5e0eaaaf907216b5bd0c74080c906d9297ba37 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Wed, 22 Sep 2021 15:53:06 -0400 Subject: [PATCH 1/7] Use shared GitHub Actions Uses the shared actions introduced by . --- .github/workflows/ci.yml | 114 +++++++++++++++++++++++++++++ .github/workflows/issue-notify.yml | 17 +++++ 2 files changed, 131 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/issue-notify.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..45d47cc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,114 @@ +name: perl +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + create: +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-notifications: false # TODO + ci: + runs-on: ${{ matrix.os }} + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + needs: notify + env: + PDL_SIMPLE_ENGINE: ${{ matrix.pdl-simple-engine }} + strategy: + fail-fast: false + matrix: + # Possible values of pdl-simple-engine + # - 'gnuplot' : test Gnuplot + # - 'plplot' : test PLplot + # - 'pgplot' : test PGPLOT + # - '' : test all of the above + pdl-simple-engine: [''] + os: [ubuntu-latest] + perl-version: ['5.10', '5.14', '5.20'] + include: + # Test each on ubuntu separately. + - perl-version: '5.30' + os: ubuntu-latest + pdl-simple-engine: 'gnuplot' + - perl-version: '5.30' + os: ubuntu-latest + pdl-simple-engine: 'plplot' + - perl-version: '5.30' + os: ubuntu-latest + pdl-simple-engine: 'pgplot' + # Test all engines on ubuntu with coverage. + - perl-version: '5.30' + os: ubuntu-latest + release-test: true + coverage: true + # Only test plplot on Windows. + - perl-version: '5.30' + os: windows-latest + pdl-simple-engine: 'plplot' + # Test all engines on macOS. + - perl-version: '5.30' + os: macos-latest + steps: + - uses: actions/checkout@v2 + - name: 'ci-dist: target-setup-perl' + uses: PDLPorters/devops/github-actions/ci-dist@gha-bulk-actions # TODO + with: + target-setup-perl: true + perl-version: ${{ matrix.perl-version }} + - name: Install Gnuplot + if: ${{ matrix.pdl-simple-engine == 'gnuplot' || matrix.pdl-simple-engine == '' }} + uses: PDLPorters/devops/github-actions/install-dep-gnuplot@master + - name: Install PLplot + if: ${{ matrix.pdl-simple-engine == 'plplot' || matrix.pdl-simple-engine == '' }} + uses: PDLPorters/devops/github-actions/install-dep-plplot@gha-bulk-actions # TODO + - name: Install PDL dependencies + uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@gha-bulk-actions # TODO + - name: Install Perl runtime optional deps (gnuplot) + if: ${{ matrix.pdl-simple-engine == 'gnuplot' || matrix.pdl-simple-engine == '' }} + shell: bash + run: | + $MYPERL -S cpanm -n PDL::Graphics::Gnuplot || cat ~/.cpanm/build.log + - name: Install Perl runtime optional deps (plplot) + if: ${{ matrix.pdl-simple-engine == 'plplot' || matrix.pdl-simple-engine == '' }} + shell: bash + run: | + $MYPERL -S cpanm -n PDL::Graphics::PLplot || cat ~/.cpanm/build.log + - name: Install Perl runtime optional deps (pgplot) + if: ${{ matrix.pdl-simple-engine == 'pgplot' || matrix.pdl-simple-engine == '' }} + shell: bash + run: | + $MYPERL -S cpanm -n PDL::Graphics::PGPLOT || cat ~/.cpanm/build.log + - name: Dump engine module status + shell: bash + run: | + $MYPERL -Ilib -MPDL::Graphics::Simple -MData::Dumper -e '$Data::Dumper::Sortkeys = 1; my $mods = $PDL::Graphics::Simple::mods; eval "${_}::check()" for map { $_->{module} } values %$mods; print Dumper($mods)' + - name: 'ci-dist: target-all' + uses: PDLPorters/devops/github-actions/ci-dist@gha-bulk-actions # TODO + with: + target-setup-perl: false + target-install-dist-perl-deps: true + target-test-release-testing: true + target-test: true + test-enable-release-testing: ${{ matrix.release-test }} + test-enable-coverage: ${{ matrix.coverage }} + test-enable-graphical-display: true + github-token: ${{ secrets.GITHUB_TOKEN }} + + build-status: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + needs: [ 'ci' ] + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-build-status: false # TODO + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml new file mode 100644 index 0000000..65023d7 --- /dev/null +++ b/.github/workflows/issue-notify.yml @@ -0,0 +1,17 @@ +name: issue-notify + +on: + issues: + types: [opened] + issue_comment: + types: [created] + +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: PDLPorters/devops/github-actions/irc-notifications@master + with: + target-notifications: true From 000476fe10e8b1051993bf14636ed8bbd712b838 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Fri, 24 Sep 2021 22:31:24 -0400 Subject: [PATCH 2/7] Bring PGPLOT check() in line with other engines See: $ git grep -P '\Q$mod->{ok}\E\s*=\s*1;' --- lib/PDL/Graphics/Simple/PGPLOT.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PDL/Graphics/Simple/PGPLOT.pm b/lib/PDL/Graphics/Simple/PGPLOT.pm index ea1dfe9..e561b3c 100644 --- a/lib/PDL/Graphics/Simple/PGPLOT.pm +++ b/lib/PDL/Graphics/Simple/PGPLOT.pm @@ -80,6 +80,7 @@ sub check { return 0; } + $mod->{ok} = 1; return 1; } From 631d2e24c6e2b5dc2176c64bcb0843d32b04cba1 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sun, 24 Oct 2021 21:32:51 -0400 Subject: [PATCH 3/7] GHA: Disable plplot test on Windows for now --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45d47cc..01b4f0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,9 +50,12 @@ jobs: release-test: true coverage: true # Only test plplot on Windows. - - perl-version: '5.30' - os: windows-latest - pdl-simple-engine: 'plplot' + # NOTE: this currently fails due to a memory error for the wingcc + # interactive plotting device. + #- perl-version: '5.30' + # os: windows-latest + # pdl-simple-engine: 'plplot' + # Test all engines on macOS. - perl-version: '5.30' os: macos-latest From c712c022b5b98a773ea198d11eba46cff7646e0c Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sun, 24 Oct 2021 21:34:40 -0400 Subject: [PATCH 4/7] Add test for Windows + Gnuplot --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01b4f0c..c05caaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,11 @@ jobs: os: ubuntu-latest release-test: true coverage: true - # Only test plplot on Windows. + # Windows: gnuplot + - perl-version: '5.30' + os: windows-latest + pdl-simple-engine: 'gnuplot' + # Windows: plplot # NOTE: this currently fails due to a memory error for the wingcc # interactive plotting device. #- perl-version: '5.30' From 5f5485e644ba151ea0fd0e55a57f3940d62748d1 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sun, 24 Oct 2021 22:14:49 -0400 Subject: [PATCH 5/7] GHA: Disable gnuplot test on Windows for now --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c05caaf..4fbcaa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,9 +50,10 @@ jobs: release-test: true coverage: true # Windows: gnuplot - - perl-version: '5.30' - os: windows-latest - pdl-simple-engine: 'gnuplot' + # NOTE: this currently hangs in the CI testing environment + #- perl-version: '5.30' + # os: windows-latest + # pdl-simple-engine: 'gnuplot' # Windows: plplot # NOTE: this currently fails due to a memory error for the wingcc # interactive plotting device. From 3976c1c9370431b4365ff82444f72592e5f1b7cf Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Mon, 25 Oct 2021 06:24:15 -0400 Subject: [PATCH 6/7] Update from macos-latest (macos-10) to macos-11 Clang 12.0.0 segfaults on macos-10. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fbcaa6..a6772bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: # Test all engines on macOS. - perl-version: '5.30' - os: macos-latest + os: macos-11 steps: - uses: actions/checkout@v2 - name: 'ci-dist: target-setup-perl' From 94f616023ccd01cab0853f4ffa06abeb38421f3a Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Tue, 26 Oct 2021 12:40:03 -0400 Subject: [PATCH 7/7] GHA: Enable shared actions --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6772bb..3eaa796 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: PDLPorters/devops/github-actions/irc-notifications@master with: - target-notifications: false # TODO + target-notifications: true ci: runs-on: ${{ matrix.os }} if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} @@ -67,7 +67,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: 'ci-dist: target-setup-perl' - uses: PDLPorters/devops/github-actions/ci-dist@gha-bulk-actions # TODO + uses: PDLPorters/devops/github-actions/ci-dist@master with: target-setup-perl: true perl-version: ${{ matrix.perl-version }} @@ -76,9 +76,9 @@ jobs: uses: PDLPorters/devops/github-actions/install-dep-gnuplot@master - name: Install PLplot if: ${{ matrix.pdl-simple-engine == 'plplot' || matrix.pdl-simple-engine == '' }} - uses: PDLPorters/devops/github-actions/install-dep-plplot@gha-bulk-actions # TODO + uses: PDLPorters/devops/github-actions/install-dep-plplot@master - name: Install PDL dependencies - uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@gha-bulk-actions # TODO + uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@master - name: Install Perl runtime optional deps (gnuplot) if: ${{ matrix.pdl-simple-engine == 'gnuplot' || matrix.pdl-simple-engine == '' }} shell: bash @@ -99,7 +99,7 @@ jobs: run: | $MYPERL -Ilib -MPDL::Graphics::Simple -MData::Dumper -e '$Data::Dumper::Sortkeys = 1; my $mods = $PDL::Graphics::Simple::mods; eval "${_}::check()" for map { $_->{module} } values %$mods; print Dumper($mods)' - name: 'ci-dist: target-all' - uses: PDLPorters/devops/github-actions/ci-dist@gha-bulk-actions # TODO + uses: PDLPorters/devops/github-actions/ci-dist@master with: target-setup-perl: false target-install-dist-perl-deps: true @@ -118,5 +118,5 @@ jobs: steps: - uses: PDLPorters/devops/github-actions/irc-notifications@master with: - target-build-status: false # TODO + target-build-status: true needs: ${{ toJSON(needs) }}