From 66cff69ca2e72f672205a1c68a7d7c07dea0dde7 Mon Sep 17 00:00:00 2001 From: Martin Indra Date: Thu, 10 Aug 2023 20:57:41 +0200 Subject: [PATCH] CI: Make udeps faster (#678) --- .github/workflows/test.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea054985..8e827b3e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,8 +80,14 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: + - name: Install alsa and udev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + id: rust-toolchain + - uses: actions/cache@v3 + id: rust-cache with: path: | ~/.cargo/bin/ @@ -89,16 +95,15 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: udeps-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - udeps-${{ runner.os }}- - - uses: dtolnay/rust-toolchain@nightly - - name: Install cargo-udeps - run: cargo install --force cargo-udeps - - name: Install alsa and udev - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev - - name: Run cargo-udeps - run: cargo udeps + key: rust-udeps-${{ steps.rust-toolchain.outputs.cachekey }}-v1 + + - name: cargo-udeps + run: | + export UDEPS_VER=$(curl -s "https://api.github.com/repos/est31/cargo-udeps/releases/latest" | jq -r .tag_name) + echo $UDEPS_VER + curl -L "https://github.com/est31/cargo-udeps/releases/download/$UDEPS_VER/cargo-udeps-$UDEPS_VER-x86_64-unknown-linux-gnu.tar.gz" -o udeps.tar.gz + tar -xzvf udeps.tar.gz + ./cargo-udeps-$UDEPS_VER-x86_64-unknown-linux-gnu/cargo-udeps udeps comments: name: Code Comments