Skip to content

Commit 3f5d9b1

Browse files
committed
Create c-cpp.yml
Signed-off-by: Bingsong Si <sibingsong@gmail.com>
1 parent cec1e6e commit 3f5d9b1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/c-cpp.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: install builddeps
17+
run: |
18+
sudo apt update
19+
sudo apt install -y bison flex libelf-dev
20+
- name: configure
21+
run: |
22+
curl -o .config https://raw.githubusercontent.com/elrepo/kernel/refs/heads/main/kernel-ml/el10/config-6.16.8-x86_64
23+
make olddefconfig
24+
- name: make
25+
run: |
26+
make -j $(nproc)
27+
./scripts/clang-tools/gen_compile_commands.py
28+
sed -i 's|/home/runner/work/linux/linux|/Volumes/workspace/code/linux|g' ./compile_commands.json
29+
30+
- name: upload compile_commands.json
31+
uses: actions/upload-artifact@v4.6.2
32+
with:
33+
name: compile_commands.json
34+
path: ./compile_commands.json
35+
- name: distclean
36+
run: make distclean

0 commit comments

Comments
 (0)