diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..934ec6a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,34 @@ +version: 2.1 +orbs: + python: circleci/python@2 +jobs: + build-package: + machine: + image: linux-cuda-12:default + resource_class: gpu.nvidia.small + steps: + - checkout + - python/install-packages: + pip-dependency-file: requirements.txt + pkg-manager: pip + args: pytest + pypi-cache: false + - run: + name: Create the ~/artifacts directory if it doesn't exist + command: mkdir -p ~/artifacts + - python/dist + - store_artifacts: + path: dist + destination: ~/artifacts + - run: + name: Copy .so file for testing + command: find build/ -name "_C*.so" -exec cp {} ./torchlpc/ \; + - run: + name: Run tests + command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') + - store_test_results: + path: junit.xml +workflows: + build-and-test: + jobs: + - build-package diff --git a/cpuonly-torch.txt b/cpuonly-torch.txt new file mode 100644 index 0000000..0eadf74 --- /dev/null +++ b/cpuonly-torch.txt @@ -0,0 +1,2 @@ +-i https://download.pytorch.org/whl/cpu +torch \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..ba21544 --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,2 @@ +numpy<2.0 +numba