-
Notifications
You must be signed in to change notification settings - Fork 153
117 lines (98 loc) · 3.66 KB
/
Copy pathcheck_cli.yml
File metadata and controls
117 lines (98 loc) · 3.66 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Check CLI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main, holoscan-sdk-lws2]
permissions:
contents: read
env:
HOLOSCAN_CLI_INSTALL_ARGS: "--pre --extra-index-url https://pypi.nvidia.com holoscan-cli>4.2.0"
jobs:
check-cli-py:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout Repository
uses: actions/checkout@v4
# HoloHub-owned check dependencies live in
# utilities/requirements.check-cli.txt; holoscan-cli itself is resolved
# from NVIDIA PyPI.
- name: Install holoscan-cli
run: |
python -m pip install --upgrade pip
python -m pip install \
${HOLOSCAN_CLI_INSTALL_ARGS} \
-r utilities/requirements.check-cli.txt
# Verify the wrapper + holoscan-cli contract on HoloHub's project tree.
- name: Run wrapper consolidation test
run: python -m pytest -v --noconftest utilities/cli/tests/test_holoscan_cli_consolidation.py
check-cli-ctest:
runs-on: ubuntu-22.04
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install CMake
run: |
sudo apt-get update
sudo apt-get install -y cmake
# ctest invokes `python -m pytest` on the smoke tests; keep the
# HoloHub-owned test and template dependencies in one requirements file.
- name: Install holoscan-cli
run: |
python -m pip install --upgrade pip
python -m pip install \
${HOLOSCAN_CLI_INSTALL_ARGS} \
-r utilities/requirements.check-cli.txt
- name: Configure CMake with testing enabled
run: |
cmake -B build -DBUILD_TESTING=ON -DBUILD_HOLOHUB_TESTING=ON .
- name: Run CMake tests
run: |
cd build
ctest --verbose
# Exercise the same smoke test against a *source checkout*
# of holoscan-cli (https://github.com/nvidia-holoscan/holoscan-cli) rather
# than the NVIDIA PyPI wheel. This catches breakage when an in-flight
# holoscan-cli change lands ahead of a new release candidate.
check-cli-source:
runs-on: ubuntu-22.04
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Checkout HoloHub
uses: actions/checkout@v4
# Full history so poetry-dynamic-versioning can derive a version from
# git tags when building the source checkout.
- name: Checkout holoscan-cli source
uses: actions/checkout@v4
with:
repository: nvidia-holoscan/holoscan-cli
path: holoscan-cli-src
fetch-depth: 0
- name: Install holoscan-cli from source
run: |
python -m pip install --upgrade pip
python -m pip install \
-r utilities/requirements.check-cli.txt \
./holoscan-cli-src
# ``HOLOSCAN_CLI_SOURCE`` mirrors the developer workflow documented in
# the ``holohub`` wrapper: PYTHONPATH gets ``<source>/src`` prepended so
# the *checkout* is imported, not the installed copy.
- name: Run wrapper consolidation test against source checkout
env:
HOLOSCAN_CLI_SOURCE: ${{ github.workspace }}/holoscan-cli-src
run: python -m pytest -v --noconftest utilities/cli/tests/test_holoscan_cli_consolidation.py