File: gpu_test.yml

package info (click to toggle)
zarr 3.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,068 kB
  • sloc: python: 31,589; makefile: 10
file content (74 lines) | stat: -rw-r--r-- 2,449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: GPU Test

on:
  push:
    branches: [ main, 3.1.x ]
  pull_request:
    branches: [ main, 3.1.x ]
  workflow_dispatch:

env:
  LD_LIBRARY_PATH: /usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }}

    runs-on: gpu-runner
    strategy:
      matrix:
        python-version: ['3.11']
        numpy-version: ['2.2']
        dependency-set: ["minimal"]

    steps:
    - uses: actions/checkout@v5
      with:
        fetch-depth: 0  # grab all branches and tags
    # - name: cuda-toolkit
    #   uses: Jimver/cuda-toolkit@v0.2.16
    #   id: cuda-toolkit
    #   with:
    #     cuda: '12.4.1'
    - name: Set up CUDA
      run: |
        wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
        sudo dpkg -i cuda-keyring_1.1-1_all.deb
        sudo apt-get update
        sudo apt-get -y install cuda-toolkit-12-6
        echo "/usr/local/cuda/bin" >> $GITHUB_PATH
    - name: GPU check
      run: |
        nvidia-smi
        echo $PATH
        echo $LD_LIBRARY_PATH
        nvcc -V
    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: ${{ matrix.python-version }}
        cache: 'pip'
    - name: Install Hatch and CuPy
      run: |
        python -m pip install --upgrade pip
        pip install hatch
    - name: Set Up Hatch Env
      run: |
        hatch env create gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
        hatch env run -e gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
    - name: Run Tests
      run: |
        hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage-gpu

    - name: Upload coverage
      uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3  # v5.3.1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        verbose: true # optional (default = false)