50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Check Build
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup node v.20
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '>=20.0.0'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Install tree-sitter CLI
|
|
run: npm install -g tree-sitter-cli
|
|
|
|
- name: Generate parser
|
|
run: tree-sitter generate
|
|
|
|
- name: Build parser (C library)
|
|
run: make
|
|
|
|
- name: Build parser (WASM)
|
|
run: tree-sitter build --wasm
|
|
|
|
- name: Build Node.js bindings
|
|
run: npm run install
|
|
|
|
- name: Verify parser generation
|
|
run: |
|
|
test -f src/parser.c || (echo "Parser not generated" && exit 1)
|
|
test -f src/node-types.json || (echo "Node types not generated" && exit 1)
|
|
|
|
- name: Verify C library build
|
|
run: |
|
|
test -f libtree-sitter-mc.a || (echo "Static library not built" && exit 1)
|
|
test -f libtree-sitter-mc.so || (echo "Shared library not built" && exit 1)
|
|
|
|
- name: Verify WASM build
|
|
run: |
|
|
test -f tree-sitter-mc.wasm || (echo "WASM file not built" && exit 1)
|