Skip to content

Use CalVer

Use CalVer #45

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'