Skip to content

Commit 1704ec8

Browse files
Fix grammar source repos and add build timeout
Fix bash (tree-sitter/tree-sitter-bash), dart (UserNobody14), and sql (maxdeviant) repository URLs that were causing clone failures. Add 5 minute per-grammar timeout to prevent CI hanging on large parsers, and 30 minute job-level timeout on the workflow.
1 parent 26fec8f commit 1704ec8

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/build-grammars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
build-grammars:
1919
if: github.repository == 'athasdev/extensions'
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 30
2122
steps:
2223
- uses: actions/checkout@v4
2324

grammar-sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"bash": {
3-
"repository": "tree-sitter-grammars/tree-sitter-bash",
3+
"repository": "tree-sitter/tree-sitter-bash",
44
"path": "."
55
},
66
"c": {
@@ -20,7 +20,7 @@
2020
"path": "."
2121
},
2222
"dart": {
23-
"repository": "UserNobworker/tree-sitter-dart",
23+
"repository": "UserNobody14/tree-sitter-dart",
2424
"path": "."
2525
},
2626
"dockerfile": {
@@ -104,7 +104,7 @@
104104
"path": "."
105105
},
106106
"sql": {
107-
"repository": "m-novikov/tree-sitter-sql",
107+
"repository": "maxdeviant/tree-sitter-sql",
108108
"path": "."
109109
},
110110
"svelte": {

scripts/build-grammars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ async function buildGrammar(
7171
await $`tree-sitter generate`.cwd(buildPath).quiet();
7272
}
7373

74-
// Build wasm
74+
// Build wasm (5 minute timeout per grammar)
7575
await mkdir(join(EXTENSIONS_DIR, lang), { recursive: true });
76-
await $`tree-sitter build --wasm -o ${wasmOutput} ${buildPath}`;
76+
await $`tree-sitter build --wasm -o ${wasmOutput} ${buildPath}`.timeout(300_000);
7777

7878
if (existsSync(wasmOutput)) {
7979
const stat = Bun.file(wasmOutput);

0 commit comments

Comments
 (0)