-
Notifications
You must be signed in to change notification settings - Fork 48
57 lines (54 loc) · 2.11 KB
/
pr.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Setup Dev Environment
run: |
pip install virtualenv
virtualenv .venv
source .venv/bin/activate
python3 -m pip install nvidia-cuda-runtime-cu12
./run setup
- name: Check formatting
run: |
source .venv/bin/activate
python3 -m pip install nvidia-cuda-runtime-cu12
python3 -c 'import sys; print(sys.executable)'
python3 -c 'import site; print(site.getsitepackages())'
python3 -m pip freeze
export CUDA_WHL_LIB_DIR=$(python3 -c 'import nvidia.cuda_runtime; print(nvidia.cuda_runtime.__path__[0])')/lib
export LD_LIBRARY_PATH="$CUDA_WHL_LIB_DIR:$LD_LIBRARY_PATH"
python3 -c 'from holoscan.core import *'
./run check -f
- name: Run Unit tests
run: |
source .venv/bin/activate
python3 -m pip install nvidia-cuda-runtime-cu12
export CUDA_WHL_LIB_DIR=$(python3 -c 'import nvidia.cuda_runtime; print(nvidia.cuda_runtime.__path__[0])')/lib
export LD_LIBRARY_PATH="$CUDA_WHL_LIB_DIR:$LD_LIBRARY_PATH"
./run test all unit
- name: Coverage
run: |
source .venv/bin/activate
python3 -m pip install nvidia-cuda-runtime-cu12
export CUDA_WHL_LIB_DIR=$(python3 -c 'import nvidia.cuda_runtime; print(nvidia.cuda_runtime.__path__[0])')/lib
export LD_LIBRARY_PATH="$CUDA_WHL_LIB_DIR:$LD_LIBRARY_PATH"
coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false
files: ./coverage.xml