Skip to content

Merge pull request #1 from guanshaoheng/master #15

Merge pull request #1 from guanshaoheng/master

Merge pull request #1 from guanshaoheng/master #15

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: setup_conda
run: |
if [ `uname` == Darwin ]; then
export conda_url=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
export conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
wget $conda_url -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
source "$HOME/miniconda/etc/profile.d/conda.sh"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda install -c conda-forge mamba
if [ `uname` == Darwin ]; then
export toolchain=clangxx_osx-64
else
export toolchain=gxx_linux-64
fi
mamba create -q -n test-environment -c conda-forge -c bioconda -y meson clang $toolchain
- name: setup_meson
run: |
source "$HOME/miniconda/etc/profile.d/conda.sh"
hash -r
conda activate test-environment
if [ `uname` == Darwin ]; then
meson setup --buildtype=release --unity on builddir
else
env CC=clang CXX=clang++ meson setup --buildtype=release --unity on builddir
fi
- name: meson_compile
run: |
source "$HOME/miniconda/etc/profile.d/conda.sh"
hash -r
conda activate test-environment
cd builddir
meson compile
- name: meson_test
run: |
source "$HOME/miniconda/etc/profile.d/conda.sh"
hash -r
conda activate test-environment
cd builddir
meson test