Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bacpop-145 Make gha PopPUNK installation match dockerfile #33

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
67 changes: 26 additions & 41 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ jobs:
working-directory: ./main
run: |
./scripts/download_db --small storage

- name: Install Linux packages
run: |
sudo apt-get update -q
sudo apt-get install -q -y --no-install-recommends bzip2 ca-certificates git libglib2.0-0 libsm6 libxext6 libxrender1 mercurial openssh-client procps subversion wget

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.10"

- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
python-version: 3.9
python-version: "3.10"
activate-environment: beebop_py
channels: bioconda, conda-forge

Expand All @@ -51,45 +56,25 @@ jobs:
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Restore Conda env from cache
uses: actions/cache@v2
with:
path: /usr/share/miniconda/envs/beebop_py
key:
# Refresh cache each day
conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER}}
env:
# Increment this value to manually reset cache.
CACHE_NUMBER: 0
id: cache-conda

# - name: Install poppunk
# run: conda install poppunk
# currently the latest poppunk release is missing some functions required for beebop. For now installing from source:

- name: Get poppunk source code
uses: actions/checkout@v3
with:
repository: bacpop/PopPUNK
ref: fix-json-serialisation
path: poppunk

- name: install poppunk & dependencies
working-directory: ./poppunk
#- name: Restore Conda env from cache
# uses: actions/cache@v2
# with:
# path: /usr/share/miniconda/envs/beebop_py
# key:
# # Refresh cache each day
# conda-${{ runner.os }}--${{ runner.arch }}--${{
# steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER}}
# env:
# # Increment this value to manually reset cache.
# CACHE_NUMBER: 0
# id: cache-conda

- name: Install poppunk dependencies
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate beebop_py
conda install graph-tool
conda install mandrake
conda install rapidnj
sudo apt-get update
sudo apt-get install libeigen3-dev libegl1
sudo apt-get install libopenblas-dev
sudo apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
pip install joblib==1.1.0
conda install -c bioconda pp-sketchlib=2.0.0
pip3 install git+https://github.com/bacpop/PopPUNK
conda install python=3.10

- name: Install poppunk
run: conda install poppunk

- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down
Loading