diff --git a/.github/actions/setup-builder/action.yaml b/.github/actions/setup-builder/action.yaml index eca1038bf94f..65289fe3643d 100644 --- a/.github/actions/setup-builder/action.yaml +++ b/.github/actions/setup-builder/action.yaml @@ -37,14 +37,17 @@ runs: /usr/local/cargo/registry/index/ /usr/local/cargo/registry/cache/ /usr/local/cargo/git/db/ - key: cargo-cache3- + key: cargo-cache3-${{ hashFiles('**/Cargo.toml') }} + - name: Generate lockfile + shell: bash + run: cargo fetch - name: Cache Rust dependencies uses: actions/cache@v3 with: # these represent compiled steps of both dependencies and arrow # and thus are specific for a particular OS, arch and rust version. path: /github/home/target - key: ${{ runner.os }}-${{ runner.arch }}-target-cache3-${{ inputs.rust-version }}- + key: ${{ runner.os }}-${{ runner.arch }}-target-cache3-${{ inputs.rust-version }}-${{ hashFiles('**/Cargo.lock') }} - name: Install Build Dependencies shell: bash run: | @@ -56,5 +59,4 @@ runs: echo "Installing ${{ inputs.rust-version }}" rustup toolchain install ${{ inputs.rust-version }} rustup default ${{ inputs.rust-version }} - rustup component add rustfmt echo "CARGO_TARGET_DIR=/github/home/target" >> $GITHUB_ENV