Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

extension_ci: Ensure specified target is installed (#47717)

Finn Eversd27fa3ba8525
diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.yml
index d1aa0040153..3e2ef81f5bf 100644
--- a/.github/workflows/extension_tests.yml
+++ b/.github/workflows/extension_tests.yml
@@ -64,6 +64,9 @@ jobs:
with:
cache: rust
path: ~/.rustup
+ - name: extension_tests::install_rust_target
+ run: rustup target add wasm32-wasip2
+ shell: bash -euxo pipefail {0}
- name: steps::cargo_fmt
run: cargo fmt --all -- --check
shell: bash -euxo pipefail {0}
diff --git a/tooling/xtask/src/tasks/workflows/extension_tests.rs b/tooling/xtask/src/tasks/workflows/extension_tests.rs
index c3de2e111ac..d1644a3cf28 100644
--- a/tooling/xtask/src/tasks/workflows/extension_tests.rs
+++ b/tooling/xtask/src/tasks/workflows/extension_tests.rs
@@ -46,6 +46,13 @@ pub(crate) fn extension_tests() -> Workflow {
})
}
+fn install_rust_target() -> Step<Run> {
+ named::bash(format!(
+ "rustup target add {rust_target}",
+ rust_target = extension::extension_builder::RUST_TARGET
+ ))
+}
+
fn run_clippy() -> Step<Run> {
named::bash("cargo clippy --release --all-targets --all-features -- --deny warnings")
}
@@ -57,6 +64,7 @@ fn check_rust() -> NamedJob {
.timeout_minutes(6u32)
.add_step(steps::checkout_repo())
.add_step(steps::cache_rust_dependencies_namespace())
+ .add_step(install_rust_target())
.add_step(steps::cargo_fmt())
.add_step(run_clippy())
.add_step(steps::cargo_install_nextest())