From 5b0d8c87e7fe06d398bcb3d0154cc40603dc0725 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Wed, 22 Sep 2021 15:53:06 -0400 Subject: [PATCH 1/6] Use shared GitHub Actions Uses the shared actions introduced by . --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++ .github/workflows/issue-notify.yml | 17 +++++++ 2 files changed, 90 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..778d3c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +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 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + perl-version: ['5.10', '5.14', '5.20'] + include: + - perl-version: '5.30' + os: ubuntu-latest + release-test: true + coverage: true + - perl-version: '5.30' + os: windows-latest + - 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@master + with: + target-setup-perl: true + perl-version: ${{ matrix.perl-version }} + - name: Install Perl configure deps + shell: bash + run: | + $MYPERL -S cpanm --dev -n Alien::Build Alien::Build::MM Alien::Build::Plugin::Cleanse::BuildDir Alien::Build::Plugin::PkgConfig::Negotiate ExtUtils::MakeMaker File::Find::Rule PkgConfig Sort::Versions || cat ~/.cpanm/build.log + - name: Install Perl release testing deps + if: matrix.release-test + shell: bash + run: | + $MYPERL -S cpanm --dev -n Test::HasVersion Test::Pod Test::Perl::Critic::Progressive Test::NoTabs Test::Strict || 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 }} + + 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 c414cd912332d3ec5553fdd55c51abbd12426902 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Mon, 25 Oct 2021 04:50:10 -0400 Subject: [PATCH 2/6] Restrict paths to check --- xt/09-use_strict.t | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/xt/09-use_strict.t b/xt/09-use_strict.t index 42007bb..5e79e4b 100644 --- a/xt/09-use_strict.t +++ b/xt/09-use_strict.t @@ -15,12 +15,9 @@ if ($OSNAME eq 'MSWin32') { plan skip_all => "Skipping use_strict tests due to false positives on $OSNAME"; } -all_perl_files_ok( ); # Syntax ok and use strict; +use FindBin qw { $Bin }; +my @paths = map { + File::Spec->catfile ($Bin, qw{..}, $_ ) +} qw(bin lib t xt); -# -#use FindBin qw { $Bin }; -#my $bin_path = File::Spec->catfile ($Bin, qw{..}, 'bin'); -#my $lib_path = File::Spec->catfile ($Bin, qw{..}, 'lib'); -#my $t_path = File::Spec->catfile ($Bin, qw{..}, 't'); -# -#all_perl_files_ok( $bin_path, $lib_path, $t_path ); # Syntax ok and use strict; +all_perl_files_ok( @paths ); # Syntax ok and use strict; From ff97299699bc8e86fbf0ba9e9597f8ca06adb68b Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Mon, 25 Oct 2021 06:24:15 -0400 Subject: [PATCH 3/6] 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 778d3c2..cf047e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - perl-version: '5.30' os: windows-latest - perl-version: '5.30' - os: macos-latest + os: macos-11 steps: - uses: actions/checkout@v2 - name: 'ci-dist: target-setup-perl' From fb307479f08c667855ea051d082930f11725044e Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Tue, 26 Oct 2021 23:41:06 -0400 Subject: [PATCH 4/6] Disable parallel build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf047e1..f5b4ee4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,7 @@ jobs: test-enable-release-testing: ${{ matrix.release-test }} test-enable-coverage: ${{ matrix.coverage }} github-token: ${{ secrets.GITHUB_TOKEN }} + build-enable-parallel: false build-status: runs-on: ubuntu-latest From 14abc5022e7d1510b54013d6c6c6909bd061b33e Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 30 Oct 2021 14:51:14 -0400 Subject: [PATCH 5/6] GHA: Disable macOS for now This is due to linking issues in the test phase when the library is under `blib/`. This may be fixed by setting `rpath` or using static linking. --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5b4ee4..0305a08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,13 @@ jobs: coverage: true - perl-version: '5.30' os: windows-latest - - perl-version: '5.30' - os: macos-11 + # Disable macos + # NOTE This issue is because the linker is + # not able to find the library at testing + # time as it is in blib/. This may need + # fixing by setting the value of @rpath. + #- perl-version: '5.30' + # os: macos-11 steps: - uses: actions/checkout@v2 - name: 'ci-dist: target-setup-perl' From e110910cbb38bef00ed8ae3ebe062678767aad08 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 30 Oct 2021 18:05:58 -0400 Subject: [PATCH 6/6] GHA: Enable shared actions --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0305a08..06d97df 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' }} @@ -75,5 +75,5 @@ jobs: steps: - uses: PDLPorters/devops/github-actions/irc-notifications@master with: - target-build-status: false # TODO + target-build-status: true needs: ${{ toJSON(needs) }}