Ensure per product archival impacts hierarchy #12
This file contains 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
name: testing_and_building_repo | |
on: [push, pull_request] | |
env: | |
WTSI_NPG_BUILD_BRANCH: ${{ github.base_ref || github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Distribution Perl | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache conda | |
id: minicondaCache | |
uses: actions/cache@v3 | |
with: | |
path: $HOME/miniconda | |
key: ${{ runner.os}}-build-miniconda | |
- name: Cache cpanm external modules | |
id: cpanmCache | |
uses: actions/cache@v3 | |
with: | |
path: ~/perl5ext | |
key: ${{ runner.os}}-build-cpanm-external | |
- name: Install libgd-dev and uuid-dev | |
run: | | |
sudo apt-get update | |
# https://github.com/actions/runner-images/issues/2139 | |
sudo apt-get remove -y nginx libgd3 | |
sudo apt-get install -y libgd-dev uuid-dev libgd-text-perl | |
- name: Install baton and samtools | |
run: | | |
# Install baton from our conda channel | |
conda install --yes --channel ${WTSI_NPG_CONDA_REPO} --channel default --mkdir --prefix $HOME/miniconda/miniconda/baton baton; | |
# Install samtools from our conda channel | |
# This is needed for our basic IRODS Perl wrapper to work | |
conda install --yes --channel ${WTSI_NPG_CONDA_REPO} --channel default --mkdir --prefix $HOME/miniconda/miniconda/samtools samtools | |
env: | |
WTSI_NPG_CONDA_REPO: https://dnap.cog.sanger.ac.uk/npg/conda/prod/generic | |
- name: Install cpanm | |
run: | | |
wget -qO - https://cpanmin.us | /usr/bin/perl - --sudo App::cpanminus | |
- name: Install NPG Perl dependencies, and their CPAN dependencies | |
run: | | |
echo "$HOME/miniconda/samtools/bin" >> $GITHUB_PATH | |
cpanm --local-lib=~/perl5ext local::lib && eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib) | |
${GITHUB_WORKSPACE}/scripts/install_npg_perl_dependencies.sh $WTSI_NPG_GITHUB_URL $WTSI_NPG_BUILD_BRANCH | |
env: | |
WTSI_NPG_GITHUB_URL: https://github.com/wtsi-npg | |
- name: Install cpanm dependencies | |
run: | | |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg) | |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext) | |
cpanm --installdeps . | |
- name: Run Build.PL and ./Build | |
run: | | |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext) | |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg) | |
export TEST_AUTHOR=1 | |
perl Build.PL && ./Build test --verbose && ./Build install | |
- name: Archive CPAN logs on failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cpan_log | |
path: /home/runner/.cpanm/work/*/build.log | |
retention-days: 5 |