-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from raimis/ci
CI for NNPOps
- Loading branch information
Showing
6 changed files
with
86 additions
and
5 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,68 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- cuda: 10.2.89 | ||
gcc: 8.5.0 | ||
nvcc: 10.2 | ||
python: 3.8 | ||
pytorch: 1.7.1 | ||
- cuda: 11.2.2 | ||
gcc: 10.3.0 | ||
nvcc: 11.2 | ||
python: 3.9 | ||
pytorch: 1.8.0 # Cannot test with PyTorch 1.9, because of https://github.com/aiqm/torchani/issues/598 | ||
|
||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install CUDA Toolkit | ||
uses: Jimver/[email protected] | ||
with: | ||
cuda: ${{ matrix.cuda }} | ||
|
||
- name: Install Miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: "" | ||
auto-activate-base: true | ||
miniforge-variant: Miniforge3 | ||
|
||
- name: Install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
sed -i -e "/cudatoolkit/c\ - cudatoolkit ${{ matrix.cuda }}" \ | ||
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \ | ||
-e "/nvcc_linux-64/c\ - nvcc_linux-64 ${{ matrix.nvcc }}" \ | ||
-e "/python/c\ - python ${{ matrix.python }}" \ | ||
-e "/pytorch-gpu/c\ - pytorch-gpu ${{ matrix.pytorch }}" \ | ||
environment.yml | ||
conda env create -n nnpops -f environment.yml | ||
- name: Configure, compile, and install | ||
shell: bash -l {0} | ||
run: | | ||
conda activate nnpops | ||
mkdir build && cd build | ||
cmake .. \ | ||
-DTorch_DIR=$CONDA_PREFIX/lib/python${{ matrix.python }}/site-packages/torch/share/cmake/Torch \ | ||
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX | ||
make install | ||
- name: Test | ||
shell: bash -l {0} | ||
run: | | ||
conda activate nnpops | ||
cd build | ||
ctest --verbose --exclude-regex TestCuda |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ $ make install | |
|
||
- Run the tests | ||
```bash | ||
$ ctest | ||
$ ctest --verbose | ||
``` | ||
|
||
## Usage | ||
|
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
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