Skip to content

Enable Cython tests for cuda.bindings #323

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

Merged
merged 11 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
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
1 change: 1 addition & 0 deletions .github/actions/fetch_ctk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,6 @@ runs:
run: |
CUDA_PATH=$(realpath "./cuda_toolkit")
echo "CUDA_PATH=${CUDA_PATH}" >> $GITHUB_ENV
echo "CUDA_HOME=${CUDA_PATH}" >> $GITHUB_ENV
echo "${CUDA_PATH}/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:${CUDA_PATH}/lib" >> $GITHUB_ENV
19 changes: 17 additions & 2 deletions .github/workflows/gh-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
env:
# we use self-hosted runners on which setup-python behaves weirdly...
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"
Copy link
Member Author


- name: Set up mini CTK
uses: ./.github/actions/fetch_ctk
Expand All @@ -280,6 +283,13 @@ jobs:
host-platform: ${{ matrix.host-platform }}
cuda-version: ${{ matrix.cuda-version }}

- name: Install dependencies
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I don't want to install any build tools in the test pipeline, but it seems to be the easiest path...

if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
shell: bash --noprofile --norc -xeuo pipefail {0}
run: |
# cython tests require gcc
apt install -y build-essential

- name: Run cuda.bindings tests
if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
shell: bash --noprofile --norc -xeuo pipefail {0}
Expand All @@ -293,8 +303,13 @@ jobs:
pushd ./cuda_bindings
pip install -r requirements.txt
pytest -rxXs tests/
# TODO: enable cython tests
#pytest tests/cython
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
bash tests/cython/build_tests.sh
elif [[ "${{ matrix.host-platform }}" == win* ]]; then
# TODO: enable this once win-64 runners are up
exit 1
fi
pytest -rxXs tests/cython
popd

- name: Run cuda.core tests
Expand Down
Loading