-
Notifications
You must be signed in to change notification settings - Fork 4
117 lines (114 loc) · 3.71 KB
/
Copy pathgithub_build.yml
File metadata and controls
117 lines (114 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
push:
branches:
- master
- 0.1.0
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install metaeuk
run: |
wget https://mmseqs.com/metaeuk/metaeuk-linux-avx2.tar.gz
tar -xzf metaeuk-linux-avx2.tar.gz
sudo install -m 755 metaeuk/bin/metaeuk /usr/local/bin/metaeuk
- name: Install miniprot
run: |
git clone --depth 1 https://github.com/lh3/miniprot
make -C miniprot
sudo install -m 755 miniprot/miniprot /usr/local/bin/miniprot
- name: Install augustus
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
zlib1g-dev \
libgsl-dev \
libboost-all-dev \
liblpsolve55-dev \
libmysql++-dev \
libmysqlclient-dev \
libbamtools-dev \
libhts-dev
git clone --depth 1 https://github.com/Gaius-Augustus/Augustus.git
make -C Augustus clean
make -C Augustus \
MYSQL=0 \
SQLITE=0 \
COMPGENEPRED=1
sudo make -C Augustus install
echo "$GITHUB_WORKSPACE/Augustus/scripts" >> $GITHUB_PATH
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --exclude=Augustus --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --exclude=Augustus --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
pwd
python -m pip install .
sudo apt-get update
path=$(fdog.setup -d ./ --getSourcepath); xargs -a $path/data/dependencies.txt sudo apt-get install -y -qq
echo "######### current dir #########"
pwd
ls
bash scripts/run_tests.sh
conda-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v3
with:
environment-name: fdog-env
create-args: >-
python=3.12 pip
cache-environment: true
cache-downloads: true
init-shell: bash
- name: Run tests (conda env)
shell: bash -l {0}
run: |
python -m pip install .
bash scripts/run_tests.sh
deploy:
needs: [build, conda-test]
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build distribution packages
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi }}