Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tree sitter example

on:
push

env:
CARGO_TERM_COLOR: always
CACHE_PATHS: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
**/target

jobs:
run-example-tree-sitter:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
include:
- os: windows-latest
prefix: ""
extension: dll
- os: ubuntu-latest
prefix: "lib"
extension: so
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
id: cache
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: brndnmtthws/rust-action-cargo-binstall@v1
with:
packages: tree-sitter-cli

- name: Run setup
run: |
git clone https://github.com/tree-sitter/tree-sitter-rust tree-sitter-rust

mkdir languages
tree-sitter build tree-sitter-rust -o languages/${{ matrix.prefix }}rust.${{ matrix.extension }}

cargo run
shell: bash
working-directory: language-tool

- uses: actions/cache/save@v4
if: always() && steps.cache.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache.outputs.cache-primary-key }}
path: ${{ env.CACHE_PATHS }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
**/languages/*.dll
Loading
Loading