aboutsummaryrefslogtreecommitdiff
path: root/helix-loader
diff options
context:
space:
mode:
authorMichael Davis2022-06-05 10:53:20 +0000
committerGitHub2022-06-05 10:53:20 +0000
commit0035c29fc16f6c795257e241fddd9f2178bc4b4c (patch)
tree12aa3cfc79b0871a2ae693246240b2f2ac2c9b40 /helix-loader
parentf1ae496860e10560d9a8b91a721168524411096a (diff)
Use a minimal binary to fetch grammar sources in release CI (#2557)
This is an optimization for the release CI. The release CI can take a while since it compiles release builds for all operating systems. We cut down on duplicate work and overall time by fetching tree-sitter grammar repositories and then using those repositories in all later steps. Previously we built all of helix just to run helix_loader::grammar::fetch_grammars() which is wasteful on time. With this change we only build the helix-loader crate.
Diffstat (limited to 'helix-loader')
-rw-r--r--helix-loader/Cargo.toml5
-rw-r--r--helix-loader/src/main.rs9
2 files changed, 13 insertions, 1 deletions
diff --git a/helix-loader/Cargo.toml b/helix-loader/Cargo.toml
index aee03fc2..20384472 100644
--- a/helix-loader/Cargo.toml
+++ b/helix-loader/Cargo.toml
@@ -9,6 +9,10 @@ categories = ["editor"]
repository = "https://github.com/helix-editor/helix"
homepage = "https://helix-editor.com"
+[[bin]]
+name = "hx-loader"
+path = "src/main.rs"
+
[dependencies]
anyhow = "1"
serde = { version = "1.0", features = ["derive"] }
@@ -27,4 +31,3 @@ threadpool = { version = "1.0" }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
libloading = "0.7"
-
diff --git a/helix-loader/src/main.rs b/helix-loader/src/main.rs
new file mode 100644
index 00000000..c1ce45ff
--- /dev/null
+++ b/helix-loader/src/main.rs
@@ -0,0 +1,9 @@
+use anyhow::Result;
+use helix_loader::grammar::fetch_grammars;
+
+// This binary is used in the Release CI as an optimization to cut down on
+// compilation time. This is not meant to be run manually.
+
+fn main() -> Result<()> {
+ fetch_grammars()
+}