Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a968734
Adding CI
nv-apoddubny May 13, 2025
eb53fe3
Running CI steps in docker containers
nv-apoddubny May 13, 2025
f8b5bfe
Updating infra setup
nv-apoddubny May 13, 2025
2ad5e73
Updating github workflow
nv-apoddubny May 13, 2025
e42abc9
Updating github workflow structure
nv-apoddubny May 13, 2025
6ecd029
Fixing github workflow structure
nv-apoddubny May 13, 2025
abae2f2
Updating github workflow structure
nv-apoddubny May 13, 2025
1984984
Removed lint verification as not approved action
nv-apoddubny May 13, 2025
ce8986a
Fixing github workflow structure
nv-apoddubny May 13, 2025
107349d
Fixing github workflow structure
nv-apoddubny May 13, 2025
2a95b36
Fixing github workflow pre-commit checks
nv-apoddubny May 13, 2025
89a9031
Making CI infra more reliable
nv-apoddubny May 14, 2025
6131c38
Making CI infra more reliable
nv-apoddubny May 14, 2025
063b9f6
Making CI infra more reliable
nv-apoddubny May 14, 2025
4ef42e7
Docker fixes
nv-apoddubny May 14, 2025
a54c686
Added package check stage
nv-apoddubny May 14, 2025
f8a31f8
Fixing pre-check stage
nv-apoddubny May 14, 2025
0b81c55
Fixing pre-check stage
nv-apoddubny May 14, 2025
2cfacc2
Debugging pre-check stage
nv-apoddubny May 14, 2025
dea5f24
Debugging pre-check stage
nv-apoddubny May 14, 2025
700b5d5
debugging git failure
nv-apoddubny May 19, 2025
ba8b9d3
debugging git failure
nv-apoddubny May 19, 2025
f4ec0ce
debugging git failure
nv-apoddubny May 19, 2025
55300d9
debugging git failure
nv-apoddubny May 19, 2025
fb71799
debugging git failure
nv-apoddubny May 19, 2025
28850e1
debugging git failure
nv-apoddubny May 19, 2025
7cc2f3e
debugging git failure
nv-apoddubny May 19, 2025
af187d4
debugging git failure
nv-apoddubny May 19, 2025
0578546
Addressing pre-che issues
nv-apoddubny May 19, 2025
e582a16
Addressing pre-che issues
nv-apoddubny May 19, 2025
9751749
Addressing pre-che issues
nv-apoddubny May 19, 2025
eb7d7f3
Addressing pre-che issues
nv-apoddubny May 19, 2025
350551c
Addressing pre-che issues
nv-apoddubny May 19, 2025
e246194
Addressing pre-che issues
nv-apoddubny May 19, 2025
e57c8ad
Addressing pre-che issues
nv-apoddubny May 19, 2025
117418b
Addressing pre-che issues
nv-apoddubny May 19, 2025
a787b6b
Fixing e2e stage
nv-apoddubny May 20, 2025
3108f7b
Fixing e2e stage
nv-apoddubny May 20, 2025
997f8af
Fixing e2e stage
nv-apoddubny May 20, 2025
6d4aeec
Fixing e2e stage
nv-apoddubny May 20, 2025
d325b45
Fixing e2e stage
nv-apoddubny May 20, 2025
60f8a58
Fixing e2e stage
nv-apoddubny May 20, 2025
afebeaf
Fixing e2e stage
nv-apoddubny May 20, 2025
dfbe941
Fixing e2e stage
nv-apoddubny May 20, 2025
28e940a
Fixing e2e stage
nv-apoddubny May 20, 2025
7fca9c2
Fixing e2e stage
nv-apoddubny May 20, 2025
a3cd0d9
Fixing e2e stage
nv-apoddubny May 20, 2025
db39a63
Fixing e2e stage
nv-apoddubny May 20, 2025
189e8cc
Fixing e2e stage
nv-apoddubny May 20, 2025
1080e7b
Fixing e2e stage
nv-apoddubny May 20, 2025
39ffab1
Fixing e2e stage
nv-apoddubny May 20, 2025
8226d1e
Fixing e2e stage
nv-apoddubny May 22, 2025
df37604
Fixing e2e stage
nv-apoddubny May 22, 2025
cf697a7
Fixing e2e stage
nv-apoddubny May 22, 2025
c90dc89
Fixing e2e stage
nv-apoddubny May 22, 2025
f8f5fa0
Fixing e2e stage
nv-apoddubny May 22, 2025
b9183a1
Fixing e2e stage
nv-apoddubny May 22, 2025
1741084
Fixing e2e stage
nv-apoddubny May 22, 2025
60581e0
Fixing e2e stage
nv-apoddubny May 22, 2025
c8a5f82
Fixing e2e stage
nv-apoddubny May 22, 2025
9a7e7e2
Fixing e2e stage
nv-apoddubny May 22, 2025
8a113d1
Fixing e2e stage
nv-apoddubny May 22, 2025
3b76e72
Fixing docker stage
nv-apoddubny May 22, 2025
572cf80
Fixing docker stage
nv-apoddubny May 22, 2025
52c3ea6
Fixing docker stage
nv-apoddubny May 22, 2025
47b3f84
Fixing docker stage
nv-apoddubny May 22, 2025
1f5d935
Fixing docker stage
nv-apoddubny May 22, 2025
ae75ac4
Fixing docker stage
nv-apoddubny May 22, 2025
1391723
Fixing docker stage
nv-apoddubny May 22, 2025
2e5726a
Fixing docker stage
nv-apoddubny May 22, 2025
466ba46
Fixing docker stage
nv-apoddubny May 22, 2025
db23e53
Fixing docker stage
nv-apoddubny May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 344 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
# Copyright 2025 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

