Skip to content

Commit

Permalink
CI: Make udeps faster (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 authored Aug 10, 2023
1 parent 7191165 commit 66cff69
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,30 @@ 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/
~/.cargo/registry/index/
~/.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
Expand Down

0 comments on commit 66cff69

Please sign in to comment.