Skip to content

chore: comprehensive project overhaul and tooling setup #25

chore: comprehensive project overhaul and tooling setup

chore: comprehensive project overhaul and tooling setup #25

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Check C/C++/CUDA formatting
uses: jidicula/clang-format-action@v4.15.0
with:
clang-format-version: '17'
check-path: '.'
exclude-regex: '(^|/)(build|third_party|external|vendor|\.git)(/|$)'
fallback-style: 'LLVM'
docs-build:
name: Docs Build Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
working-directory: docs
run: npm ci
- name: Build docs
working-directory: docs
run: npm run docs:build
build-test:
name: Build & Test (${{ matrix.build-type }} - CUDA ${{ matrix.cuda }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
cuda: ['12.2.0', '12.4.1']
build-type: [release]
include:
- cuda: '12.4.1'
build-type: default
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.23
with:
cuda: '${{ matrix.cuda }}'
method: 'network'
sub-packages: '["nvcc", "cudart", "cccl"]'
- name: Cache CMake dependencies
uses: actions/cache@v4
with:
path: |
_deps
~/.cache/pip
key: ${{ runner.os }}-cmake-${{ matrix.cuda }}-${{ matrix.build-type }}-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cmake-${{ matrix.cuda }}-${{ matrix.build-type }}-
${{ runner.os }}-cmake-${{ matrix.cuda }}-
${{ runner.os }}-cmake-
- name: Configure CMake
run: cmake --preset ${{ matrix.build-type }} -DCMAKE_CUDA_ARCHITECTURES="80"
- name: Build
run: cmake --build --preset ${{ matrix.build-type }} -j2
- name: Run tests
run: ctest --preset ${{ matrix.build-type }} --output-on-failure -j2
configure-minimal:
name: Configure Minimal Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.23
with:
cuda: '12.4.1'
method: 'network'
sub-packages: '["nvcc", "cudart", "cccl"]'
- name: Cache CMake dependencies
uses: actions/cache@v4
with:
path: |
_deps
~/.cache/pip
key: ${{ runner.os }}-cmake-minimal-${{ hashFiles('CMakeLists.txt') }}
restore-keys: ${{ runner.os }}-cmake-minimal-
- name: Configure CMake minimal preset
run: cmake --preset minimal
- name: Build minimal preset
run: cmake --build --preset minimal