Skip to content

Commit df30dd5

Browse files
cache+oginstall
1 parent 1bf7f2e commit df30dd5

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

.github/workflows/pull_request.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ jobs:
113113
sleep 1
114114
done
115115
116+
- uses: actions/cache@v4
117+
with:
118+
path: |
119+
~/.cargo/bin/tree-sitter
120+
~/.cargo/bin/sqlx
121+
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('rust-toolchain.toml') }}
122+
116123
- name: Setup tree-sitter
117124
run: cargo install tree-sitter-cli
118125

@@ -159,6 +166,7 @@ jobs:
159166
uses: actions/checkout@v4
160167
with:
161168
submodules: true
169+
162170
- name: Free Disk Space
163171
uses: ./.github/actions/free-disk-space
164172
- name: Install toolchain
@@ -171,6 +179,12 @@ jobs:
171179
- name: Setup Postgres
172180
uses: ./.github/actions/setup-postgres
173181

182+
- uses: actions/cache@v4
183+
with:
184+
path: |
185+
~/.cargo/bin/tree-sitter
186+
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('rust-toolchain.toml') }}
187+
174188
- name: Setup Postgres
175189
run: cargo install tree-sitter-cli
176190

@@ -202,9 +216,13 @@ jobs:
202216
uses: moonrepo/setup-rust@v1
203217
with:
204218
cache-base: main
205-
- uses: tree-sitter/setup-action@v2
219+
- uses: actions/cache@v4
206220
with:
207-
install-lib: false
221+
path: |
222+
~/.cargo/bin/tree-sitter
223+
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('rust-toolchain.toml') }}
224+
- name: setup tree-sitter
225+
run: cargo install tree-sitter-cli
208226
- name: Build main binary
209227
run: cargo build -p pgls_cli --release
210228
- name: Setup Bun
@@ -257,9 +275,13 @@ jobs:
257275
cache-base: main
258276
env:
259277
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
260-
- uses: tree-sitter/setup-action@v2
278+
- uses: actions/cache@v4
261279
with:
262-
install-lib: false
280+
path: |
281+
~/.cargo/bin/tree-sitter
282+
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('rust-toolchain.toml') }}
283+
- name: setup tree-sitter
284+
run: cargo install tree-sitter-cli
263285
- name: Ensure RustFMT on nightly toolchain
264286
run: rustup component add rustfmt --toolchain nightly
265287
- name: echo toolchain

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,14 @@ jobs:
7272
sudo apt-get update
7373
sudo apt-get install -y musl-tools
7474
75-
- uses: tree-sitter/setup-action@v2
75+
- uses: actions/cache@v4
7676
with:
77-
install-lib: false
77+
path: |
78+
~/.cargo/bin/tree-sitter
79+
key: ${{ runner.os }}-tree-sitter-${{ hashFiles('rust-toolchain.toml') }}
80+
81+
- name: Setup tree-sitter
82+
run: cargo install tree-sitter-cli
7883

7984
- name: Setup Postgres
8085
uses: ./.github/actions/setup-postgres

0 commit comments

Comments
 (0)