Skip to content

Commit 99d7a47

Browse files
committed
ci: add GitHub Actions workflow and changelog
1 parent 6927699 commit 99d7a47

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
container:
21+
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Install dependencies
25+
run: |
26+
apt-get update && apt-get install -y --no-install-recommends cmake ninja-build g++ git
27+
rm -rf /var/lib/apt/lists/*
28+
- name: Configure
29+
run: |
30+
if [ -f CMakePresets.json ]; then
31+
cmake --preset default
32+
else
33+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
34+
fi
35+
- name: Build
36+
run: |
37+
if [ -f CMakePresets.json ]; then
38+
cmake --build --preset default -j$(nproc)
39+
else
40+
cmake --build build -j$(nproc)
41+
fi
42+
format:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- name: Install clang-format
47+
run: sudo apt-get update && sudo apt-get install -y clang-format-14
48+
- name: Check formatting
49+
run: |
50+
find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' -o -name '*.cuh' \) \
51+
-not -path './build/*' -not -path './third_party/*' -print0 | xargs -0 -r clang-format-14 --dry-run --Werror
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 2026-03-09 Workflow optimization
2+
3+
## Summary
4+
5+
Added a standardized core GitHub Actions CI workflow for this repository.
6+
7+
## Changes
8+
9+
- Added `.github/workflows/ci.yml`
10+
- Standardized triggers for `push`, `pull_request`, and `workflow_dispatch`
11+
- Added CUDA container-based build validation
12+
- Added `clang-format` check job

0 commit comments

Comments
 (0)