Skip to content

Simplify CI: use env vars for image tags #53

Simplify CI: use env vars for image tags

Simplify CI: use env vars for image tags #53

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) <2025> NVIDIA CORPORATION & AFFILIATES. All rights reserved.

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 32, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.LINT_IMAGE, (Line: 65, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env[matrix.image]
#
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
LINT_IMAGE: ghcr.io/nvidia/cutile-python/lint:2025-12-11-ca8b32e31766
DOCS_IMAGE: ghcr.io/nvidia/cutile-python/docs:2025-12-12-97fad4c1627d
BUILD_PY310_X86_64_IMAGE: ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2025-12-12-16b441247748
BUILD_PY311_X86_64_IMAGE: ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2025-12-12-201e0093fba8
BUILD_PY312_X86_64_IMAGE: ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2025-12-12-3ecf71dd9102
BUILD_PY313_X86_64_IMAGE: ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2025-12-12-f1ed3688b7ef
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: ${{ env.LINT_IMAGE }}
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
build:
name: Build Wheel (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
- python-version: "3.10"
image: BUILD_PY310_X86_64_IMAGE
- python-version: "3.11"
image: BUILD_PY311_X86_64_IMAGE
- python-version: "3.12"
image: BUILD_PY312_X86_64_IMAGE
- python-version: "3.13"
image: BUILD_PY313_X86_64_IMAGE
container:
image: ${{ env[matrix.image] }}
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