Skip to content

Commit

Permalink
Update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
chtsai0105 committed Apr 24, 2024
1 parent e303a58 commit 184b695
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-iqtree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build IQTree

on: workflow_call

jobs:
build_IQTree:
name: Build IQTree
runs-on: ubuntu-latest

steps:
- name: Cache IQTree
id: cache
uses: actions/cache@v3
with:
path: ~/.local/bin/iqtree2
key: ${{ runner.os }}-IQTree

- name: Download IQTree executable
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install wget
wget https://github.com/iqtree/iqtree2/releases/download/v2.3.2/iqtree-2.3.2-Linux-intel.tar.gz
tar zxf iqtree-2.3.2-Linux-intel.tar.gz
- name: Move executable
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ~/.local/bin
cp iqtree-2.3.2-Linux-intel/bin/iqtree2 ~/.local/bin/
chmod +x ~/.local/bin/iqtree2
- name: Export IQTree to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which iqtree2
36 changes: 36 additions & 0 deletions .github/workflows/build-muscle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build muscle

on: workflow_call

jobs:
build_muscle:
name: Build muscle
runs-on: ubuntu-latest

steps:
- name: Cache muscle
id: cache
uses: actions/cache@v3
with:
path: ~/.local/bin/muscle
key: ${{ runner.os }}-muscle

- name: Download muscle executable
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install wget
wget https://github.com/rcedgar/muscle/releases/download/5.1.0/muscle5.1.linux_intel64
mv muscle5.1.linux_intel64 muscle
- name: Move executable
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ~/.local/bin
cp muscle ~/.local/bin/
chmod +x ~/.local/bin/muscle
- name: Export muscle to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which muscle
41 changes: 41 additions & 0 deletions .github/workflows/build-raxml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build RAxML

on: workflow_call

jobs:
build_RAxML:
name: Build RAxML
runs-on: ubuntu-latest

steps:
- name: Cache RAxML
id: cache
uses: actions/cache@v3
with:
path: ~/.local/bin/raxmlHPC-PTHREADS-AVX2
key: ${{ runner.os }}-RAxML

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: sudo apt-get install build-essential g++ wget unzip

- name: Compile RAxML
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/stamatak/standard-RAxML/archive/refs/tags/v8.2.13.zip
unzip v8.2.13.zip
cd standard-RAxML-8.2.13
make -f Makefile.AVX2.PTHREADS.gcc
- name: Move executable
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ~/.local/bin
cp standard-RAxML-8.2.13/raxmlHPC-PTHREADS-AVX2 ~/.local/bin/
chmod +x ~/.local/bin/raxmlHPC-PTHREADS-AVX2
- name: Export RAxML to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which raxmlHPC-PTHREADS-AVX2
45 changes: 44 additions & 1 deletion .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,32 @@ on:
workflow_dispatch:

jobs:
call-build-muscle:
uses: ./.github/workflows/build-muscle.yml

call-build-aster:
uses: ./.github/workflows/build-aster.yml

call-build-fasttree:
uses: ./.github/workflows/build-fasttree.yml

call-build-raxml:
uses: ./.github/workflows/build-raxml.yml

call-build-iqtree:
uses: ./.github/workflows/build-iqtree.yml

test_pythons:
name: Test on different python versions
runs-on: ubuntu-latest
needs: [call-build-aster, call-build-fasttree]
needs:
[
call-build-muscle,
call-build-aster,
call-build-fasttree,
call-build-raxml,
call-build-iqtree,
]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,6 +69,12 @@ jobs:
- name: Install package
run: pip install .

- name: Cache muscle
uses: actions/cache@v3
with:
path: ~/.local/bin/muscle
key: ${{ runner.os }}-muscle

- name: Cache ASTER
uses: actions/cache@v3
with:
Expand All @@ -65,5 +87,26 @@ jobs:
path: ~/.local/bin/FastTree
key: ${{ runner.os }}-FastTree

- name: Cache RAxML
uses: actions/cache@v3
with:
path: ~/.local/bin/raxmlHPC-PTHREADS-AVX2
key: ${{ runner.os }}-RAxML

- name: Cache IQTree
uses: actions/cache@v3
with:
path: ~/.local/bin/iqtree2
key: ${{ runner.os }}-IQTree

- name: Export to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which muscle
which FastTree
which raxmlHPC-PTHREADS-AVX2
which iqtree2
which astral
- name: Test with pytest
run: pytest --runslow
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ dependencies:
- numpy>=1.26.0
- phykit>=1.12.5
- pyhmmer>=0.10.4
- python>=3.7.12
- python>=3.9
- raxml>=8.2.12
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
biopython>=1.81
clipkit>=2.1.1
importlib-metadata; python_version<"3.8"
phykit>=1.12.5
pyhmmer>=0.10.2
matplotlib>=3.5.3
numpy
numpy>=1.26.0
phykit>=1.12.5
pyhmmer>=0.10.4

0 comments on commit 184b695

Please sign in to comment.