Skip to content

Commit 12d07c3

Browse files
committed
Fix OS CI and add caching
1 parent 8613950 commit 12d07c3

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,47 @@ name: Tree sitter example
33
on:
44
push
55

6+
env:
7+
CARGO_TERM_COLOR: always
8+
CACHE_PATHS: |
9+
~/.cargo/bin/
10+
~/.cargo/registry/index/
11+
~/.cargo/registry/cache/
12+
~/.cargo/git/db/
13+
**/target
14+
615
jobs:
716
run-example-tree-sitter:
817
strategy:
918
matrix:
1019
os: [windows-latest, ubuntu-latest]
20+
include:
21+
- os: windows-latest
22+
extension: dll
23+
- os: ubuntu-latest
24+
extension: so
1125
fail-fast: false
1226

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

1529
steps:
1630
- uses: actions/checkout@v4
31+
- uses: actions/cache@v4
32+
with:
33+
path: ${{ env.CACHE_PATHS }}
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
1735

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

2240
- name: Run setup
23-
run: bash test.sh
41+
run: |
42+
git clone https://github.com/tree-sitter/tree-sitter-rust tree-sitter-rust
43+
44+
mkdir languages
45+
tree-sitter build tree-sitter-rust -o languages/rust.${{ matrix.extension }}
46+
47+
cargo run
48+
shell: bash
2449
working-directory: language-tool

language-tool/test.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)