-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (45 loc) · 1.43 KB
/
build-larch.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
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