Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Move building visual tests binary to separate step (#53440)
Finn Evers364ebfcc07db
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 9a164557d20..62ada22ea0a 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -43,8 +43,6 @@ jobs:SCCACHE_BUCKET: sccache-zed- name: steps::cargo_nextestrun: cargo nextest run --workspace --no-fail-fast --no-tests=warn- - name: steps::cargo_build_visual_tests- run: cargo build -p zed --bin zed_visual_test_runner --features visual-tests- name: steps::show_sccache_statsrun: sccache --show-stats || true- name: steps::cleanup_cargo_configdiff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.ymlindex ce7b789731b..2fee8b3ae9f 100644--- a/.github/workflows/run_tests.yml+++ b/.github/workflows/run_tests.yml@@ -440,8 +440,6 @@ jobs:SCCACHE_BUCKET: sccache-zed- name: steps::cargo_nextestrun: cargo nextest run --workspace --no-fail-fast --no-tests=warn${{ needs.orchestrate.outputs.changed_packages && format(' -E "{0}"', needs.orchestrate.outputs.changed_packages) || '' }}- - name: steps::cargo_build_visual_tests- run: cargo build -p zed --bin zed_visual_test_runner --features visual-tests- name: steps::show_sccache_statsrun: sccache --show-stats || true- name: steps::cleanup_cargo_config@@ -537,6 +535,31 @@ jobs:run: |rm -rf ./../.cargotimeout-minutes: 60+ build_visual_tests_binary:+ needs:+ - orchestrate+ if: needs.orchestrate.outputs.run_tests == 'true'+ runs-on: namespace-profile-mac-large+ steps:+ - name: steps::checkout_repo+ uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd+ with:+ clean: false+ - name: steps::setup_cargo_config+ run: |+ mkdir -p ./../.cargo+ cp ./.cargo/ci-config.toml ./../.cargo/config.toml+ - name: steps::cache_rust_dependencies_namespace+ uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9+ with:+ cache: rust+ path: ~/.rustup+ - name: run_tests::build_visual_tests_binary::cargo_build_visual_tests+ run: cargo build -p zed --bin zed_visual_test_runner --features visual-tests+ - name: steps::cleanup_cargo_config+ if: always()+ run: |+ rm -rf ./../.cargocheck_wasm:needs:- orchestrate@@ -780,6 +803,7 @@ jobs:- run_tests_mac- doctests- check_workspace_binaries+ - build_visual_tests_binary- check_wasm- check_dependencies- check_docs@@ -810,6 +834,7 @@ jobs:check_result "run_tests_mac" "$RESULT_RUN_TESTS_MAC"check_result "doctests" "$RESULT_DOCTESTS"check_result "check_workspace_binaries" "$RESULT_CHECK_WORKSPACE_BINARIES"+ check_result "build_visual_tests_binary" "$RESULT_BUILD_VISUAL_TESTS_BINARY"check_result "check_wasm" "$RESULT_CHECK_WASM"check_result "check_dependencies" "$RESULT_CHECK_DEPENDENCIES"check_result "check_docs" "$RESULT_CHECK_DOCS"@@ -830,6 +855,7 @@ jobs:RESULT_RUN_TESTS_MAC: ${{ needs.run_tests_mac.result }}RESULT_DOCTESTS: ${{ needs.doctests.result }}RESULT_CHECK_WORKSPACE_BINARIES: ${{ needs.check_workspace_binaries.result }}+ RESULT_BUILD_VISUAL_TESTS_BINARY: ${{ needs.build_visual_tests_binary.result }}RESULT_CHECK_WASM: ${{ needs.check_wasm.result }}RESULT_CHECK_DEPENDENCIES: ${{ needs.check_dependencies.result }}RESULT_CHECK_DOCS: ${{ needs.check_docs.result }}diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rsindex 65b44123c7b..4d936b89ff7 100644--- a/tooling/xtask/src/tasks/workflows/run_tests.rs+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs@@ -57,6 +57,7 @@ pub(crate) fn run_tests() -> Workflow {should_run_tests.guard(run_platform_tests(Platform::Mac)),should_run_tests.guard(doctests()),should_run_tests.guard(check_workspace_binaries()),+ should_run_tests.guard(build_visual_tests_binary()),should_run_tests.guard(check_wasm()),should_run_tests.guard(check_dependencies()), // could be more specific here?should_check_docs.guard(check_docs()),@@ -596,14 +597,27 @@ fn run_platform_tests_impl(platform: Platform, filter_packages: bool) -> NamedJo.when(!filter_packages, |job| {job.add_step(steps::cargo_nextest(platform))})- .when(platform == Platform::Mac, |job| {- job.add_step(steps::cargo_build_visual_tests())- }).add_step(steps::show_sccache_stats(platform)).add_step(steps::cleanup_cargo_config(platform)),}}+fn build_visual_tests_binary() -> NamedJob {+ pub fn cargo_build_visual_tests() -> Step<Run> {+ named::bash("cargo build -p zed --bin zed_visual_test_runner --features visual-tests")+ }++ named::job(+ Job::default()+ .runs_on(runners::MAC_DEFAULT)+ .add_step(steps::checkout_repo())+ .add_step(steps::setup_cargo_config(Platform::Mac))+ .add_step(steps::cache_rust_dependencies_namespace())+ .add_step(cargo_build_visual_tests())+ .add_step(steps::cleanup_cargo_config(Platform::Mac)),+ )+}+pub(crate) fn check_postgres_and_protobuf_migrations() -> NamedJob {fn ensure_fresh_merge() -> Step<Run> {named::bash(indoc::indoc! {r#"diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rsindex 81543444ff6..7f015c791bb 100644--- a/tooling/xtask/src/tasks/workflows/steps.rs+++ b/tooling/xtask/src/tasks/workflows/steps.rs@@ -254,10 +254,6 @@ pub fn setup_sccache(platform: Platform) -> Step<Run> {.add_env(("SCCACHE_BUCKET", SCCACHE_R2_BUCKET))}-pub fn cargo_build_visual_tests() -> Step<Run> {- named::bash("cargo build -p zed --bin zed_visual_test_runner --features visual-tests")-}-pub fn show_sccache_stats(platform: Platform) -> Step<Run> {match platform {// Use $env:RUSTC_WRAPPER (absolute path) because GITHUB_PATH changes