Skip to content

Move float_to_bits()/float_from_bits() to C++ #269

Move float_to_bits()/float_from_bits() to C++

Move float_to_bits()/float_from_bits() to C++ #269

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
permissions:
contents: read
packages: read
jobs:
images:
name: Define Base Images
runs-on: ubuntu-latest
outputs:
lint: ghcr.io/nvidia/cutile-python/lint:2026-10-07-b8c79b647a89
docs: ghcr.io/nvidia/cutile-python/docs:2026-10-07-f256039628ed
build_py310: ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2026-10-07-158ed056693e
build_py311: ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2026-10-07-ef8e65ad65d8
build_py312: ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2026-10-07-83952eddad44
build_py313: ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2026-10-07-b5c2fce6f2bc
build_py314: ghcr.io/nvidia/cutile-python/build_py_3.14_x86_64:2026-10-07-5eaf410714f1
build_py314t: ghcr.io/nvidia/cutile-python/build_py_3.14t_x86_64:2026-10-07-9a9d6569782f
test_py310: ghcr.io/nvidia/cutile-python/test_py_3.10_x86_64:2026-10-07-140a0fe45447
test_py311: ghcr.io/nvidia/cutile-python/test_py_3.11_x86_64:2026-10-07-66351a750fd0
test_py312: ghcr.io/nvidia/cutile-python/test_py_3.12_x86_64:2026-10-07-8cac8a9adad5
test_py313: ghcr.io/nvidia/cutile-python/test_py_3.13_x86_64:2026-10-07-975219bb126d
test_py314: ghcr.io/nvidia/cutile-python/test_py_3.14_x86_64:2026-10-08-7a663a8db196
test_py314t: ghcr.io/nvidia/cutile-python/test_py_3.14t_x86_64:2026-10-08-d4c4323e846a
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: Mark workspace as safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run flake8
run: flake8
- name: Run cpplint
run: python scripts/cpplint.py
- name: Check license headers
run: python scripts/check_license.py
- name: Check inline samples are up to date
run: python 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@v7
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@v6
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:
fail-fast: false
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
- python-version: "3.14"
image_key: build_py314
- python-version: "3.14t"
image_key: build_py314t
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@v6
with:
name: wheel-py${{ matrix.python-version }}-linux-x86_64
path: dist/*.whl
if-no-files-found: error
retention-days: 7
test:
name: Test (Python ${{ matrix.python-version }})
needs: [images, build]
runs-on: [self-hosted, gpu]
timeout-minutes: 60
permissions:
contents: read
packages: read
checks: write
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
image_key: test_py310
- python-version: "3.11"
image_key: test_py311
- python-version: "3.12"
image_key: test_py312
- python-version: "3.13"
image_key: test_py313
- python-version: "3.14"
image_key: test_py314
- python-version: "3.14t"
image_key: test_py314t
container:
image: ${{ needs.images.outputs[matrix.image_key] }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --gpus all
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Mark workspace as safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Download wheel
uses: actions/download-artifact@v7
with:
name: wheel-py${{ matrix.python-version }}-linux-x86_64
path: dist/
- name: Install wheel
run: pip install dist/*.whl
- name: Run tests
run: pytest --ignore experimental --durations=10 --junitxml=test-results.xml -m "not benchmark and not use_mlir" -k "not int64_index" .
- name: Report test results
if: ${{ !cancelled() }}
uses: dorny/test-reporter@v3
with:
name: Test Results (Python ${{ matrix.python-version }})
path: test-results.xml
reporter: java-junit
fail-on-error: false
- name: Run benchmarks
if: matrix.python-version == '3.10'
continue-on-error: true
run: pytest --ignore experimental --durations=10 --junitxml=benchmark-results.xml -m "benchmark" .
- name: Report benchmark results
if: ${{ !cancelled() && matrix.python-version == '3.10' }}
uses: dorny/test-reporter@v3
with:
name: Benchmark Results
path: benchmark-results.xml
reporter: java-junit
fail-on-error: false