Parallel version of AGAT #824
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: CI | |
| # Controls when the action will run. | |
| # Triggers the workflow on push or pull request events | |
| on: [push, pull_request, workflow_dispatch] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a second job called "build2" | |
| build_perl536: | |
| # avoid to run twice push and PR | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Install required system packages | |
| run: sudo apt-get -y install libdb-dev r-base | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout AGAT code | |
| uses: actions/checkout@v4 | |
| - name: Setup Perl | |
| uses: shogo82148/actions-setup-perl@v1 | |
| with: | |
| perl-version: '5.36' | |
| install-modules-with: cpanm | |
| install-modules-args: --notest --force | |
| install-modules: File::ShareDir::Install Parallel::ForkManager IPC::Shareable | |
| - name: Set up cache for cpanm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/perl5 | |
| key: ${{ runner.os }}-perl5-${{ hashFiles('**/cpanfile', '**/Makefile.PL', '**/Build.PL') }} | |
| restore-keys: | | |
| ${{ runner.os }}-perl5- | |
| - name: install AGAT dependencies | |
| run: | | |
| cpanm --local-lib=~/perl5 --installdeps . --notest --force | |
| echo "PERL5LIB=~/perl5/lib/perl5" >> $GITHUB_ENV | |
| echo "PATH=~/perl5/bin:$PATH" >> $GITHUB_ENV | |
| - name: Show cpanm build log on failure | |
| if: failure() | |
| run: cat ~/.cpanm/build.log || echo "No build log found" | |
| - name: Run test | |
| run: make test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # This workflow contains a first job called "build" | |
| build_perl530: | |
| # avoid to run twice push and PR | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| #container: | |
| # image: perl:5.30 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Install required system packages | |
| run: sudo apt-get -y install libdb-dev r-base | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| # Use of Devel::Cover@1.44 because newer versions take in account all scripts (even those we just do a -h). It drops the coverage ~5%. I would improve testing before unpinning this version. | |
| - uses: actions/checkout@v4 | |
| - name: Setup Perl | |
| uses: shogo82148/actions-setup-perl@v1 | |
| with: | |
| perl-version: '5.30' | |
| install-modules-with: cpanm | |
| install-modules-args: --notest --force | |
| install-modules: File::ShareDir::Install Devel::Cover@1.44 Devel::Cover::Report::Coveralls Parallel::ForkManager IPC::Shareable | |
| - uses: webiny/action-post-run@2.0.1 | |
| id: post-run-command | |
| if: ${{ failure() }} | |
| with: | |
| run: cat /home/runner/.cpanm/build.log | |
| - name: install AGAT deps | |
| run: cpanm --installdeps --notest --force . | |
| - name: test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DEVEL_COVER_OPTIONS: "+ignore,^local/" | |
| run: cover -test -report Coveralls |