Skip to content

CI

CI #62

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) <2025> NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
images:
name: Define Images
runs-on: ubuntu-latest
outputs:
lint: ghcr.io/nvidia/cutile-python/lint:2025-12-16-8f8dc037a629
docs: ghcr.io/nvidia/cutile-python/docs:2025-12-16-b2659f779742
build_py310: ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2025-12-16-7586f904479b
build_py311: ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2025-12-16-bd57fbae3794
build_py312: ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2025-12-16-3eb50f53e2e8
build_py313: ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2025-12-16-6b45240569d3
steps:
- run: echo "Defining image tags"
lint:
name: Lint
needs: images
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: ${{ needs.images.outputs.lint }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run flake8
run: flake8
- name: Run cpplint
run: cpplint.py
- name: Check license headers (REUSE)
run: check_license.sh
- name: Check inline samples are up to date
run: python3 test/tools/inline_samples.py --check
docs:
name: Build Docs
needs: [images, build]
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: ${{ needs.images.outputs.docs }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: wheel-py3.12-linux-x86_64
path: dist/
- name: Install wheel
run: pip install dist/*.whl
- name: Build documentation
run: make -C docs html
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/build/html
retention-days: 7
build:
name: Build Wheel (Python ${{ matrix.python-version }})
needs: images
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
- python-version: "3.10"
image_key: build_py310
- python-version: "3.11"
image_key: build_py311
- python-version: "3.12"
image_key: build_py312
- python-version: "3.13"
image_key: build_py313
container:
image: ${{ needs.images.outputs[matrix.image_key] }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Build wheel
run: python setup.py bdist_wheel
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheel-py${{ matrix.python-version }}-linux-x86_64
path: dist/*.whl
if-no-files-found: error
retention-days: 7