Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension_ci: Use different target for nextest (#47738)
Finn Everse4dff26857b3
diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.ymlindex 3e2ef81f5bf..54a560704ce 100644--- a/.github/workflows/extension_tests.yml+++ b/.github/workflows/extension_tests.yml@@ -76,7 +76,7 @@ jobs:- name: steps::cargo_install_nextestuses: taiki-e/install-action@nextest- name: steps::cargo_nextest- run: cargo nextest run --workspace --no-fail-fast+ run: 'cargo nextest run --workspace --no-fail-fast --target "$(rustc -vV | sed -n ''s|host: ||p'')"'shell: bash -euxo pipefail {0}env:NEXTEST_NO_TESTS: warndiff --git a/tooling/xtask/src/tasks/workflows/extension_tests.rs b/tooling/xtask/src/tasks/workflows/extension_tests.rsindex d1644a3cf28..5c419fc358c 100644--- a/tooling/xtask/src/tasks/workflows/extension_tests.rs+++ b/tooling/xtask/src/tasks/workflows/extension_tests.rs@@ -69,7 +69,10 @@ fn check_rust() -> NamedJob {.add_step(run_clippy()).add_step(steps::cargo_install_nextest()).add_step(- steps::cargo_nextest(runners::Platform::Linux).add_env(("NEXTEST_NO_TESTS", "warn")),+ steps::cargo_nextest(runners::Platform::Linux)+ // Set the target to the current platform again+ .with_target("$(rustc -vV | sed -n 's|host: ||p')")+ .add_env(("NEXTEST_NO_TESTS", "warn")),);named::job(job)diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rsindex 63ece051ec9..90e28e08af3 100644--- a/tooling/xtask/src/tasks/workflows/steps.rs+++ b/tooling/xtask/src/tasks/workflows/steps.rs@@ -6,6 +6,30 @@ pub const BASH_SHELL: &str = "bash -euxo pipefail {0}";// https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshellpub const PWSH_SHELL: &str = "pwsh";+pub(crate) struct Nextest(Step<Run>);++pub(crate) fn cargo_nextest(platform: Platform) -> Nextest {+ Nextest(named::run(+ platform,+ "cargo nextest run --workspace --no-fail-fast",+ ))+}++impl Nextest {+ pub(crate) fn with_target(mut self, target: &str) -> Step<Run> {+ if let Some(nextest_command) = self.0.value.run.as_mut() {+ nextest_command.push_str(&format!(r#" --target "{target}""#));+ }+ self.into()+ }+}++impl From<Nextest> for Step<Run> {+ fn from(value: Nextest) -> Self {+ value.0+ }+}+pub fn checkout_repo() -> Step<Use> {named::uses("actions",@@ -66,10 +90,6 @@ pub fn cargo_install_nextest() -> Step<Use> {named::uses("taiki-e", "install-action", "nextest")}-pub fn cargo_nextest(platform: Platform) -> Step<Run> {- named::run(platform, "cargo nextest run --workspace --no-fail-fast")-}-pub fn setup_cargo_config(platform: Platform) -> Step<Run> {match platform {Platform::Windows => named::pwsh(indoc::indoc! {r#"