env:
PYTHONPATH: ${{ github.workspace }}

jobs:
pre-commit:
name: Pre-commit Checks
runs-on: self-hosted
container:
image: python:3.12-slim-bullseye
steps:
- name: Install Git
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git
git config --global --add safe.directory /__w/SWAGGER/SWAGGER
# Disable Git hooks completely
git config --global core.hooksPath /dev/null

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache Python packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: precommit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: precommit

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip pre-commit
pre-commit --version

- name: Run pre-commit
run: |
pre-commit run --all-files
timeout-minutes: 60

package-check:
name: Package Check
needs: pre-commit
runs-on: self-hosted
container:
image: python:3.12-slim-bullseye
steps:
- name: Install Git
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git
git config --global --add safe.directory /__w/SWAGGER/SWAGGER
# Disable Git hooks completely
git config --global core.hooksPath /dev/null

- name: Checkout code
uses: actions/checkout@v4

- name: Clear Poetry cache
run: |
rm -rf ~/.cache/pypoetry
rm -rf ~/.cache/pip

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip poetry
poetry env use python3.12
poetry install --no-cache

- name: Run Poetry check
run: poetry check
timeout-minutes: 15

unit-tests:
name: Unit Tests
needs: package-check
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: all
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: all
CUDA_HOME: /usr/local/cuda
LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
container:
image: nvidia/cuda:12.6.0-devel-ubuntu22.04
options: --privileged --gpus all --group-add 998 --ipc=host --ulimit memlock=-1 --ulimit stack=67108864
steps:
- name: Install Git
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git
git config --global --add safe.directory /__w/SWAGGER/SWAGGER
# Disable Git hooks completely
git config --global core.hooksPath /dev/null

- name: Checkout code
uses: actions/checkout@v4

- name: Verify CUDA setup
run: |
# Verify NVIDIA drivers and CUDA
nvcc --version
nvidia-smi --query-gpu=gpu_name,driver_version,memory.total --format=csv,noheader

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Cache Python packages
uses: actions/cache@v4
with:
path: |
~/.cache/pip
venv/
key: unit-tests-cuda-${{ hashFiles('**/requirements.txt') }}
restore-keys: unit-tests-cuda-

- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip python3-venv \
libgl1-mesa-glx libglib2.0-0 \
libcudnn8 libcudnn8-dev \
nvidia-cuda-toolkit
python3 -m pip install --upgrade pip poetry
poetry env use python3.12
poetry install

- name: Run unit tests
run: |
mkdir -p test-results
poetry run python -m unittest discover -p "test_*.py" -v > test-results/unit-tests.txt
poetry run python -c 'import xml.etree.ElementTree as ET, re; root = ET.Element("testsuites"); suite = ET.SubElement(root, "testsuite", name="unit-tests"); [suite.append(ET.SubElement(suite, "testcase", classname=m.group(2), name=m.group(1))) if m.group(3) == "ok" else suite.append(ET.SubElement(suite, "testcase", classname=m.group(2), name=m.group(1)).append(ET.SubElement(suite, "failure", message=f"Test {m.group(1)} in {m.group(2)} {m.group(3).lower()}ed"))) for m in re.finditer(r"test_(\w+) \((.*?)\) \.\.\. (ok|FAIL|ERROR)", open("test-results/unit-tests.txt").read())]; ET.ElementTree(root).write("test-results/unit-tests.xml", encoding="utf-8", xml_declaration=True)'

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: test-results/
retention-days: 7

