From 857a4ecf9d271061c26035dedce470ab9968a93f Mon Sep 17 00:00:00 2001 From: mjsterckx Date: Wed, 8 Mar 2023 14:57:00 +0000 Subject: [PATCH 1/2] Makefile: point to cargo cache when running check-clippy --- Makefile.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 945bc7fcc87..9cd7b9fcaa1 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -440,7 +440,10 @@ export VARIANT="${BUILDSYS_VARIANT}" # For rust first-party source code if ! docker run --rm \ - -v "$(pwd)":/tmp \ + -e CARGO_HOME="/tmp/.cargo" \ + -v "${CARGO_HOME}":/tmp/.cargo \ + -v "${BUILDSYS_ROOT_DIR}/sources":/tmp/sources \ + -v "${BUILDSYS_ROOT_DIR}/tools":/tmp/tools \ "${BUILDSYS_SDK_IMAGE}" \ cargo clippy \ --manifest-path /tmp/tools/Cargo.toml \ @@ -449,7 +452,10 @@ if ! docker run --rm \ fi if ! docker run --rm \ - -v "$(pwd)":/tmp \ + -e CARGO_HOME="/tmp/.cargo" \ + -v "${CARGO_HOME}":/tmp/.cargo \ + -v "${BUILDSYS_ROOT_DIR}/sources":/tmp/sources \ + -v "${BUILDSYS_ROOT_DIR}/tools":/tmp/tools \ -e VARIANT \ "${BUILDSYS_SDK_IMAGE}" \ cargo clippy \ From 9af0075b6bd9a2b253561eb49931a98928f5f408 Mon Sep 17 00:00:00 2001 From: mjsterckx Date: Wed, 8 Mar 2023 14:57:41 +0000 Subject: [PATCH 2/2] actions-workflow: remove rust pin --- .github/workflows/build.yml | 2 +- .github/workflows/cache.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c67c685d178..9ed7d1605f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -151,7 +151,7 @@ jobs: key: ${{ hashFiles('.github/workflows/cache.yml') }}-${{ runner.os }}-${{ env.OS_ARCH }}-${{ hashFiles('tools/Cargo.lock') }}-${{ hashFiles('.github/workflows/build.yml') }} restore-keys: | ${{ hashFiles('.github/workflows/cache.yml') }}-${{ runner.os }}-${{ env.OS_ARCH }}-${{ hashFiles('tools/Cargo.lock') }} - - run: rustup default 1.66.1 && rustup component add rustfmt && rustup component add clippy + - run: rustup component add rustfmt - run: cargo install --version 0.36.0 cargo-make - run: cargo install --version 0.6.2 cargo-sweep - run: | diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index ca27f504afd..e4a8f3de506 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -45,7 +45,6 @@ jobs: tools/.crates2.json tools/target key: ${{ hashFiles('.github/workflows/cache.yml') }}-${{ runner.os }}-${{ env.OS_ARCH }}-${{ hashFiles('tools/Cargo.lock') }} - - run: rustup default 1.66.1 - run: cargo install --locked --version 0.36.0 cargo-make - run: cargo install --locked --version 0.8.3 --no-default-features --features ci-autoclean cargo-cache - run: cargo install --locked --version 0.6.2 cargo-sweep