Add rsync dependency #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: "CI: Coverage" | |
| on: | |
| # TODO: Remove this -- this just makes it possible to test during review | |
| push: | |
| branches: | |
| - "main" | |
| - "pull-request/[0-9]+" | |
| # TODO | |
| schedule: | |
| - cron: '0 0 * * *' # This runs the workflow every day at 12:00 AM UTC | |
| workflow_dispatch: {} | |
| workflow_call: {} | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -xeuo pipefail {0} | |
| env: | |
| PY_VER: "3.14" | |
| CUDA_VER: "13.1.0" | |
| LOCAL_CTK: "1" | |
| GPU: "a100" | |
| DRIVER: "latest" | |
| ARCH: "x86_64" | |
| HOST_PLATFORM: "linux-64" | |
| jobs: | |
| coverage: | |
| name: Coverage | |
| runs-on: "linux-amd64-gpu-a100-latest-1" | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| # Our self-hosted runners require a container | |
| # TODO: use a different (nvidia?) container | |
| container: | |
| options: -u root --security-opt seccomp=unconfined --shm-size 16g | |
| image: ubuntu:22.04 | |
| env: | |
| NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | |
| steps: | |
| - name: Ensure GPU is working | |
| run: nvidia-smi | |
| # We have to install git before checking out the repo, | |
| # so we can't use the install_unix_deps action for that. | |
| - name: Install git | |
| run: | | |
| apt-get update | |
| apt-get install -y git | |
| - name: Checkout ${{ github.event.repository.name }} | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install dependencies | |
| uses: ./.github/actions/install_unix_deps | |
| continue-on-error: false | |
| with: | |
| # for artifact fetching, graphics libs | |
| dependencies: "rsync libsqlite3-0 g++ jq wget libgl1 libegl1" | |
| dependent_exes: "rsync libsqlite3-0 g++ jq wget libgl1 libegl1" | |
| - name: Setup proxy cache | |
| uses: nv-gha-runners/setup-proxy-cache@main | |
| continue-on-error: true | |
| - name: Set environment variables | |
| env: | |
| BUILD_CUDA_VER: ${{ env.CUDA_VER }} | |
| CUDA_VER: ${{ env.CUDA_VER }} | |
| HOST_PLATFORM: ${{ env.HOST_PLATFORM }} | |
| LOCAL_CTK: ${{ env.LOCAL_CTK }} | |
| PY_VER: ${{ env.PY_VER }} | |
| SHA: ${{ github.sha }} | |
| run: | | |
| ./ci/tools/env-vars test | |
| echo "CUDA_PYTHON_COVERAGE=1" >> $GITHUB_ENV | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ env.PY_VER }} | |
| env: | |
| # we use self-hosted runners on which setup-python behaves weirdly... | |
| AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache" | |
| - name: Set up mini CTK | |
| if: ${{ env.LOCAL_CTK == '1' }} | |
| uses: ./.github/actions/fetch_ctk | |
| continue-on-error: false | |
| with: | |
| host-platform: ${{ env.HOST_PLATFORM }} | |
| cuda-version: ${{ env.CUDA_VER }} | |
| - name: Build cuda-pathfinder | |
| run: | | |
| pip install -v ./cuda_pathfinder | |
| - name: Build cuda-python-test-helpers | |
| run: | | |
| pip install -v ./cuda_python_test_helpers | |
| - name: Build cuda-bindings | |
| run: | | |
| cd cuda_bindings | |
| pip install -v . --group test | |
| - name: Build cuda-core | |
| run: | | |
| cd cuda_core | |
| pip install -v . --group test | |
| - name: Install coverage tools | |
| run: | | |
| pip install coverage pytest-cov | |
| - name: Set cuda package install root | |
| run: | | |
| echo "CUDA_PYTHON_ROOT=$(python -c 'import cuda; print(cuda.__path__[0])')" >> $GITHUB_ENV | |
| - name: Run cuda.pathfinder tests | |
| run: | | |
| pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_pathfinder/tests | |
| - name: Run cuda.bindings tests | |
| run: | | |
| pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_bindings/tests | |
| - name: Run cuda.core tests | |
| run: | | |
| pytest -v --cov=$CUDA_PYTHON_ROOT --cov-append --cov-config=.coveragerc cuda_core/tests | |
| - name: Generate coverage report | |
| run: | | |
| coverage html | |
| coverage xml -o htmlcov/coverage.xml | |
| - name: Deploy to gh-pages | |
| uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # v4.7.4 | |
| with: | |
| git-config-name: cuda-python-bot | |
| git-config-email: cuda-python-bot@users.noreply.github.com | |
| folder: htmlcov/ | |
| target-folder: docs/coverage/ | |
| commit-message: "Deploy coverage: ${{ env.COMMIT_HASH }}" | |
| clean: false |