Skip to content

Remove torch defaults #211

Remove torch defaults

Remove torch defaults #211

Workflow file for this run

name: tests
on: [pull_request]
jobs:
clang-format:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'include'
- 'tests'
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.10.1
with:
clang-format-version: '14'
check-path: ${{ matrix.path }}
copyright:
name: Copyright check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check to see if source files have the correct copyright header
run: python scripts/check_copyright.py
build-test-linux:
needs: clang-format
runs-on: ubuntu-latest
strategy:
matrix:
btype: [Release, Debug]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- run: cmake -DCMAKE_PREFIX_PATH="`pip show torch | grep -oP '(?<=Location:\ ).*'`/torch/share/cmake" -DCMAKE_BUILD_TYPE=${{ matrix.btype }} .
- run: make -j 2
- run: make test
coverage:
name: Code coverage check
needs: build-test-linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: sudo apt install lcov
- run: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- run: cmake -DCMAKE_PREFIX_PATH="`pip show torch | grep -oP '(?<=Location:\ ).*'`/torch/share/cmake" -DCMAKE_BUILD_TYPE=Coverage .
- run: make -j 2
- run: ./scripts/coverage.sh
- uses: romeovs/lcov-reporter-action@v0.2.16
with:
lcov-file: ./coverage/coverage.info
github-token: ${{ secrets.PR_ACTION }}