-
Notifications
You must be signed in to change notification settings - Fork 117
40 lines (31 loc) · 1.01 KB
/
Copy pathcodegen.yaml
File metadata and controls
40 lines (31 loc) · 1.01 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
name: Codegen Test
on:
pull_request:
workflow_dispatch:
jobs:
codegen:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format
- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.35
with:
cuda: "13.1.0"
method: network
sub-packages: '["nvcc"]'
- name: Install codegen dependencies
run: |
python3 -m venv .venv-codegen
.venv-codegen/bin/pip install --no-cache-dir -r codegen/requirements.txt
- name: Regenerate checked-in sources
run: |
sudo ln -sfn "$CUDA_PATH" /usr/local/cuda
cd codegen
../.venv-codegen/bin/python ./codegen.py
- name: Format generated C++
run: clang-format -i codegen/gen_client.cpp codegen/gen_server.cpp
- name: Verify generated files are current
run: git diff --exit-code -- codegen