-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a Github actions that builds and runs larch tests. - Added a `CMAKE_NUM_THREADS` argument for protobuf.cmake
- Loading branch information
1 parent
a2f3486
commit 7335c97
Showing
3 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters