Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for wheels in CI #354

Merged
merged 6 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed errors in CI job for wheels.
  • Loading branch information
luisenp committed Nov 7, 2022
commit 4b8e571ed2b3815edb817a4685f7e1d8c1da9991
40 changes: 37 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ update_and_install_python: &update_and_install_python
command: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3.7 python3.7-dev python3.8 python3.8-dev
sudo apt-get install -y python3.7 python3.7-dev python3.8 python3.8-dev python3.9 python3.9-dev

install_nox: &install_nox
- run:
Expand Down Expand Up @@ -86,7 +86,7 @@ setup_environment: &setup_environment
name: Setup virtualenv and tools
working_directory: ~/project
command: |
virtualenv ~/theseus_venv -p /usr/bin/python3
virtualenv ~/theseus_venv -p /usr/bin/python3.9
echo ". ~/theseus_venv/bin/activate" >> $BASH_ENV
. ~/theseus_venv/bin/activate
pip install --progress-bar off --upgrade pip
Expand Down Expand Up @@ -176,6 +176,17 @@ run_tests: &run_tests
pytest -s tests/test_theseus_layer.py
pytest -s tests -m "cudaext"

build_cuda10_wheel: &build_cuda10_wheel
- run:
name: Building wheel for CUDA 10
working_directory: /home/circleci
command: |
THESEUS_GIT_COMMIT=$(git --git-dir project/.git log --format="%H" -n 1)
THESEUS_VERSION=$(grep -Eo "[0-9].[0-9].[0-9][.0-9a-z]*" project/theseus/__init__.py)
./project/build_scripts/build_wheel.sh . ${THESEUS_GIT_COMMIT} 10.2 ${THESEUS_VERSION}
pip install $(ls */*.whl)
pip install -r project/requirements/dev.txt

build_cuda11_wheel: &build_cuda11_wheel
- run:
name: Building wheel for CUDA 11
Expand All @@ -184,6 +195,17 @@ build_cuda11_wheel: &build_cuda11_wheel
THESEUS_GIT_COMMIT=$(git --git-dir project/.git log --format="%H" -n 1)
THESEUS_VERSION=$(grep -Eo "[0-9].[0-9].[0-9][.0-9a-z]*" project/theseus/__init__.py)
./project/build_scripts/build_wheel.sh . ${THESEUS_GIT_COMMIT} 11.6 ${THESEUS_VERSION}
pip install $(ls */*.whl)
pip install -r project/requirements/dev.txt

run_tests_from_wheel: &run_tests_from_wheel
- run:
name: Installing theseus from wheel and running tests
working_directory: ~/project
command: |
mv theseus theseus_tmp
python -m pytest tests/test_theseus_layer.py
pytest -s tests -m "cudaext"


# -------------------------------------------------------------------------------------
Expand Down Expand Up @@ -268,15 +290,27 @@ jobs:
- <<: *setup_project
- <<: *run_tests

test_cuda10_wheel:
executor: gpu_cuda10
steps:
- checkout
- <<: *update_and_install_python
- <<: *install_suitesparse
- <<: *setup_cuda10_libs
- <<: *setup_environment
- <<: *build_cuda10_wheel
- <<: *run_tests_from_wheel

test_cuda11_wheel:
executor: gpu_cuda11
steps:
- checkout
- <<: *update_and_install_python
- <<: *install_suitesparse
- <<: *setup_cuda11_libs
- <<: *setup_environment
- <<: *install_torch_cuda11
- <<: *build_cuda11_wheel
- <<: *run_tests_from_wheel



Expand Down
Empty file added tests/__init__.py
Empty file.