Skip to content

Commit abecbc3

Browse files
committed
fix: download prebuilt tree-sitter binary instead of compiling
Downloads the prebuilt binary from GitHub releases, taking seconds instead of minutes.
1 parent 1d22b8f commit abecbc3

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,12 @@ jobs:
108108

109109
- uses: Swatinem/rust-cache@v2
110110

111-
- uses: actions/cache@v5
112-
with:
113-
path: |
114-
~/.cargo/bin/tree-sitter
115-
target/**/build/pgls_treesitter_grammar-*/out/generated
116-
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('.tree-sitter-cli-version', 'crates/pgls_treesitter_grammar/grammar.js', 'crates/pgls_treesitter_grammar/tree-sitter.json', 'rust-toolchain.toml', 'Cargo.lock') }}
117-
118111
- name: Setup tree-sitter
119-
run: command -v tree-sitter || cargo install tree-sitter-cli --version "$(cat .tree-sitter-cli-version)" --locked
120-
shell: bash
112+
run: |
113+
VERSION=$(cat .tree-sitter-cli-version)
114+
curl -fsSL "https://github.com/tree-sitter/tree-sitter/releases/download/v${VERSION}/tree-sitter-linux-x64.gz" | gunzip > /usr/local/bin/tree-sitter
115+
chmod +x /usr/local/bin/tree-sitter
116+
tree-sitter --version
121117
122118
- name: Generate Packages (deprecated)
123119
id: generate-packages-deprecated

0 commit comments

Comments
 (0)