Skip to content

Build larch on linux and run tests #2

Build larch on linux and run tests

Build larch on linux and run tests #2

Workflow file for this run

name: Build and run tests
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Prepare build environment
run: |
sudo apt-get update
sudo apt-get install build-essential cmake zlib1g-dev python3-pip python3-pytest
- name: Install conda
run: |
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda
~/miniconda/bin/conda update -n base -c defaults conda
- name: Create conda env
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda env create -f environment.yml
- name: Build (cmake step)
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda activate larch-dev
mkdir build
cd build
export CMAKE_NUM_THREADS="8"
cmake -DCMAKE_BUILD_TYPE=Debug ..
- name: Build (make step)
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda activate larch-dev
cd build
make -j20
ln -s ../data
- name: Run tests
run: |
source ~/miniconda/etc/profile.d/conda.sh
conda activate larch-dev
cd build
./larch-test -tag slow