aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMichael Davis2022-02-21 12:39:23 +0000
committerBlaž Hrastnik2022-03-10 08:31:57 +0000
commitb157c5a8a4472cff68de3a9be66e220dc4b80a9f (patch)
treec67cd0462e3cb3a6b7627ef000b12b0b001afcfa /.github/workflows
parent6fcab90d16f9493c0c4738312061a26e473ab12a (diff)
fetch and compile tree-sitter grammars in helix-term build
This restores much of the behavior that existed before this PR: helix will build the grammars when compiling. The difference is that now fetching is also done during the build phase and is done much more quickly - both shallow and in parallel.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml21
-rw-r--r--.github/workflows/release.yml14
2 files changed, 4 insertions, 31 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e0eb5322..776c8651 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -77,27 +77,14 @@ jobs:
path: target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
+ - name: Copy minimal languages config
+ run: cp .github/workflows/languages.toml ./languages.toml
+
- name: Cache test tree-sitter grammar
uses: actions/cache@v2.1.7
with:
path: runtime/grammars
- key: ${{ runner.os }}-v2-tree-sitter-grammars-${{ hashFiles('**/Cargo.lock') }}
-
- - run: cp .github/workflows/languages.toml ./languages.toml
-
- - name: Download test tree-sitter grammar
- uses: actions-rs/cargo@v1
- with:
- use-cross: ${{ matrix.cross }}
- command: run
- args: -- --fetch-grammars
-
- - name: Build test tree-sitter grammar
- uses: actions-rs/cargo@v1
- with:
- use-cross: ${{ matrix.cross }}
- command: run
- args: -- --build-grammars
+ key: ${{ runner.os }}-v2-tree-sitter-grammars-${{ hashFiles('languages.toml') }}
- name: Run cargo test
uses: actions-rs/cargo@v1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2a9ea80e..2d0b86e2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -62,20 +62,6 @@ jobs:
target: ${{ matrix.target }}
override: true
- - name: Fetch tree-sitter grammars
- uses: actions-rs/cargo@v1
- with:
- use-cross: ${{ matrix.cross }}
- command: run
- args: --release --locked --target ${{ matrix.target }} -- --fetch-grammars
-
- - name: Build tree-sitter grammars
- uses: actions-rs/cargo@v1
- with:
- use-cross: ${{ matrix.cross }}
- command: run
- args: --release --locked --target ${{ matrix.target }} -- --build-grammars
-
- name: Run cargo test
uses: actions-rs/cargo@v1
with: