Skip to content

Commit f88651a

Browse files
committed
CI: Add cupy gpu tests
1 parent 3acc042 commit f88651a

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/gpu_tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: GPU jobs
2+
3+
on: [ push, pull_request ]
4+
5+
permissions:
6+
contents: read # to fetch code (actions/checkout)
7+
8+
env:
9+
CCACHE_DIR: "${{ github.workspace }}/.ccache"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
get_commit_message:
17+
name: Get commit message
18+
uses: ./.github/workflows/commit_message.yml
19+
20+
cupy_tests:
21+
name: CuPy GPU
22+
needs: get_commit_message
23+
if: >
24+
needs.get_commit_message.outputs.message == 1
25+
&& (github.repository == 'scipy/xsf' || github.repository == '')
26+
runs-on: ghcr.io/cirruslabs/ubuntu-runner-amd64-gpu:22.04
27+
steps:
28+
- name: Checkout xsf repo
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
with:
31+
submodules: recursive
32+
33+
- name: Setup compiler cache
34+
uses: cirruslabs/cache@v4 #caa3ad0624c6c2acd8ba50ad452d1f44bba078bb # v4
35+
with:
36+
path: ${{ env.CCACHE_DIR }}
37+
# Make primary key unique by using `run_id`, this ensures the cache
38+
# is always saved at the end.
39+
key: ${{ runner.os }}-gpu-ccache-${{ github.run_id }}
40+
restore-keys: |
41+
${{ runner.os }}-gpu-ccache
42+
43+
- name: run nvidia-smi
44+
run: nvidia-smi
45+
46+
- name: run nvidia-smi --query
47+
run: nvidia-smi --query
48+
49+
- uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
50+
with:
51+
pixi-version: v0.39.2
52+
manifest-path: pixi.toml
53+
cache: false
54+
55+
- name: Run CuPy tests
56+
run: pixi run test-cupy

0 commit comments

Comments
 (0)