mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Ensure test jobs find wheels correctly
This commit is contained in:
@@ -69,7 +69,7 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wheel-pynvbench-cu${{ matrix.cuda }}-py${{ matrix.python }}
|
||||
path: /home/coder/nvbench/wheel-pynvbench-cu${{ matrix.cuda }}-py${{ matrix.python }}
|
||||
path: wheelhouse
|
||||
|
||||
- name: Test wheel
|
||||
run: |
|
||||
@@ -81,12 +81,12 @@ jobs:
|
||||
fi
|
||||
|
||||
docker run --rm \
|
||||
--workdir /home/coder/nvbench \
|
||||
--mount type=bind,source=$(pwd),target=/home/coder/nvbench/ \
|
||||
--workdir /workspace \
|
||||
--mount type=bind,source=$(pwd),target=/workspace/ \
|
||||
--env py_version=${{ matrix.python }} \
|
||||
--env cuda_version=${{ matrix.cuda }} \
|
||||
rapidsai/ci-wheel:25.12-cuda${cuda_full_version}-rockylinux8-py${{ matrix.python }} \
|
||||
/home/coder/nvbench/ci/test_pynvbench.sh -py-version ${{ matrix.python }} -cuda-version ${{ matrix.cuda }}
|
||||
/workspace/ci/test_pynvbench.sh -py-version ${{ matrix.python }} -cuda-version ${{ matrix.cuda }}
|
||||
|
||||
verify-workflow:
|
||||
name: Verify all builds and tests succeeded
|
||||
|
||||
@@ -42,25 +42,21 @@ cuda_major_version=$(nvcc --version | grep release | awk '{print $6}' | tr -d ',
|
||||
# Setup Python environment
|
||||
setup_python_env "${py_version}"
|
||||
|
||||
# Fetch the pynvbench wheel from artifacts
|
||||
# Fetch the pynvbench wheel
|
||||
if [[ -n "${GITHUB_ACTIONS:-}" ]]; then
|
||||
# In GitHub Actions, download from artifacts
|
||||
wheel_name="wheel-pynvbench-cu${cuda_version}-py${py_version}"
|
||||
mkdir -p /home/coder/nvbench/wheelhouse
|
||||
|
||||
# Download artifact (assumes it's already been downloaded by the workflow)
|
||||
if [[ -d "/home/coder/nvbench/${wheel_name}" ]]; then
|
||||
cp /home/coder/nvbench/${wheel_name}/*.whl /home/coder/nvbench/wheelhouse/
|
||||
fi
|
||||
# In GitHub Actions, wheel is already downloaded to wheelhouse/ by the workflow
|
||||
WHEELHOUSE_DIR="/workspace/wheelhouse"
|
||||
else
|
||||
# For local testing, build the wheel
|
||||
"$ci_dir/build_pynvbench_wheel.sh" -py-version "${py_version}" -cuda-version "${cuda_version}"
|
||||
WHEELHOUSE_DIR="/workspace/wheelhouse"
|
||||
fi
|
||||
|
||||
# Install pynvbench
|
||||
PYNVBENCH_WHEEL_PATH="$(ls /home/coder/nvbench/wheelhouse/pynvbench-*.whl | head -1)"
|
||||
# Find and install pynvbench wheel
|
||||
PYNVBENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/pynvbench-*+cu${cuda_version}*.whl 2>/dev/null | head -1)"
|
||||
if [[ -z "$PYNVBENCH_WHEEL_PATH" ]]; then
|
||||
echo "Error: No pynvbench wheel found"
|
||||
echo "Error: No pynvbench wheel found in ${WHEELHOUSE_DIR}"
|
||||
ls -la ${WHEELHOUSE_DIR}/ || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -68,5 +64,5 @@ echo "Installing wheel: $PYNVBENCH_WHEEL_PATH"
|
||||
python -m pip install "${PYNVBENCH_WHEEL_PATH}[test]"
|
||||
|
||||
# Run tests
|
||||
cd "/home/coder/nvbench/python/test/"
|
||||
cd "/workspace/python/test/"
|
||||
python -m pytest -v test_nvbench.py
|
||||
|
||||
Reference in New Issue
Block a user