-
Notifications
You must be signed in to change notification settings - Fork 130
73 lines (65 loc) · 2.14 KB
/
gpu-ci.yml
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
name: GPU Tests
on:
push:
branches: [ main, ci-fix ]
pull_request:
branches: [ main, ci-fix ]
merge_group:
branches: [ main, ci-fix ]
env:
CUDACXX: /usr/local/cuda/bin/nvcc
MKLROOT: /opt/intel/oneapi/mkl/latest/
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
test-gpu:
if: "!contains(github.event.pull_request.labels.*.name, 'no-ci')"
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: |
rm -f ~/.dace.conf
rm -rf .dacecache tests/.dacecache
python -m venv ~/.venv # create venv so we can use pip
source ~/.venv/bin/activate # activate venv
python -m pip install --upgrade pip
pip install flake8 pytest-xdist coverage
pip install mpi4py
pip install cupy
pip uninstall -y dace
pip install -e ".[testing]"
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
- name: Test dependencies
run: |
source ~/.venv/bin/activate # activate venv
nvidia-smi
- name: Run pytest GPU
run: |
source ~/.venv/bin/activate # activate venv
export DACE_cache=single
export PATH=$PATH:/usr/local/cuda/bin # some test is calling cuobjdump, so it needs to be in path
echo "CUDACXX: $CUDACXX"
pytest --cov-report=xml --cov=dace --tb=short -m "gpu"
- name: Run extra GPU tests
run: |
source ~/.venv/bin/activate # activate venv
export NOSTATUSBAR=1
export DACE_cache=single
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
./tests/cuda_test.sh
- name: Report overall coverage
run: |
source ~/.venv/bin/activate # activate venv
export COVERAGE_RCFILE=`pwd`/.coveragerc
coverage combine . */; coverage report; coverage xml
reachable=0
ping -W 2 -c 1 codecov.io || reachable=$?
if [ $reachable -eq 0 ]; then
./codecov
else
echo "Codecov.io is unreachable"
fi