From adec27b50c5ce0d62d629317a63476fb6e67c4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Wed, 10 Jan 2024 12:52:42 -0500 Subject: [PATCH 1/2] ci: Improve stability of `cargo-udeps` in GitHub actions - Updated the execution process for `cargo-udeps` in GitHub actions. - Enhanced stability by using `RUSTC_BOOTSTRAP` variable in `unused-deps.yml`. THis should help solve https://github.com/lurk-lab/arecibo/issues/247 --- .github/workflows/unused-deps.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unused-deps.yml b/.github/workflows/unused-deps.yml index 05ea1d5..ae92b0a 100644 --- a/.github/workflows/unused-deps.yml +++ b/.github/workflows/unused-deps.yml @@ -25,8 +25,12 @@ jobs: # udeps requires nightly - uses: dtolnay/rust-toolchain@nightly - uses: taiki-e/install-action@cargo-udeps - - name: Check for unused dependencies - run: cargo udeps --lib --features "${{ inputs.repository }}" + # Normally running cargo-udeps requires use of a nightly compiler + # In order to have a more stable and less noisy experience, lets instead + # opt to use the stable toolchain specified via the 'rust-toolchain' file + # and instead enable nightly features via 'RUSTC_BOOTSTRAP' + - name: run cargo-udeps + run: RUSTC_BOOTSTRAP=1 cargo udeps --lib --features "${{ inputs.repository }}" - uses: JasonEtco/create-an-issue@v2 if: ${{ failure() }} env: From cbe0c4438e1fdc3d554f50af920f3732caaf2582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Wed, 10 Jan 2024 17:28:00 -0500 Subject: [PATCH 2/2] fix: inputs --- .github/workflows/unused-deps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unused-deps.yml b/.github/workflows/unused-deps.yml index ae92b0a..8ccec29 100644 --- a/.github/workflows/unused-deps.yml +++ b/.github/workflows/unused-deps.yml @@ -30,7 +30,7 @@ jobs: # opt to use the stable toolchain specified via the 'rust-toolchain' file # and instead enable nightly features via 'RUSTC_BOOTSTRAP' - name: run cargo-udeps - run: RUSTC_BOOTSTRAP=1 cargo udeps --lib --features "${{ inputs.repository }}" + run: RUSTC_BOOTSTRAP=1 cargo udeps --lib --features "${{ inputs.features }}" - uses: JasonEtco/create-an-issue@v2 if: ${{ failure() }} env: @@ -39,4 +39,4 @@ jobs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} with: update_existing: true - filename: .github/templates/UNUSED_DEPS_ISSUE.md \ No newline at end of file + filename: .github/templates/UNUSED_DEPS_ISSUE.md