Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace submodules with flags for fetching and building grammars #1659

Merged
merged 18 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -53,8 +51,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -81,6 +77,15 @@ 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('languages.toml') }}

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
Expand All @@ -97,8 +102,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -144,8 +147,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This languages.toml is used for testing in CI.

[[language]]
name = "rust"
scope = "source.rust"
injection-regex = "rust"
file-types = ["rs"]
comment-token = "//"
roots = ["Cargo.toml", "Cargo.lock"]
indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }

[[language]]
name = "nix"
scope = "source.nix"
injection-regex = "nix"
file-types = ["nix"]
shebangs = []
roots = []
comment-token = "#"

# A grammar entry is not necessary for this language - it is only used for
# testing TOML merging behavior.
8 changes: 0 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -114,14 +112,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: false

- uses: actions/download-artifact@v2
# with:
# path: dist
# - run: ls -al ./dist
- run: ls -al bins-*

- name: Calculate tag name
run: |
Expand Down
240 changes: 0 additions & 240 deletions .gitmodules

This file was deleted.

Loading