-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.54 KB
/
ci_test_gpu.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
name: CI Test GPU
on:
push:
branches: [ main, ]
pull_request:
branches: [ '*', ]
workflow_dispatch:
jobs:
CI-Test-GPU:
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10.13
uses: actions/setup-python@v4
with:
python-version: '3.10.13'
- name: Checkout this Repo
uses: actions/checkout@v4
- name: Make CUDA discoverable
run: |
export CPATH="/usr/include/python3.10:${CPATH}"
export CPATH="/home/docker/actions-runner/_work/_tool/Python/3.10.13/x64:${CPATH}"
export PATH="/usr/local/cuda-12.2/bin:${PATH}"
export LD_LIBRARY_PATH="/usr/local/cuda-12.2/lib64:${LD_LIBRARY_PATH}"
echo "$PATH" && echo "$LD_LIBRARY_PATH" && nvcc --version && nvidia-smi
ls /usr/include/python3.10
ls /home/docker/actions-runner/_work/_tool/Python/3.10.13/x64
- name: Install dependencies
run: |
pip install .[tests]
- name: Test with pytest
run: |
pytest |& tee coverage.txt
PYTEST_EXIT_CODE=${PIPESTATUS[0]}
if [ "$PYTEST_EXIT_CODE" -ne 0 ]; then
echo "pytest failed with exit code $PYTEST_EXIT_CODE"
exit 1
else
echo "pytest passed with exit code 0"
fi
- name: Run update-badges script
run: |
python update-badges.py
- name: Update badges and commit README.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: README.md
commit_message: "Automatic badge update"