From a22c274394da913b327ad1bfdb2db008b272f0ab Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Thu, 6 Jul 2023 14:34:30 +0200 Subject: [PATCH] ci: restore mtime ref https://github.com/rust-lang/cargo/issues/6529 --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/integration.yml | 12 ++++++++++++ .github/workflows/unit.yml | 21 ++++++++++++++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9707365066eb..24560deb79b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,12 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Install toolchain uses: dtolnay/rust-toolchain@nightly with: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d4375665de0b..6916a08505bd 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -23,6 +23,12 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Install toolchain uses: dtolnay/rust-toolchain@stable with: @@ -71,6 +77,12 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Install toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 7873ee19707f..23dff59ac0bf 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -22,6 +22,12 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Install toolchain uses: dtolnay/rust-toolchain@stable with: @@ -57,6 +63,12 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Checkout ethereum/tests uses: actions/checkout@v3 @@ -85,7 +97,14 @@ jobs: name: rustdoc runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout sources + uses: actions/checkout@v3 + with: + # git-restore-mtime-bare uses the ref log to find the correct timestamp + # for each file. This requires a full git history. The default value (1) + # creates a shallow checkout. + fetch-depth: 0 + - uses: chetan/git-restore-mtime-action@v2 - name: Install toolchain uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2