-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 2.02 KB
/
ci.yml
File metadata and controls
82 lines (69 loc) · 2.02 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
name: CI
on:
pull_request:
branches: [master, main]
push:
branches: [master, main]
paths-ignore:
- '**/*.md'
- 'website/**'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CMAKE_BUILD_TYPE: Release
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-18
- name: Check formatting
run: |
find . -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.cu' -o -name '*.cuh' \) \
! -path './build/*' \
! -path './.git/*' \
! -path './third_party/*' \
! -path './vendor/*' \
! -path './external/*' \
! -path './.kiro/*' \
| xargs clang-format-18 --dry-run --Werror
build-test:
name: Build and Test
runs-on: ubuntu-22.04
needs: format
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup CUDA
uses: Jimver/cuda-toolkit@v0.2.15
with:
cuda: '11.8'
method: network
- name: Setup GCC
run: |
sudo apt-get update
sudo apt-get install -y gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
- name: Configure CMake
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-10 \
-DCMAKE_CUDA_ARCHITECTURES="75;80;86;89" \
-DBUILD_TESTS=ON
- name: Build
run: cmake --build build -j"$(nproc)"
- name: Run tests
run: ctest --test-dir build --output-on-failure --timeout 300