dependencies #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: dependencies | |
| on: | |
| schedule: | |
| - cron: '0 20 * * TUE' | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| paths: | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| dependencies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Audit Rust dependencies | |
| uses: actions-rust-lang/audit@v1 | |
| - name: Detect multiple versions of the same crate | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| command: check bans licenses sources | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - name: Install cargo-udeps | |
| env: | |
| UDEPS_BASE_URL: https://github.com/est31/cargo-udeps/releases | |
| run: | | |
| # Get the latest release tag by: | |
| # 1. Obtaining the URL of the latest release, | |
| # 2. Extracting the semantic version from it, | |
| # 3. Taking the first match found. | |
| LATEST_TAG=$(curl -sIL -o /dev/null -w '%{url_effective}' "$UDEPS_BASE_URL/latest" | grep -oE 'v?[0-9]+\.[0-9]+\.[0-9]+' | head -n1) | |
| UDEPS_URL="$UDEPS_BASE_URL/download/$LATEST_TAG/cargo-udeps-$LATEST_TAG-x86_64-unknown-linux-gnu.tar.gz" | |
| curl -L "$UDEPS_URL" | tar xz -C $HOME/.cargo/bin --strip-components 2 | |
| - name: Run cargo-udeps | |
| run: | | |
| cargo +nightly udeps --all-targets |