-
Notifications
You must be signed in to change notification settings - Fork 0
165 lines (141 loc) · 4.9 KB
/
build_and_test.yml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Build and test
on:
push:
branches:
- "main"
- "staging"
- "dev"
pull_request:
branches:
- "*"
env:
PROGRAM_NAME: InteinFinder
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-11
- ubuntu-20.04
ocaml-compiler:
- 4.14.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: brew install tree
if: matrix.os == 'macos-11'
- run: echo "LOCAL_PATH=$HOME/.local/bin" >> $GITHUB_ENV
- name: Setup path
run: |
mkdir -p "$LOCAL_PATH"
echo "$LOCAL_PATH" >> $GITHUB_PATH
- name: Setup just
run: |
\curl \
--proto '=https' \
--tlsv1.2 \
-sSf \
https://just.systems/install.sh \
| bash -s -- \
--to "$LOCAL_PATH" \
--tag 1.13.0
- name: Download MAFFT
run: |
\curl -L \
https://mafft.cbrc.jp/alignment/software/mafft-7.490-without-extensions-src.tgz \
| tar xz \
&& cd mafft-*/core/ && make clean && make && sudo make install
- name: Download & Install MMseqs2 (ubuntu)
run: |
\curl -L \
https://github.com/soedinglab/MMseqs2/releases/download/13-45111/mmseqs-linux-sse2.tar.gz \
| tar xz \
&& mv mmseqs/bin/mmseqs "$LOCAL_PATH"
if: matrix.os == 'ubuntu-20.04'
- name: Download & Install MMseqs2 (macOS)
run: |
\curl -L \
https://github.com/soedinglab/MMseqs2/releases/download/13-45111/mmseqs-osx-universal.tar.gz \
| tar xz \
&& mv mmseqs/bin/mmseqs "$LOCAL_PATH"
if: matrix.os == 'macos-11'
- name: Download & Install NCBI BLAST+ (ubuntu)
run: |
\curl -L \
https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.12.0/ncbi-blast-2.12.0+-x64-linux.tar.gz \
| tar xz \
&& mv ncbi-blast-2.12.0+/bin/rpsblast "${LOCAL_PATH}/rpsblast+" \
&& mv ncbi-blast-2.12.0+/bin/makeprofiledb "${LOCAL_PATH}/makeprofiledb"
if: matrix.os == 'ubuntu-20.04'
- name: Download & Install NCBI BLAST+ (macOS)
run: |
\curl -L \
https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.12.0/ncbi-blast-2.12.0+-x64-macosx.tar.gz \
| tar xz \
&& mv ncbi-blast-2.12.0+/bin/rpsblast "${LOCAL_PATH}/rpsblast+" \
&& mv ncbi-blast-2.12.0+/bin/makeprofiledb "${LOCAL_PATH}/makeprofiledb"
if: matrix.os == 'macos-11'
- name: Use OCaml ${{ matrix.ocaml-compiler }} (ubuntu)
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
cache-prefix: v1-${{ matrix.os }}
opam-pin: false
opam-depext: false
if: matrix.os == 'ubuntu-20.04'
- name: Use OCaml ${{ matrix.ocaml-compiler }} (macOS)
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: false
cache-prefix: v1-${{ matrix.os }}
opam-pin: false
opam-depext: false
if: matrix.os == 'macos-11'
- name: Install tiny_config
run: |
git clone https://github.com/mooreryan/tiny_config.git
cd tiny_config
opam install base otoml yaml
opam pin add tiny_config .
opam pin add tiny_toml .
opam install tiny_config
opam install tiny_toml
- run: opam install --locked . --deps-only --with-doc --with-test
- name: Check dev profile
run: |
opam exec -- just clean
opam exec -- just build_dev
opam exec -- just test_dev
opam exec -- just install_dev
if: matrix.ocaml-compiler == '4.14.1'
# Send the coverage.
- name: Send coverage
run: |
opam install bisect_ppx
opam exec -- just send_coverage
if: matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-20.04'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check release profile
run: |
opam exec -- just clean
opam exec -- just build_release
opam exec -- just test_release
opam exec -- just install_release
if: matrix.ocaml-compiler == '4.14.1'
- name: Upload InteinFinder artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.PROGRAM_NAME }}-${{ matrix.os }}
path: _build/install/default/bin/${{ env.PROGRAM_NAME }}
if: matrix.ocaml-compiler == '4.14.1'
- name: Upload RemoveInteins artifact
uses: actions/upload-artifact@v2
with:
name: RemoveInteins-${{ matrix.os }}
path: _build/install/default/bin/RemoveInteins
if: matrix.ocaml-compiler == '4.14.1'