e2e-tests:
name: End-to-End Tests
needs: unit-tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: all
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: all
CUDA_HOME: /usr/local/cuda
LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
container:
image: nvidia/cuda:12.6.0-devel-ubuntu22.04
options: --privileged --gpus all --group-add 998 --ipc=host --ulimit memlock=-1 --ulimit stack=67108864
steps:
- name: Install Git and LFS
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git git-lfs
git config --global --add safe.directory /__w/SWAGGER/SWAGGER
# Remove any existing hooks
rm -f .git/hooks/*
# Configure Git LFS
git lfs install --system
git lfs update --force
# Verify Git LFS installation
git lfs version

- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true

- name: Pull LFS files
run: |
git lfs pull
git lfs ls-files

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip python3-venv \
libgl1-mesa-glx libglib2.0-0 \
libcudnn8 libcudnn8-dev \
nvidia-cuda-toolkit
python3 -m pip install --upgrade pip poetry
poetry env use python3.12
poetry install

- name: Run E2E tests
run: |
# Set CUDA device order
export CUDA_DEVICE_ORDER=PCI_BUS_ID
poetry run python scripts/generate_graph.py \
--map-path maps/carter_warehouse_navigation.png \
--graph-eval.active \
--perf-eval.active
poetry run python scripts/evaluate_graph.py \
--graph-path graphs/graph.gml \
--map-path maps/carter_warehouse_navigation.png \
--output-dir results \
--resolution 0.05 \
--safety-distance 0.3 \
--occupancy-threshold 127

- name: Cleanup
if: always()
run: rm -rf results graphs

docker-build:
name: Docker Build and Test
needs: e2e-tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: all
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: all
CUDA_HOME: /usr/local/cuda
LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
DOCKER_HOST: unix:///var/run/docker.sock
DOCKER_TLS_CERTDIR: ""
container:
image: nvidia/cuda:12.6.0-devel-ubuntu22.04
options: --privileged --gpus all --group-add 998 --ipc=host --ulimit memlock=-1 --ulimit stack=67108864
steps:
- name: Install Git and LFS
run: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git git-lfs
git config --global --add safe.directory /__w/SWAGGER/SWAGGER
# Remove any existing hooks
rm -f .git/hooks/*
# Configure Git LFS
git lfs install --system
git lfs update --force
# Verify Git LFS installation
git lfs version

- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true

- name: Pull LFS files
run: |
git lfs pull
git lfs ls-files

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip python3-venv \
libgl1-mesa-glx libglib2.0-0 \
libcudnn8 libcudnn8-dev \
nvidia-cuda-toolkit curl ca-certificates gnupg
# Add Docker's official GPG key
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker and Docker Compose
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
python3 -m pip install --upgrade pip poetry
poetry env use python3.12
poetry install

- name: Verify Docker and CUDA setup
run: |
# Verify Docker setup
docker info
docker compose version
# Verify CUDA setup
nvidia-smi
nvcc --version
# Verify NVIDIA runtime
ldconfig -p | grep nvidia
# Verify CUDA libraries
ldconfig -p | grep cuda
# Verify CUDA environment
echo "CUDA_HOME: $CUDA_HOME"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
ls -l $CUDA_HOME/lib64/libcuda*
# Verify CUDA device
python3 -c 'import os; print("CUDA_VISIBLE_DEVICES:", os.environ.get("CUDA_VISIBLE_DEVICES")); print("NVIDIA_VISIBLE_DEVICES:", os.environ.get("NVIDIA_VISIBLE_DEVICES")); print("NVIDIA_DRIVER_CAPABILITIES:", os.environ.get("NVIDIA_DRIVER_CAPABILITIES"))'

- name: Build and test
run: |
cd docker || { echo "Missing docker directory"; exit 1; }
# Build with GPU support
DOCKER_BUILDKIT=1 docker compose build --no-cache
# Run with GPU support and NVIDIA runtime
docker compose up -d rest-api
sleep 10
cd ../
# Verify CUDA is available in the container
docker exec docker-rest-api-1 nvidia-smi
# Run tests
poetry run python scripts/test_api_client.py \
--map_path maps/carter_warehouse_navigation.png \
--host localhost

- name: Cleanup
if: always()
run: cd docker && docker compose down -v
Loading
Loading