-
Notifications
You must be signed in to change notification settings - Fork 126
119 lines (101 loc) · 3.2 KB
/
ci.yml
File metadata and controls
119 lines (101 loc) · 3.2 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
118
119
# 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 Base Images
runs-on: ubuntu-latest
outputs:
lint: ghcr.io/nvidia/cutile-python/lint:2026-03-02-d33a8a50c68d
docs: ghcr.io/nvidia/cutile-python/docs:2026-03-02-2ab6fb9d9368
build_py310: ghcr.io/nvidia/cutile-python/build_py_3.10_x86_64:2026-03-02-c7f3f36001fd
build_py311: ghcr.io/nvidia/cutile-python/build_py_3.11_x86_64:2026-03-02-92c972404358
build_py312: ghcr.io/nvidia/cutile-python/build_py_3.12_x86_64:2026-03-02-299d123ad082
build_py313: ghcr.io/nvidia/cutile-python/build_py_3.13_x86_64:2026-03-02-8eea98e968b5
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@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