Skip to content

Merge pull request #152 from NLESC-JCER/issue149_docs #460

Merge pull request #152 from NLESC-JCER/issue149_docs

Merge pull request #152 from NLESC-JCER/issue149_docs #460

Workflow file for this run

name: build
on: [push]
jobs:
build:
name: build and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [3.8]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.version }}
conda-channels: anaconda
- run: conda --version
- run: which python
# - run: conda install -c conda-forge openmpi
- run: conda install mpi4py h5py pytorch torchvision cpuonly -c pytorch -c conda-forge
# - run: pip install horovod==0.27.0
- run: conda install -c conda-forge libstdcxx-ng=12
- name: Install the package
run: pip install .[test,hpc]
env:
CONDA_PREFIX: /usr/share/miniconda
- name: Test with multithreading
env:
CONDA_PREFIX: /usr/share/miniconda
run: mpirun -np 2 coverage run -m pytest tests_hvd
- name: Test with single thread
env:
CONDA_PREFIX: /usr/share/miniconda
run: coverage run -m pytest tests
- name: Combine all coverage results
run: coverage combine
- run: coverage report
- name: Coveralls Parallel
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_FLAG_NAME: python-${{ matrix.version }}
COVERALLS_PARALLEL: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true