Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Restore mtime of source files to the git log time (#48607)
Piotr Osiewicz4084a5ac13ba
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 7817289f84d..6d75b01ddff 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -17,6 +17,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -49,6 +52,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -95,6 +101,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -124,6 +133,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -144,6 +156,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -170,6 +185,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -240,6 +258,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -280,6 +301,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -325,6 +349,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_nodeuses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020with:@@ -370,6 +397,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_nodeuses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020with:@@ -419,6 +449,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -464,6 +497,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.ymlindex 942f39c4526..126540e2173 100644--- a/.github/workflows/release_nightly.yml+++ b/.github/workflows/release_nightly.yml@@ -33,6 +33,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -62,6 +65,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -86,6 +92,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |set -eu@@ -132,6 +141,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |set -eu@@ -183,6 +195,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |set -eu@@ -234,6 +249,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |set -eu@@ -289,6 +307,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |$ErrorActionPreference = "Stop"@@ -342,6 +363,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: run_bundling::set_release_channel_to_nightlyrun: |$ErrorActionPreference = "Stop"diff --git a/.github/workflows/run_bundling.yml b/.github/workflows/run_bundling.ymlindex 7f0ad57b51f..02be483e045 100644--- a/.github/workflows/run_bundling.yml+++ b/.github/workflows/run_bundling.yml@@ -24,6 +24,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -63,6 +66,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -107,6 +113,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_nodeuses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020with:@@ -151,6 +160,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_nodeuses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020with:@@ -199,6 +211,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:@@ -243,6 +258,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_sentryuses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454bwith:diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.ymlindex dd0eee2efe0..99834c0db63 100644--- a/.github/workflows/run_tests.yml+++ b/.github/workflows/run_tests.yml@@ -151,6 +151,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -170,6 +173,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -198,6 +204,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -220,6 +229,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |New-Item -ItemType Directory -Path "./../.cargo" -Force@@ -251,6 +263,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -299,6 +314,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::setup_cargo_configrun: |mkdir -p ./../.cargo@@ -333,6 +351,9 @@ jobs:uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with:clean: false+ fetch-depth: 0+ - name: steps::restore_mtime+ uses: zed-industries/git-restore-mtime-action@72cefcf20b50bf4fcd74ea8a0d2927b0680e2114- name: steps::cache_rust_dependencies_namespaceuses: namespacelabs/nscloud-cache-action@v1with:diff --git a/tooling/xtask/src/tasks/workflows/run_bundling.rs b/tooling/xtask/src/tasks/workflows/run_bundling.rsindex bdeec783476..17b1f021b8e 100644--- a/tooling/xtask/src/tasks/workflows/run_bundling.rs+++ b/tooling/xtask/src/tasks/workflows/run_bundling.rs@@ -73,7 +73,8 @@ pub(crate) fn bundle_mac(job: bundle_job(deps).runs_on(runners::MAC_DEFAULT).envs(bundle_envs(platform))- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).when_some(release_channel, |job, release_channel| {job.add_step(set_release_channel(platform, release_channel))})@@ -124,7 +125,8 @@ pub(crate) fn bundle_linux(job: bundle_job(deps).runs_on(arch.linux_bundler()).envs(bundle_envs(platform))- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).when_some(release_channel, |job, release_channel| {job.add_step(set_release_channel(platform, release_channel))})@@ -164,7 +166,8 @@ pub(crate) fn bundle_windows(job: bundle_job(deps).runs_on(runners::WINDOWS_DEFAULT).envs(bundle_envs(platform))- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).when_some(release_channel, |job, release_channel| {job.add_step(set_release_channel(platform, release_channel))})diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rsindex d474f4c0875..d0f4ea2e0df 100644--- a/tooling/xtask/src/tasks/workflows/run_tests.rs+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs@@ -384,7 +384,8 @@ pub(crate) fn clippy(platform: Platform) -> NamedJob {name: format!("clippy_{platform}"),job: release_job(&[]).runs_on(runner)- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).add_step(steps::setup_cargo_config(platform)).when(platform == Platform::Linux || platform == Platform::Mac,@@ -430,7 +431,8 @@ fn run_platform_tests_impl(platform: Platform, filter_packages: bool) -> NamedJo),)})- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).add_step(steps::setup_cargo_config(platform)).when(platform == Platform::Linux || platform == Platform::Mac,@@ -513,7 +515,8 @@ fn doctests() -> NamedJob {named::job(release_job(&[]).runs_on(runners::LINUX_DEFAULT)- .add_step(steps::checkout_repo())+ .add_step(steps::checkout_repo().add_with(("fetch-depth", 0)))+ .add_step(steps::restore_mtime()).add_step(steps::cache_rust_dependencies_namespace()).map(steps::install_linux_dependencies).add_step(steps::setup_cargo_config(Platform::Linux))diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rsindex c78a762b9f0..27244d816ab 100644--- a/tooling/xtask/src/tasks/workflows/steps.rs+++ b/tooling/xtask/src/tasks/workflows/steps.rs@@ -47,6 +47,14 @@ impl From<Nextest> for Step<Run> {}}+pub fn restore_mtime() -> Step<Use> {+ named::uses(+ "zed-industries",+ "git-restore-mtime-action",+ "72cefcf20b50bf4fcd74ea8a0d2927b0680e2114",+ )+}+pub fn checkout_repo() -> Step<Use> {named::uses("actions",