From 3bfafa7a900d5f91112597a4a575a5801b5bb36a Mon Sep 17 00:00:00 2001 From: YCY Date: Sun, 4 May 2025 20:03:11 +0100 Subject: [PATCH 1/7] CircleCI Commit --- .circleci/config.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4935de4 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,54 @@ +# This config was automatically generated from your source code +# Stacks detected: cicd:github-actions:.github/workflows,deps:python:.,file:setup.py:. +version: 2.1 +orbs: + python: circleci/python@2 +jobs: + test-python: + # Install dependencies and run tests + docker: + - image: cimg/python:3.8-node + steps: + - checkout + - python/install-packages: + pkg-manager: pip-dist + - run: + name: Run tests + command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') + - store_test_results: + path: junit.xml + build-package: + # build python package + docker: + - image: cimg/python:3.8-node + steps: + - checkout + - run: + name: Create the ~/artifacts directory if it doesn't exist + command: mkdir -p ~/artifacts + - python/dist + - store_artifacts: + path: dist + destination: ~/artifacts + deploy: + # This is an example deploy job, not actually used by the workflow + docker: + - image: cimg/base:stable + steps: + # Replace this with steps to deploy to users + - run: + name: deploy + command: '#e.g. ./deploy.sh' + - run: + name: found github actions config + command: ':' +workflows: + build-and-test: + jobs: + - test-python + - build-package: + requires: + - test-python + # - deploy: + # requires: + # - build-package From 89b04334c99557a355b7613e659121e66d7eb3d6 Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Sun, 4 May 2025 20:14:11 +0100 Subject: [PATCH 2/7] update ci config --- .circleci/config.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4935de4..cf2a734 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,11 +7,11 @@ jobs: test-python: # Install dependencies and run tests docker: - - image: cimg/python:3.8-node + - image: cimg/python:3.9-node steps: - checkout - python/install-packages: - pkg-manager: pip-dist + pkg-manager: pip - run: name: Run tests command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') @@ -20,7 +20,7 @@ jobs: build-package: # build python package docker: - - image: cimg/python:3.8-node + - image: cimg/python:3.9-node steps: - checkout - run: @@ -30,18 +30,6 @@ jobs: - store_artifacts: path: dist destination: ~/artifacts - deploy: - # This is an example deploy job, not actually used by the workflow - docker: - - image: cimg/base:stable - steps: - # Replace this with steps to deploy to users - - run: - name: deploy - command: '#e.g. ./deploy.sh' - - run: - name: found github actions config - command: ':' workflows: build-and-test: jobs: @@ -49,6 +37,3 @@ workflows: - build-package: requires: - test-python - # - deploy: - # requires: - # - build-package From 850b2d700898a452120122aa0042469316b651f3 Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Sun, 4 May 2025 20:37:53 +0100 Subject: [PATCH 3/7] test ci config --- .circleci/config.yml | 2 ++ cpuonly-torch.txt | 2 ++ dev-requirements.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 cpuonly-torch.txt create mode 100644 dev-requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index cf2a734..9d7dcb3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,9 @@ jobs: steps: - checkout - python/install-packages: + pip-dependency-file: dev-requirements.txt pkg-manager: pip + args: -r cpuonly-torch.txt pytest - run: name: Run tests command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') 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 From 84120b400fc272db5d89227d58e0d6fe710f7bd7 Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Sun, 4 May 2025 20:39:27 +0100 Subject: [PATCH 4/7] try swapping order --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d7dcb3..323a638 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - python/install-packages: pip-dependency-file: dev-requirements.txt pkg-manager: pip - args: -r cpuonly-torch.txt pytest + args: pytest -r cpuonly-torch.txt - run: name: Run tests command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') From 6e006bc2d467f85b12ec08d9f4565c1967258a7b Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Sun, 4 May 2025 20:41:50 +0100 Subject: [PATCH 5/7] update config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 323a638..a36b068 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - python/install-packages: pip-dependency-file: dev-requirements.txt pkg-manager: pip - args: pytest -r cpuonly-torch.txt + args: torch pytest - run: name: Run tests command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') From f421289bc57a16e522b19315f39df992737d31a2 Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Sun, 4 May 2025 21:04:24 +0100 Subject: [PATCH 6/7] update config, try gpu machine --- .circleci/config.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a36b068..04ebd2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,27 +4,18 @@ version: 2.1 orbs: python: circleci/python@2 jobs: - test-python: + build-package: # Install dependencies and run tests - docker: - - image: cimg/python:3.9-node + machine: + image: linux-cuda-12:default + resource_class: gpu.nvidia.small steps: - checkout - python/install-packages: - pip-dependency-file: dev-requirements.txt + pip-dependency-file: requirements.txt pkg-manager: pip - args: torch pytest - - run: - name: Run tests - command: pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') - - store_test_results: - path: junit.xml - build-package: - # build python package - docker: - - image: cimg/python:3.9-node - steps: - - checkout + args: pytest + pypi-cache: false - run: name: Create the ~/artifacts directory if it doesn't exist command: mkdir -p ~/artifacts @@ -32,10 +23,16 @@ jobs: - 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: - - test-python - build-package: - requires: - - test-python From 51a32dd8e0f36f5fe7ada91a83cac88094353049 Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Sun, 4 May 2025 20:06:28 +0000 Subject: [PATCH 7/7] CircleCI Commit --- .circleci/config.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04ebd2a..934ec6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,8 @@ -# This config was automatically generated from your source code -# Stacks detected: cicd:github-actions:.github/workflows,deps:python:.,file:setup.py:. version: 2.1 orbs: python: circleci/python@2 jobs: build-package: - # Install dependencies and run tests machine: image: linux-cuda-12:default resource_class: gpu.nvidia.small @@ -31,8 +28,7 @@ jobs: 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: + - build-package