@@ -98,51 +98,66 @@ jobs:
9898 host-platform : ${{ env.HOST_PLATFORM }}
9999 cuda-version : ${{ env.CUDA_VER }}
100100
101+ - name : Create venv
102+ run : |
103+ python -m venv .venv
104+
101105 - name : Build cuda-pathfinder
102106 run : |
103- pip install -v ./cuda_pathfinder
107+ .venv/bin/ pip install -v ./cuda_pathfinder
104108
105109 - name : Build cuda-python-test-helpers
106110 run : |
107- pip install -v ./cuda_python_test_helpers
111+ .venv/bin/ pip install -v ./cuda_python_test_helpers
108112
109113 - name : Build cuda-bindings
110114 run : |
111115 cd cuda_bindings
112- pip install -v . --group test
116+ .venv/bin/ pip install -v . --group test
113117
114118 - name : Build cuda-core
115119 run : |
116120 cd cuda_core
117- pip install -v . --group test
121+ ./venv/bin/ pip install -v . --group test
118122
119123 - name : Install coverage tools
120124 run : |
121- pip install coverage pytest-cov
125+ .venv/bin/ pip install coverage pytest-cov
122126
123127 - name : Set cuda package install root
124128 run : |
125129 echo "CUDA_PYTHON_ROOT=$(python -c 'import cuda; print(cuda.__path__[0])')" >> $GITHUB_ENV
130+ echo "REPO_ROOT=$(pwd)" >> $GITHUB_ENV
126131
127132 - name : Run cuda.pathfinder tests
128133 run : |
129- pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_pathfinder/tests
134+ cd $CUDA_PYTHON_ROOT/..
135+ $REPO_ROOT/.venv/bin/pytest -v --cov=./cuda --cov-append --cov-config=$REPO_ROOT/.coveragerc $REPO_ROOT/cuda_pathfinder/tests
130136
131137 - name : Run cuda.bindings tests
132138 run : |
133- pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_bindings/tests
139+ cd $CUDA_PYTHON_ROOT/..
140+ $REPO_ROOT/.venv/bin/pytest -v --cov=./cuda --cov-append --cov-config=$REPO_ROOT/.coveragerc $REPO_ROOT/cuda_bindings/tests
134141
135142 - name : Run cuda.core tests
136143 run : |
137- pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_core/tests
144+ cd $CUDA_PYTHON_ROOT/..
145+ $REPO_ROOT/.venv/bin/pytest -v --cov=./cuda --cov-append --cov-config=$REPO_ROOT/.coveragerc $REPO_ROOT/cuda_core/tests
138146
139147 - name : Generate coverage report
140148 run : |
141- coverage html
142- coverage xml -o htmlcov/coverage.xml
143- mkdir docs
144- mv htmlcov docs/coverage
145- tree docs
149+ cd $CUDA_PYTHON_ROOT/..
150+ coverage html --rcfile=$REPO_ROOT/.coveragerc
151+ coverage xml --rcfile=$REPO_ROOT/.coveragerc -o htmlcov/coverage.xml
152+ mkdir $REPO_ROOT/docs
153+ mv htmlcov $REPO_ROOT/docs/coverage
154+ tree $REPO_ROOT/docs
155+
156+ - name : Archive code coverage results
157+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
158+ with :
159+ name : coverage
160+ path : docs/coverage/
146161
147162 - name : Deploy to gh-pages
148163 uses : JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # v4.7.4
0 commit comments