Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension_ci: Set default target for all jobs (#47712)
Finn Evers7a0a26dcf73b
diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.ymlindex 5584a5f35ad..90c7552ee1c 100644--- a/.github/workflows/extension_tests.yml+++ b/.github/workflows/extension_tests.yml@@ -6,6 +6,7 @@ env:RUST_BACKTRACE: '1'CARGO_INCREMENTAL: '0'ZED_EXTENSION_CLI_SHA: 7cfce605704d41ca247e3f84804bf323f6c6caaf+ CARGO_BUILD_TARGET: wasm32-wasip2on:workflow_call: {}jobs:diff --git a/Cargo.lock b/Cargo.lockindex 5ec4a4414ab..0329e18e32a 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -20688,6 +20688,7 @@ dependencies = ["cargo_metadata","cargo_toml","clap",+ "extension","gh-workflow","indexmap","indoc",diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rsindex 6d7c3206e88..252c8f00b44 100644--- a/crates/extension/src/extension_builder.rs+++ b/crates/extension/src/extension_builder.rs@@ -19,7 +19,7 @@ use wasm_encoder::{ComponentSectionId, Encode as _, RawSection, Section as _};use wasmparser::Parser;/// Currently, we compile with Rust's `wasm32-wasip2` target, which works with WASI `preview2` and the component model.-const RUST_TARGET: &str = "wasm32-wasip2";+pub const RUST_TARGET: &str = "wasm32-wasip2";/// Compiling Tree-sitter parsers from C to WASM requires Clang 17, and a WASM build of libc/// and clang's runtime library. The `wasi-sdk` provides these binaries.diff --git a/tooling/xtask/Cargo.toml b/tooling/xtask/Cargo.tomlindex 13179b2eb69..8f775b44038 100644--- a/tooling/xtask/Cargo.toml+++ b/tooling/xtask/Cargo.toml@@ -14,6 +14,7 @@ backtrace.workspace = truecargo_metadata.workspace = truecargo_toml.workspace = trueclap = { workspace = true, features = ["derive"] }+extension.workspace = truetoml.workspace = trueindoc.workspace = trueindexmap.workspace = truediff --git a/tooling/xtask/src/tasks/workflows/extension_tests.rs b/tooling/xtask/src/tasks/workflows/extension_tests.rsindex 9183c61da10..9d7e233d562 100644--- a/tooling/xtask/src/tasks/workflows/extension_tests.rs+++ b/tooling/xtask/src/tasks/workflows/extension_tests.rs@@ -32,6 +32,10 @@ pub(crate) fn extension_tests() -> Workflow {.add_env(("RUST_BACKTRACE", 1)).add_env(("CARGO_INCREMENTAL", 0)).add_env(("ZED_EXTENSION_CLI_SHA", ZED_EXTENSION_CLI_SHA))+ .add_env((+ "CARGO_BUILD_TARGET",+ extension::extension_builder::RUST_TARGET,+ )).map(|workflow| {jobs.into_iter().chain([tests_pass])