From f307ab381cdc57ad4b5e821fe409fdfc5aee26d5 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Thu, 9 Nov 2023 13:09:17 -0500 Subject: [PATCH] Use perlrdf shared actions --- .github/workflows/ci.yml | 61 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fa8ee3..5ef1422 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,14 @@ name: Run Tests on: + workflow_dispatch: push: branches: - '*' + tags-ignore: + - '*' pull_request: + create: env: PKG_NAME: Serd @@ -22,44 +26,29 @@ env: mingw-w64-x86_64-pkg-config jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: perlrdf/devops/github-actions/irc-notifications@main + with: + target-notifications: true dist: - name: Make distribution using Dist::Zilla + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + name: Make distribution runs-on: ubuntu-latest + outputs: + min-perl-version: ${{ steps.build-dist.outputs.min-perl-version }} steps: - name: Checkout code uses: actions/checkout@v3 - - name: Cache ~/perl5 - uses: actions/cache@v3 + - id: build-dist + uses: perlrdf/devops/github-actions/build-dist@main with: - key: ${{ runner.os }}-dist-locallib - path: ~/perl5 - - name: Perl version - run: | - perl -v - - name: Install cpanm - run: | - curl -L https://cpanmin.us | perl - --sudo App::cpanminus - - name: Install local::lib - run: | - cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - - name: Install Dist::Zilla - shell: bash - run: | - eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - cpanm -n Dist::Zilla - dzil authordeps --missing | cpanm -n - - name: Make distribution - shell: bash - run: | - eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - dzil build --in build-dir - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: ./build-dir + dist-perl-deps-develop: strict # Add modules test: - needs: dist + needs: [ 'dist', 'notify' ] runs-on: ${{ matrix.os }} defaults: run: @@ -156,3 +145,13 @@ jobs: ALIEN_BUILD_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cpanm --verbose --test-only . + build-status: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + needs: test + steps: + - uses: perlrdf/devops/github-actions/irc-notifications@main + with: + target-build-status: true + needs: ${{ toJSON(needs) }}