Skip to content

Commit

Permalink
Merge pull request #12 from PDLPorters/gha-shared-actions
Browse files Browse the repository at this point in the history
Use shared GitHub Actions
  • Loading branch information
mohawk2 committed Oct 31, 2021
2 parents 24038b5 + f4fa924 commit e55ce07
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 26 deletions.
69 changes: 43 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,65 @@ on:
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: true
ci:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
needs: notify
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
perl-version: ['5.10']
perl-version: ['5.10', '5.14', '5.20']
include:
- perl-version: '5.30'
os: ubuntu-latest
release-test: true
- perl-version: '5.30'
os: macos-latest
coverage: true
- perl-version: '5.30'
os: windows-latest
- perl-version: '5.30'
os: macos-11
steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-perl@v1
- name: 'ci-dist: target-setup-perl'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
distribution: strawberry # ignored non-windows
target-setup-perl: true
perl-version: ${{ matrix.perl-version }}
- run: perl -V

- name: Ubuntu packages
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y update && sudo apt-get install build-essential gfortran
- name: MacOS packages
if: matrix.os == 'macos-latest'
run: brew reinstall gcc

- name: Run release tests # before others as may install useful stuff
if: ${{ matrix.release-test }}
env:
RELEASE_TESTING: 1
- name: Install gfortran
uses: PDLPorters/devops/github-actions/install-gfortran@master
- name: Install Perl configure deps
shell: bash
run: |
cpanm -n --installdeps --with-develop .
prove -lr xt
$MYPERL -S cpanm --dev -n ExtUtils::MakeMaker || cat ~/.cpanm/build.log
- name: 'ci-dist: target-all'
uses: PDLPorters/devops/github-actions/ci-dist@master
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 }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- run: cpanm -n ExtUtils::MakeMaker && cpanm -n --installdeps .
- name: Run tests (no coverage)
if: '!matrix.coverage'
env:
HARNESS_OPTIONS: j4
run: perl Makefile.PL && make test
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: true
needs: ${{ toJSON(needs) }}
17 changes: 17 additions & 0 deletions .github/workflows/issue-notify.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e55ce07

Please sign in to comment.