Skip to content

Commit aeccff0

Browse files
fengmk2claude
andcommitted
ci: add Rust binding to CI matrix
- Add binding matrix dimension: [cpp, rust] - Run C++ and Rust bindings in parallel - Conditionally setup Rust toolchain only for rust binding - Separate build and test steps for each binding - Code coverage only for C++ binding Total jobs: 3 OS × 4 Node versions × 2 bindings = 24 parallel jobs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 91c1a9d commit aeccff0

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/nodejs.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
{os: "ubuntu-latest", arch: "x64"},
1818
]
1919
node-version: [ 18, 20, 22, 24 ]
20+
binding: [ cpp, rust ]
2021
steps:
2122
- name: Set up Python
2223
uses: actions/setup-python@v4
@@ -35,13 +36,31 @@ jobs:
3536
with:
3637
node-version: ${{ matrix.node-version }}
3738

39+
- name: Setup Rust
40+
uses: dtolnay/rust-action@stable
41+
if: ${{ matrix.binding == 'rust' }}
42+
3843
- name: Install Dependencies
3944
run: npm install
4045

41-
- name: Continuous Integration
42-
run: npm run ci
46+
- name: Build C++ Binding
47+
if: ${{ matrix.binding == 'cpp' }}
48+
run: npm run build
49+
50+
- name: Build Rust Binding
51+
if: ${{ matrix.binding == 'rust' }}
52+
run: npm run build:rs
53+
54+
- name: Test C++ Binding
55+
if: ${{ matrix.binding == 'cpp' }}
56+
run: npm test
57+
58+
- name: Test Rust Binding
59+
if: ${{ matrix.binding == 'rust' }}
60+
run: npm run test:rs
4361

4462
- name: Code Coverage
63+
if: ${{ matrix.binding == 'cpp' }}
4564
uses: codecov/codecov-action@v5
4665
with:
4766
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)