From e7c985cc874a98f9427c8f2d35505769440535a4 Mon Sep 17 00:00:00 2001 From: gera Date: Mon, 19 Aug 2024 11:16:54 +0200 Subject: [PATCH] test mounting cargo cache --- .github/workflows/cargo-clippy.yml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/cargo-clippy.yml diff --git a/.github/workflows/cargo-clippy.yml b/.github/workflows/cargo-clippy.yml new file mode 100644 index 0000000000..99c8b6974b --- /dev/null +++ b/.github/workflows/cargo-clippy.yml @@ -0,0 +1,44 @@ +name: Build and Deploy Chain docs + +on: + push: + branches: + - github-runner + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Cargo Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-clippy- + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and Deploy in Container + run: | + docker run --rm \ + -v "${GITHUB_WORKSPACE}:/workspace" \ + -v "${HOME}/.cargo:/root/.cargo" \ + -w /workspace \ + paritytech/ci-unified:bullseye-1.74.0 \ + bash -c " + RUSTDOCFLAGS='-D warnings' SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --quiet"